Re: [PATCH 1/2] No-exec support for ppc64

2005-03-16 Thread Jake Moilanen
On Wed, 16 Mar 2005 17:10:57 +1100 Paul Mackerras <[EMAIL PROTECTED]> wrote: > Jake Moilanen writes: > > > It does not work w/o the sys_mprotect. It will hang in one of the first > > few binaries. > > Hmmm, what distro is this with? I just tried a kernel with the patch > below on a SLES9

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-16 Thread Jake Moilanen
On Wed, 16 Mar 2005 17:10:57 +1100 Paul Mackerras [EMAIL PROTECTED] wrote: Jake Moilanen writes: It does not work w/o the sys_mprotect. It will hang in one of the first few binaries. Hmmm, what distro is this with? I just tried a kernel with the patch below on a SLES9 install and a

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Paul Mackerras
Jake Moilanen writes: > It does not work w/o the sys_mprotect. It will hang in one of the first > few binaries. Hmmm, what distro is this with? I just tried a kernel with the patch below on a SLES9 install and a Debian install and it came up and ran just fine in both cases. Paul. diff -urN

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Jake Moilanen
On Wed, 16 Mar 2005 09:18:36 +1030 Alan Modra <[EMAIL PROTECTED]> wrote: > On Tue, Mar 15, 2005 at 03:51:35PM -0600, Jake Moilanen wrote: > > I believe the problem is that the last PT_LOAD entry does not have the > > correct size, and we only mmap up to the sbss. The .sbss, .plt, and > > .bss do

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Alan Modra
On Tue, Mar 15, 2005 at 03:51:35PM -0600, Jake Moilanen wrote: > I believe the problem is that the last PT_LOAD entry does not have the > correct size, and we only mmap up to the sbss. The .sbss, .plt, and > .bss do not get mmapped with the section. Huh? .sbss, .plt and .bss have no file

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Jake Moilanen
On Tue, 15 Mar 2005 09:18:04 +1100 Paul Mackerras <[EMAIL PROTECTED]> wrote: > Jake Moilanen writes: > > > > I don't think I can push that upstream. What happens if you leave > > > that out? > > > > The bss and the plt are in the same segment, and plt obviously needs to > > be executable. > >

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Jake Moilanen
On Tue, 15 Mar 2005 09:18:04 +1100 Paul Mackerras [EMAIL PROTECTED] wrote: Jake Moilanen writes: I don't think I can push that upstream. What happens if you leave that out? The bss and the plt are in the same segment, and plt obviously needs to be executable. Yes... what I was

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Alan Modra
On Tue, Mar 15, 2005 at 03:51:35PM -0600, Jake Moilanen wrote: I believe the problem is that the last PT_LOAD entry does not have the correct size, and we only mmap up to the sbss. The .sbss, .plt, and .bss do not get mmapped with the section. Huh? .sbss, .plt and .bss have no file contents,

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Jake Moilanen
On Wed, 16 Mar 2005 09:18:36 +1030 Alan Modra [EMAIL PROTECTED] wrote: On Tue, Mar 15, 2005 at 03:51:35PM -0600, Jake Moilanen wrote: I believe the problem is that the last PT_LOAD entry does not have the correct size, and we only mmap up to the sbss. The .sbss, .plt, and .bss do not get

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-15 Thread Paul Mackerras
Jake Moilanen writes: It does not work w/o the sys_mprotect. It will hang in one of the first few binaries. Hmmm, what distro is this with? I just tried a kernel with the patch below on a SLES9 install and a Debian install and it came up and ran just fine in both cases. Paul. diff -urN

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Paul Mackerras
Jake Moilanen writes: > > I don't think I can push that upstream. What happens if you leave > > that out? > > The bss and the plt are in the same segment, and plt obviously needs to > be executable. Yes... what I was asking was "do things actually break if you leave that out, or does the

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Jake Moilanen
On Mon, 14 Mar 2005 21:13:36 +1100 Paul Mackerras <[EMAIL PROTECTED]> wrote: > Jake Moilanen writes: > > > diff -puN fs/binfmt_elf.c~nx-user-ppc64 fs/binfmt_elf.c > > --- linux-2.6-bk/fs/binfmt_elf.c~nx-user-ppc64 2005-03-08 16:08:54 > > -06:00 > > +++ linux-2.6-bk-moilanen/fs/binfmt_elf.c

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Paul Mackerras
Jake Moilanen writes: > diff -puN fs/binfmt_elf.c~nx-user-ppc64 fs/binfmt_elf.c > --- linux-2.6-bk/fs/binfmt_elf.c~nx-user-ppc642005-03-08 16:08:54 > -06:00 > +++ linux-2.6-bk-moilanen/fs/binfmt_elf.c 2005-03-08 16:08:54 -06:00 > @@ -99,6 +99,8 @@ static int set_brk(unsigned long

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Paul Mackerras
Jake Moilanen writes: diff -puN fs/binfmt_elf.c~nx-user-ppc64 fs/binfmt_elf.c --- linux-2.6-bk/fs/binfmt_elf.c~nx-user-ppc642005-03-08 16:08:54 -06:00 +++ linux-2.6-bk-moilanen/fs/binfmt_elf.c 2005-03-08 16:08:54 -06:00 @@ -99,6 +99,8 @@ static int set_brk(unsigned long start,

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Jake Moilanen
On Mon, 14 Mar 2005 21:13:36 +1100 Paul Mackerras [EMAIL PROTECTED] wrote: Jake Moilanen writes: diff -puN fs/binfmt_elf.c~nx-user-ppc64 fs/binfmt_elf.c --- linux-2.6-bk/fs/binfmt_elf.c~nx-user-ppc64 2005-03-08 16:08:54 -06:00 +++ linux-2.6-bk-moilanen/fs/binfmt_elf.c

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-14 Thread Paul Mackerras
Jake Moilanen writes: I don't think I can push that upstream. What happens if you leave that out? The bss and the plt are in the same segment, and plt obviously needs to be executable. Yes... what I was asking was do things actually break if you leave that out, or does the binfmt_elf

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-10 Thread Jake Moilanen
On Wed, 9 Mar 2005 21:22:13 -0600 [EMAIL PROTECTED] (Olof Johansson) wrote: > On Tue, Mar 08, 2005 at 05:08:26PM -0600, Jake Moilanen wrote: > > No-exec base and user space support for PPC64. > > Hi, a couple of comments below. > Here's the revised user & base support for no-exec on ppc64

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-10 Thread Jake Moilanen
On Wed, 9 Mar 2005 21:22:13 -0600 [EMAIL PROTECTED] (Olof Johansson) wrote: On Tue, Mar 08, 2005 at 05:08:26PM -0600, Jake Moilanen wrote: No-exec base and user space support for PPC64. Hi, a couple of comments below. Here's the revised user base support for no-exec on ppc64 with Olof

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-09 Thread Olof Johansson
On Tue, Mar 08, 2005 at 05:08:26PM -0600, Jake Moilanen wrote: > No-exec base and user space support for PPC64. Hi, a couple of comments below. -Olof > @@ -786,6 +786,7 @@ int hash_huge_page(struct mm_struct *mm, > pte_t old_pte, new_pte; > unsigned long hpteflags, prpn; >

Re: [PATCH 1/2] No-exec support for ppc64

2005-03-09 Thread Olof Johansson
On Tue, Mar 08, 2005 at 05:08:26PM -0600, Jake Moilanen wrote: No-exec base and user space support for PPC64. Hi, a couple of comments below. -Olof @@ -786,6 +786,7 @@ int hash_huge_page(struct mm_struct *mm, pte_t old_pte, new_pte; unsigned long hpteflags, prpn; long

[PATCH 1/2] No-exec support for ppc64

2005-03-08 Thread Jake Moilanen
No-exec base and user space support for PPC64. This will prohibit user space apps that a compile w/ PT_GNU_STACK from executing in segments that are non-executable. Non-PT_GNU_STACK compiled apps will work as well, but will not be able to take advantage of the no-exec feature. Signed-off-by:

[PATCH 1/2] No-exec support for ppc64

2005-03-08 Thread Jake Moilanen
No-exec base and user space support for PPC64. This will prohibit user space apps that a compile w/ PT_GNU_STACK from executing in segments that are non-executable. Non-PT_GNU_STACK compiled apps will work as well, but will not be able to take advantage of the no-exec feature. Signed-off-by: