Re: [RFC PATCH] Make AT_VECTOR_SIZE_ARCH 2 for x86-32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Serge E. Hallyn (serue@xxxxxxxxxx):
> [ RFC:  Am I on crack? ]
> 
> Both x86-32 and x86-64 with 32-bit compat use ARCH_DLINFO_IA32,
> which defines two saved_auxv entries.  But system.h only defines
> AT_VECTOR_SIZE_ARCH as 2 for CONFIG_IA32_EMULATION, not for
> CONFIG_X86_32.  Fix that.

To be clear, this patch if right would be for pushing upstream
immediately.  It still leaves open the question of what we want
to do about saved_auxv.  We currently just write it out as a
buffer, but since it is actually an array of longs, and therefore
differently sized on x86-32 and x86-64-compat, we would need to
write them out entry-by-entry (and validate no overflows for
TIF_IA32 tasks).  Does that seem warranted?

> Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
> ---
>  arch/x86/include/asm/system.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h
> index ecb544e..e04740f 100644
> --- a/arch/x86/include/asm/system.h
> +++ b/arch/x86/include/asm/system.h
> @@ -11,9 +11,9 @@
>  #include <linux/irqflags.h>
> 
>  /* entries in ARCH_DLINFO: */
> -#ifdef CONFIG_IA32_EMULATION
> +#if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64)
>  # define AT_VECTOR_SIZE_ARCH 2
> -#else
> +#else /* else it's non-compat x86-64 */
>  # define AT_VECTOR_SIZE_ARCH 1
>  #endif
> 
> -- 
> 1.6.0.4
> 
> _______________________________________________
> Containers mailing list
> Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
> https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux