Re: [PATCH 4/5] x86/uapi: Stop leaking kconfig references to userspace

"Arnd Bergmann" <[email protected]>
Newsgroups org.infradead.lists.linux-snps-arc,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Dec 30, 2025, at 08:10, Thomas Weißschuh wrote:
> 
>  /* entries in ARCH_DLINFO: */
> -#if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64)
> +#if defined(__KERNEL__) && (defined(CONFIG_IA32_EMULATION) || 
> !defined(CONFIG_X86_64))
>  # define AT_VECTOR_SIZE_ARCH 3
>  #else /* else it's non-compat x86-64 */
>  # define AT_VECTOR_SIZE_ARCH 2

While this patch clearly keeps the current behavior, I think it's
wrong, and 32-bit userspace should see a '3' instead of '2' here.

It can probably just be '3' unconditionally, or we can
make it more complex and have a userspace definition based
on __x86_64__ being defined.

I also wonder if there is a problem with the third
x86-64 entry being zero rather than AT_IGNORE. I see that
some architectures do it like this, to keep the number constant
even if some entries are missing:

        if (likely(signal_minsigstksz))                          \
                NEW_AUX_ENT(AT_MINSIGSTKSZ, signal_minsigstksz); \
        else                                                     \
                NEW_AUX_ENT(AT_IGNORE, 0);                       \

     Arnd

_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.