Subject: Re: segvguard [was: Re: CVS commit: src/sys/sys]
To: None <elad@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 12/08/2006 19:17:16
> Index: libexec/ld.elf_so/sysident.h
> ===================================================================
> RCS file: /usr/cvs/src/libexec/ld.elf_so/sysident.h,v
> retrieving revision 1.13
> diff -u -p -r1.13 sysident.h
> --- libexec/ld.elf_so/sysident.h 13 Jun 2006 13:55:58 -0000 1.13
> +++ libexec/ld.elf_so/sysident.h 1 Dec 2006 21:49:16 -0000
> @@ -75,3 +75,17 @@ __asm(
> "\t.previous\n"
> "\t.p2align\t2\n"
> );
> +
> +__asm(
> + ".section\t\".note.netbsd.pax\", \"a\"\n"
> + "\t.p2align\t2\n\n"
> +
> + "\t.long\t" __S(ELF_NOTE_PAX_NAMESZ) "\n"
> + "\t.long\t" __S(ELF_NOTE_PAX_DESCSZ) "\n"
> + "\t.long\t" __S(ELF_NOTE_TYPE_PAX_TAG) "\n"
> + "\t.ascii\t" __S(ELF_NOTE_PAX_NAME) "\n"
> + "\t.long\t" __S(0) "\n\n"
> +
> + "\t.previous\n"
> + "\t.p2align\t2\n"
> +);
is it too difficult to make paxctl add the section to existing executables?
YAMAMOTO Takashi