Subject: Re: ELF loader doesn't mprotect(PROT_EXEC).
To: Aymeric Vincent <Aymeric.Vincent@labri.fr>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-x11
Date: 10/22/2004 05:37:55
--Apple-Mail-15--117608613
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On Oct 21, 2004, at 8:51 AM, Aymeric Vincent wrote:

> Index: elfloader.c
> ===================================================================
> RCS file:  
> /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/loader/ 
> elfloader.c,v
> retrieving revision 1.2
> diff -u -u -r1.2 elfloader.c
> --- elfloader.c	28 Mar 2004 15:24:25 -0000	1.2
> +++ elfloader.c	21 Oct 2004 15:43:16 -0000
> @@ -758,7 +758,7 @@
>  	    symbol->address = (char *)&symbol->code.plt[0];
>  	    symval = (Elf_Addr) symbol->address;
>  	    ppc_flush_icache(&symbol->code.plt[0]);
> -	    ppc_flush_icache(&symbol->code.plt[6]);
> +	    ppc_flush_icache(&symbol->code.plt[6]); /* XXX why 6? */

Maybe that's the start of the next cache line?

         -- Jason R. Thorpe <thorpej@shagadelic.org>


--Apple-Mail-15--117608613
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFBeP8nOpVKkaBm8XkRAhkhAJ0UlXCZtqJkCYGXtvD2jGNEaL4pbQCgm5f6
XmzAo3cdCHIapGkhHwAMDqE=
=YxQZ
-----END PGP SIGNATURE-----

--Apple-Mail-15--117608613--