Linux userland API discussions
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Dave Martin <Dave.Martin@arm.com>
Cc: "Chang S. Bae" <chang.seok.bae@intel.com>,
	linux-arch@vger.kernel.org, len.brown@intel.com,
	tony.luck@intel.com, libc-alpha@sourceware.org, jannh@google.com,
	ravi.v.shankar@intel.com, carlos@redhat.com, mpe@ellerman.id.au,
	hjl.tools@gmail.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, dave.hansen@intel.com,
	luto@kernel.org, linux-api@vger.kernel.org, tglx@linutronix.de,
	bp@suse.de, mingo@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 1/5] uapi: Move the aux vector AT_MINSIGSTKSZ define to uapi
Date: Fri, 12 Feb 2021 18:46:11 +0000	[thread overview]
Message-ID: <20210212184610.GA31608@willie-the-truck> (raw)
In-Reply-To: <20210204155519.GA21837@arm.com>

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

  reply	other threads:[~2021-02-12 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 17:22 [PATCH v5 0/5] x86: Improve Minimum Alternate Stack Size Chang S. Bae
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 message]
2021-02-03 17:22 ` [PATCH v5 2/5] x86/signal: Introduce helpers to get the maximum signal frame size Chang S. Bae
2021-02-03 17:22 ` [PATCH v5 3/5] x86/elf: Support a new ELF aux vector AT_MINSIGSTKSZ Chang S. Bae
2021-02-03 17:22 ` [PATCH v5 4/5] x86/signal: Detect and prevent an alternate signal stack overflow Chang S. Bae
2021-02-19  1:25   ` Andy Lutomirski
2021-02-03 17:22 ` [PATCH v5 5/5] selftest/x86/signal: Include test cases for validating sigaltstack Chang S. Bae

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210212184610.GA31608@willie-the-truck \
    --to=will@kernel.org \
    --cc=Dave.Martin@arm.com \
    --cc=bp@suse.de \
    --cc=carlos@redhat.com \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=hjl.tools@gmail.com \
    --cc=jannh@google.com \
    --cc=len.brown@intel.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox