Date: Wed, 19 Jun 2002 00:00:24 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 13143 for review Message-ID: <200206190700.g5J70O209509@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=13143 Change 13143 by peter@peter_ia64 on 2002/06/19 00:00:08 Do not pass 4K page offsets into VM. This causes the pmap_protect: unaligned addresses panics. XXX This is inadequate. We need to raise permissions here, not change them according to rounding. However, it seems to work because we load data after text, which raises the last parts to read/write. (MAP_PRIVATE makes this harmless) Affected files ... ... //depot/projects/ia64/sys/kern/imgact_elf.c#8 edit Differences ... ==== //depot/projects/ia64/sys/kern/imgact_elf.c#8 (text+ko) ==== @@ -414,10 +414,11 @@ } /* - * set it to the specified protection + * set it to the specified protection. + * XXX had better undo the damage from pasting over the cracks here! */ - vm_map_protect(&vmspace->vm_map, map_addr, map_addr + map_len, prot, - FALSE); + vm_map_protect(&vmspace->vm_map, trunc_page(map_addr), + round_page(map_addr + map_len), prot, FALSE); return error; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206190700.g5J70O209509>