From: Jeff D. <jd...@ka...> - 2000-05-01 13:20:03
|
> The first time I ran it it exited from remap_data("rw-") saying > "remap_data couldn't find data segment" because there were no entries > in /proc/self/maps with those permissions: > 10000000-1016a000 rwxp 00000000 03:0d 339044 /home/cme20/working/umlinux/linux/linux > 1016a000-1019f000 rwxp 00000000 00:00 0 > 7ffff000-80000000 rwxp 00000000 00:00 0 What's going on here is that the kernel is copying its data and bss into two files, unmapping them, and then mapping those files shared in their places. This is to make the kernel data shared across forks. Otherwise, they would end up copy-on-write. remap_data recognizes the appropriate maps by their permissions. It looks like another method is needed for ppc. It looks like there is no separate text and data in the maps. Just text, bss, and stack. Is that right? Why don't we just ditch the permissions comparisons and use _etext and _end. The region between _etext and _end is the data, so just fiddle remap_data to remap that. > Is something actually wrong here, or should it only exit if both > remap_data("rwx") and remap_data("rw-") fail? They both have to succeed. Those permissions are pretty wierd. Does ppc not have the same kind of page protections that x86 does? Jeff |