Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread Bernd Schmidt
On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode when passing/returning in registers is a security concern. Whuh? * combine.c (cant_combine_insn_p): Check zero/sign extended hard registers. This part is OK. Bernd

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H.J. Lu
On Mon, Jun 20, 2011 at 6:53 AM, Bernd Schmidt ber...@codesourcery.com wrote: On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode when passing/returning in registers is a security concern. Whuh? Peter, do you think it is safe to assume upper 32bits are zero in user space for

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H. Peter Anvin
On 06/20/2011 07:01 AM, H.J. Lu wrote: On Mon, Jun 20, 2011 at 6:53 AM, Bernd Schmidt ber...@codesourcery.com wrote: On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode when passing/returning in registers is a security concern. No. Promoting *NON*-pointers (or rather,

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/20/11 08:33, H. Peter Anvin wrote: On 06/20/2011 07:01 AM, H.J. Lu wrote: On Mon, Jun 20, 2011 at 6:53 AM, Bernd Schmidt ber...@codesourcery.com wrote: On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode when passing/returning

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H.J. Lu
On Mon, Jun 20, 2011 at 7:33 AM, H. Peter Anvin h...@zytor.com wrote: On 06/20/2011 07:01 AM, H.J. Lu wrote: On Mon, Jun 20, 2011 at 6:53 AM, Bernd Schmidt ber...@codesourcery.com wrote: On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode when passing/returning in registers is

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H.J. Lu
On Mon, Jun 20, 2011 at 7:40 AM, Jeff Law l...@redhat.com wrote: Peter, do you think it is safe to assume upper 32bits are zero in user space for x32? Kernel isn't a problem since pointer is 64bit in kernel and we don't pass pointers on stack to kernel. As I have already stated, if we

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H. Peter Anvin
On 06/20/2011 07:43 AM, H.J. Lu wrote: On Mon, Jun 20, 2011 at 7:33 AM, H. Peter Anvin h...@zytor.com wrote: On 06/20/2011 07:01 AM, H.J. Lu wrote: On Mon, Jun 20, 2011 at 6:53 AM, Bernd Schmidt ber...@codesourcery.com wrote: On 06/20/2011 03:51 PM, H.J. Lu wrote: Promote pointers to Pmode

Re: [x32] PATCH: Remove ix86_promote_function_mode

2011-06-20 Thread H. Peter Anvin
On 06/20/2011 03:49 PM, Richard Henderson wrote: As I have already stated, if we *cannot* require pointers to be zero-extended on entry to the kernel, we're going to have to have special entry points for all the x32 system calls except the ones that don't take pointers. If it's a security