diff mbox series

[v6,1/6] uapi: Define the aux vector AT_MINSIGSTKSZ

Message ID 20210227165911.32757-2-chang.seok.bae@intel.com
State New
Headers show
Series x86: Improve Minimum Alternate Stack Size | expand

Commit Message

Chang S. Bae Feb. 27, 2021, 4:59 p.m. UTC
Define the AT_MINSIGSTKSZ in generic Linux. It is already used as generic
ABI in glibc's generic elf.h, and this define will prevent future namespace
conflicts. In particular, x86 is also using 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 v5:
* Reverted the arm64 change. (Dave Martin)
* Massaged the changelog.

Change from v4:
* Added as a new patch (Carlos O'Donell)
---
 include/uapi/linux/auxvec.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Borislav Petkov March 1, 2021, 7:09 p.m. UTC | #1
On Sat, Feb 27, 2021 at 08:59:06AM -0800, Chang S. Bae wrote:
> Define the AT_MINSIGSTKSZ in generic Linux. It is already used as generic
> ABI in glibc's generic elf.h, and this define will prevent future namespace
> conflicts. In particular, x86 is also using 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 v5:
> * Reverted the arm64 change. (Dave Martin)
> * Massaged the changelog.
> 
> Change from v4:
> * Added as a new patch (Carlos O'Donell)
> ---
>  include/uapi/linux/auxvec.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h
> index abe5f2b6581b..15be98c75174 100644
> --- a/include/uapi/linux/auxvec.h
> +++ b/include/uapi/linux/auxvec.h
> @@ -33,5 +33,8 @@
>  
>  #define AT_EXECFN  31	/* filename of program */
>  
> +#ifndef AT_MINSIGSTKSZ
> +#define AT_MINSIGSTKSZ	51	/* stack needed for signal delivery  */

I know glibc's comment says a similar thing but the correct thing to say
here should be "minimal stack size for signal delivery" or so. Even the
variable name alludes to that too.
develop--- via Libc-alpha March 10, 2021, 4:31 p.m. UTC | #2
On Mar 1, 2021, at 11:09, Borislav Petkov <bp@suse.de> wrote:
> On Sat, Feb 27, 2021 at 08:59:06AM -0800, Chang S. Bae wrote:
>> 
>> diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h
>> index abe5f2b6581b..15be98c75174 100644
>> --- a/include/uapi/linux/auxvec.h
>> +++ b/include/uapi/linux/auxvec.h
>> @@ -33,5 +33,8 @@
>> 
>> #define AT_EXECFN  31	/* filename of program */
>> 
>> +#ifndef AT_MINSIGSTKSZ
>> +#define AT_MINSIGSTKSZ	51	/* stack needed for signal delivery  */
> 
> I know glibc's comment says a similar thing but the correct thing to say
> here should be "minimal stack size for signal delivery" or so. Even the
> variable name alludes to that too.

Yeah, you’re right.

Thanks,
Chang
diff mbox series

Patch

diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h
index abe5f2b6581b..15be98c75174 100644
--- a/include/uapi/linux/auxvec.h
+++ b/include/uapi/linux/auxvec.h
@@ -33,5 +33,8 @@ 
 
 #define AT_EXECFN  31	/* filename of program */
 
+#ifndef AT_MINSIGSTKSZ
+#define AT_MINSIGSTKSZ	51	/* stack needed for signal delivery  */
+#endif
 
 #endif /* _UAPI_LINUX_AUXVEC_H */