Message ID | 20210203172242.29644-2-chang.seok.bae@intel.com |
---|---|
State | Not applicable |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7553B39AF1B5; Wed, 3 Feb 2021 17:27:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7553B39AF1B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612373245; bh=L0MN1l+8a3RIcGAXMgIVC1smd5zKa+4fNO7cB4W9888=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=sIEMIWPiZ98glgLExfyETnNYEjhiKOV7DoET07/UgOFHr1+ZQWJVKXAEVkWyU8XiJ pZl2d5nys04/nWIMk99ObybrxW5pU2T2o/gmQq0T8tyhMUjoI2Ae2uTVQSqzKsLDuQ QBFOA8MmC1g64LCQBiDqeDnNA5DD44rcXl82O81M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by sourceware.org (Postfix) with ESMTPS id F1BCE3950409 for <libc-alpha@sourceware.org>; Wed, 3 Feb 2021 17:27:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F1BCE3950409 IronPort-SDR: QSyV3AH17tuizjB69FLeh6XfmvJbc0DDPzTvUkrbdpiVeLAZqxMnN2YT6Pdiz+iFkeeyauuPwv xN0Bvw3ZcEOA== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="180310467" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="180310467" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 09:27:21 -0800 IronPort-SDR: Zai1BmQvbq3jyby+nkQruNCl9QuP/uC4qAGcVTVQo34i1MgpLZsnPeBoV6Ssqizf3Lw9tsF2t2 HeiWMdRh3u1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="406723661" Received: from chang-linux-3.sc.intel.com ([172.25.66.175]) by fmsmga004.fm.intel.com with ESMTP; 03 Feb 2021 09:27:20 -0800 To: bp@suse.de, tglx@linutronix.de, mingo@kernel.org, luto@kernel.org, x86@kernel.org Subject: [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi Date: Wed, 3 Feb 2021 09:22:38 -0800 Message-Id: <20210203172242.29644-2-chang.seok.bae@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210203172242.29644-1-chang.seok.bae@intel.com> References: <20210203172242.29644-1-chang.seok.bae@intel.com> X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, UNWANTED_LANGUAGE_BODY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: "Chang S. Bae via Libc-alpha" <libc-alpha@sourceware.org> Reply-To: "Chang S. Bae" <chang.seok.bae@intel.com> Cc: linux-arch@vger.kernel.org, len.brown@intel.com, tony.luck@intel.com, libc-alpha@sourceware.org, ravi.v.shankar@intel.com, chang.seok.bae@intel.com, jannh@google.com, linux-kernel@vger.kernel.org, dave.hansen@intel.com, linux-api@vger.kernel.org, Dave.Martin@arm.com, linux-arm-kernel@lists.infradead.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
x86: Improve Minimum Alternate Stack Size
|
|
Commit Message
Chang S. Bae
Feb. 3, 2021, 5:22 p.m. UTC
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(-)
Comments
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
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
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 */