This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [x32] PATCH: Remove ix86_promote_function_mode


On Mon, Jun 20, 2011 at 7:33 AM, H. Peter Anvin <hpa@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 <bernds@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, requiring non-pointers to
> having already been zero extended) is a security concern. ?I thought I'd
> made that point clear already. ?This is a hideously critical distinction.

I can promote pointers then.

>> 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 *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.
>

32bit pointers are zero-extended to 64bit when passing in registers to
kernel.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]