* [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi [not found] <20210203172242.29644-1-chang.seok.bae@intel.com> @ 2021-02-03 17:22 ` Chang S. Bae 2021-02-04 15:55 ` Dave Martin 0 siblings, 1 reply; 3+ messages in thread From: Chang S. Bae @ 2021-02-03 17:22 UTC (permalink / raw) To: bp, tglx, mingo, luto, x86 Cc: linux-arch, len.brown, tony.luck, libc-alpha, ravi.v.shankar, hjl.tools, carlos, mpe, chang.seok.bae, jannh, linux-kernel, dave.hansen, linux-api, Dave.Martin, linux-arm-kernel Move the AT_MINSIGSTKSZ definition to generic Linux from arm64. It is already used as generic ABI in glibc's generic elf.h, and this move will prevent future namespace conflicts. In particular, x86 will re-use this generic definition. Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Cc: Carlos O'Donell <carlos@redhat.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: libc-alpha@sourceware.org Cc: linux-arch@vger.kernel.org Cc: linux-api@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- Change from v4: * Added as a new patch (Carlos O'Donell) --- arch/arm64/include/uapi/asm/auxvec.h | 1 - include/uapi/linux/auxvec.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/uapi/asm/auxvec.h b/arch/arm64/include/uapi/asm/auxvec.h index 743c0b84fd30..767d710c92aa 100644 --- a/arch/arm64/include/uapi/asm/auxvec.h +++ b/arch/arm64/include/uapi/asm/auxvec.h @@ -19,7 +19,6 @@ /* vDSO location */ #define AT_SYSINFO_EHDR 33 -#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ #define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h index abe5f2b6581b..cc4fa77bd2a7 100644 --- a/include/uapi/linux/auxvec.h +++ b/include/uapi/linux/auxvec.h @@ -33,5 +33,6 @@ #define AT_EXECFN 31 /* filename of program */ +#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ #endif /* _UAPI_LINUX_AUXVEC_H */ -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi 2021-02-03 17:22 ` [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi Chang S. Bae @ 2021-02-04 15:55 ` Dave Martin 2021-02-12 18:46 ` Will Deacon 0 siblings, 1 reply; 3+ messages in thread From: Dave Martin @ 2021-02-04 15:55 UTC (permalink / raw) To: Chang S. Bae Cc: linux-arch, len.brown, tony.luck, libc-alpha, jannh, ravi.v.shankar, carlos, mpe, hjl.tools, x86, linux-kernel, dave.hansen, luto, linux-api, tglx, bp, mingo, linux-arm-kernel On Wed, Feb 03, 2021 at 09:22:38AM -0800, Chang S. Bae wrote: > Move the AT_MINSIGSTKSZ definition to generic Linux from arm64. It is > already used as generic ABI in glibc's generic elf.h, and this move will > prevent future namespace conflicts. In particular, x86 will re-use this > generic definition. > > Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> > Reviewed-by: Len Brown <len.brown@intel.com> > Cc: Carlos O'Donell <carlos@redhat.com> > Cc: Dave Martin <Dave.Martin@arm.com> > Cc: libc-alpha@sourceware.org > Cc: linux-arch@vger.kernel.org > Cc: linux-api@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > --- > Change from v4: > * Added as a new patch (Carlos O'Donell) > --- > arch/arm64/include/uapi/asm/auxvec.h | 1 - > include/uapi/linux/auxvec.h | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/include/uapi/asm/auxvec.h b/arch/arm64/include/uapi/asm/auxvec.h > index 743c0b84fd30..767d710c92aa 100644 > --- a/arch/arm64/include/uapi/asm/auxvec.h > +++ b/arch/arm64/include/uapi/asm/auxvec.h > @@ -19,7 +19,6 @@ > > /* vDSO location */ > #define AT_SYSINFO_EHDR 33 > -#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ Since this is UAPI, I'm wondering whether we should try to preserve this definition for users of <asm/auxvec.h>. (Indeed, it is not uncommon to include <asm/> headers in userspace hackery, since the <linux/> headers tend to interact badly with the the libc headers.) In C11 at least, duplicate #defines are not an error if the definitions are the same. I don't know about the history, but I suspect this was true for older standards too. So maybe we can just keep this definition with a duplicate definition in the common header. Otherwise, we could have #ifndef AT_MINSIGSTKSZ #define AT_MINSIGSTKSZ 51 #endif in include/linux/uapi/auxvec.h, and keep the arm64 header unchanged. > > #define AT_VECTOR_SIZE_ARCH 2 /* entries in ARCH_DLINFO */ > > diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h > index abe5f2b6581b..cc4fa77bd2a7 100644 > --- a/include/uapi/linux/auxvec.h > +++ b/include/uapi/linux/auxvec.h > @@ -33,5 +33,6 @@ > > #define AT_EXECFN 31 /* filename of program */ > > +#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ > > #endif /* _UAPI_LINUX_AUXVEC_H */ Otherwise, this looks fine as a concept. AFAICT, no other arch is already using the value 51. If nobody else objects to the loss of the definition from arm64's <asm/auxvec.h> then I guess I can put up with that -- but I will wait to see if anyone gives a view first. Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi 2021-02-04 15:55 ` Dave Martin @ 2021-02-12 18:46 ` Will Deacon 0 siblings, 0 replies; 3+ messages in thread From: Will Deacon @ 2021-02-12 18:46 UTC (permalink / raw) To: Dave Martin Cc: linux-arch, len.brown, tony.luck, libc-alpha, ravi.v.shankar, jannh, carlos, mpe, Chang S. Bae, x86, linux-kernel, dave.hansen, luto, linux-api, hjl.tools, tglx, bp, mingo, linux-arm-kernel On Thu, Feb 04, 2021 at 03:55:30PM +0000, Dave Martin wrote: > On Wed, Feb 03, 2021 at 09:22:38AM -0800, Chang S. Bae wrote: > > Move the AT_MINSIGSTKSZ definition to generic Linux from arm64. It is > > already used as generic ABI in glibc's generic elf.h, and this move will > > prevent future namespace conflicts. In particular, x86 will re-use this > > generic definition. > > > > Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> > > Reviewed-by: Len Brown <len.brown@intel.com> > > Cc: Carlos O'Donell <carlos@redhat.com> > > Cc: Dave Martin <Dave.Martin@arm.com> > > Cc: libc-alpha@sourceware.org > > Cc: linux-arch@vger.kernel.org > > Cc: linux-api@vger.kernel.org > > Cc: linux-arm-kernel@lists.infradead.org > > Cc: linux-kernel@vger.kernel.org > > --- > > Change from v4: > > * Added as a new patch (Carlos O'Donell) > > --- > > arch/arm64/include/uapi/asm/auxvec.h | 1 - > > include/uapi/linux/auxvec.h | 1 + > > 2 files changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/include/uapi/asm/auxvec.h b/arch/arm64/include/uapi/asm/auxvec.h > > index 743c0b84fd30..767d710c92aa 100644 > > --- a/arch/arm64/include/uapi/asm/auxvec.h > > +++ b/arch/arm64/include/uapi/asm/auxvec.h > > @@ -19,7 +19,6 @@ > > > > /* vDSO location */ > > #define AT_SYSINFO_EHDR 33 > > -#define AT_MINSIGSTKSZ 51 /* stack needed for signal delivery */ > > Since this is UAPI, I'm wondering whether we should try to preserve this > definition for users of <asm/auxvec.h>. (Indeed, it is not uncommon to > include <asm/> headers in userspace hackery, since the <linux/> headers > tend to interact badly with the the libc headers.) > > In C11 at least, duplicate #defines are not an error if the definitions > are the same. I don't know about the history, but I suspect this was > true for older standards too. So maybe we can just keep this definition > with a duplicate definition in the common header. > > Otherwise, we could have > > #ifndef AT_MINSIGSTKSZ > #define AT_MINSIGSTKSZ 51 > #endif > > in include/linux/uapi/auxvec.h, and keep the arm64 header unchanged. I think it just boils down to whether or not anything breaks. If it does, then we'll have to revert the patch, so anything we can do now to minimise that possibility would be good. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-12 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210203172242.29644-1-chang.seok.bae@intel.com>
2021-02-03 17:22 ` [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi Chang S. Bae
2021-02-04 15:55 ` Dave Martin
2021-02-12 18:46 ` Will Deacon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).