Re: PowerPC paxtest results w/ gcc-4.1

2006-08-16 Thread Segher Boessenkool
I never understood why PTE entries waste 4 bits (WIMG) for effectively very few valid combinations. The only invalid combinations are WI=11 -- if you know of a way to fit 12 combinations in fewer than 4 bits, let us know :-) Not all of those 12 are very useful, of course. Segher -- To UNSUB

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-16 Thread Albert Cahalan
On 8/16/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: Gabriel Paubert writes: > BTW, there is one way to make pages non executable: mark > them as guarded, but it will have a significant cost in > terms of performance. Indeed. I guess we could do that as a config option for machines that rea

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-16 Thread Paul Mackerras
Gabriel Paubert writes: > I agree, but I don't know why you believe it would cause > a machine check (0x200): from my docs, it is an ISI (0x400). I don't believe it would cause a machine check either, but that is what Matt Sealey was saying. I don't know where he got that idea. > BTW, there i

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-16 Thread Gabriel Paubert
On Tue, Aug 15, 2006 at 01:59:05PM +1000, Paul Mackerras wrote: > Matt Sealey writes: > > > Book I compatible PowerPC's have had a "no-executable" bit in > > the page protection flags since the dark ages.. see page 7-38 > > and 7-39 of the 'Programming Environments Manual for 32-Bit > > Microproce

RE: PowerPC paxtest results w/ gcc-4.1

2006-08-14 Thread Paul Mackerras
Matt Sealey writes: > Book I compatible PowerPC's have had a "no-executable" bit in > the page protection flags since the dark ages.. see page 7-38 > and 7-39 of the 'Programming Environments Manual for 32-Bit > Microprocessors'.. this document predates even the G3. What are you referring to? I

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-14 Thread Kumar Gala
On Aug 14, 2006, at 7:17 AM, Matt Sealey wrote: That looks like a 64-bit system, which doesn't have the granularity problem anyway. 32-bit powerpc seems to be decent. The heap shares with the executable itself, and of course there is the yucky 2 GB limit. One thing I'm curious about, has a

RE: PowerPC paxtest results w/ gcc-4.1

2006-08-14 Thread Matt Sealey
> That looks like a 64-bit system, which doesn't have the > granularity problem anyway. 32-bit powerpc seems to be > decent. The heap shares with the executable itself, and of > course there is the yucky 2 GB limit. One thing I'm curious about, has anyone EVER made a system which actually use

RE: PowerPC paxtest results w/ gcc-4.1

2006-08-14 Thread Matt Sealey
> Of course, that won't make all that much difference on your > Cube, because the G4 CPU doesn't have hardware support for > non-executable pages (any readable page is executable) I don't think this is true? Book I compatible PowerPC's have had a "no-executable" bit in the page protection fla

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-13 Thread Albert Cahalan
On 8/13/06, Hollis Blanchard <[EMAIL PROTECTED]> wrote: On Sun, 2006-08-13 at 00:11 -0400, Albert Cahalan wrote: > > On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: > > Albert Cahalan writes: > > > > > VM_STACK_DEFAULT_FLAGS32 is wrong. A fail-safe > > > default is important for security. I

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-13 Thread Albert Cahalan
On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: Of course, that won't make all that much difference on your Cube, because the G4 CPU doesn't have hardware support for non-executable pages (any readable page is executable). I now have an evil grin, and a kernel that prevents execution from

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-13 Thread Hollis Blanchard
On Sun, 2006-08-13 at 00:11 -0400, Albert Cahalan wrote: > > On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: > > Albert Cahalan writes: > > > > > VM_STACK_DEFAULT_FLAGS32 is wrong. A fail-safe > > > default is important for security. If gcc on PowerPC ever > > > does generate code which puts

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Albert Cahalan
On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: Albert Cahalan writes: > VM_STACK_DEFAULT_FLAGS32 is wrong. A fail-safe > default is important for security. If gcc on PowerPC ever > does generate code which puts trampolines on the stack, > then that can be fixed by converting to legal C co

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Alan Modra
On Sun, Aug 13, 2006 at 09:54:14AM +1000, Paul Mackerras wrote: > To get the full benefit of -msecure-plt, every object file in your > executable has to be compiled with it Yes. In particular, glibc startup files need to be compiled with -msecure-plt. If ld links any object file that uses the ol

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Paul Mackerras
Albert Cahalan writes: > VM_STACK_DEFAULT_FLAGS32 is wrong. A fail-safe > default is important for security. If gcc on PowerPC ever > does generate code which puts trampolines on the stack, > then that can be fixed by converting to legal C code or > by adding the fragile marking to the defective e

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Albert Cahalan
On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: Albert Cahalan writes: > gcc version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5) OK, so I think that version should have the new -msecure-plt flag, The flag matters not, even with the very latest binutils that Debian offers, version 2.17-

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Paul Mackerras
Albert Cahalan writes: > gcc version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5) OK, so I think that version should have the new -msecure-plt flag, which changes the ppc32 ABI so that the PLT no longer has to be writable and executable. Previously the dynamic linker would rewrite each PLT entry

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Albert Cahalan
On 8/12/06, Paul Mackerras <[EMAIL PROTECTED]> wrote: Albert Cahalan writes: > I just ran paxtest on a Mac G4 Cube. Ouch. The results are shameful. What gcc version, what binutils version, what kernel version? My gcc claims to be: Using built-in specs. Target: powerpc-linux-gnu Configured wi

Re: PowerPC paxtest results w/ gcc-4.1

2006-08-12 Thread Paul Mackerras
Albert Cahalan writes: > I just ran paxtest on a Mac G4 Cube. Ouch. The results are shameful. What gcc version, what binutils version, what kernel version? Paul. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]