public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: John Stultz <jstultz@google.com>,
	patches@armlinux.org.uk, linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org,
	Neill Kapron <nkapron@google.com>
Subject: Re: [PATCH] ARM: fix get_user() broken with veneer
Date: Tue, 23 Jul 2024 15:15:56 +0200	[thread overview]
Message-ID: <2024072348-perfectly-duct-e0aa@gregkh> (raw)
In-Reply-To: <CAK7LNAT3WQ+3K+Z=ueZ4f_1EF29aPui-HS2eV3erSb9rHJSPLA@mail.gmail.com>

On Fri, Jul 19, 2024 at 12:04:39PM +0900, Masahiro Yamada wrote:
> On Fri, Jul 19, 2024 at 2:10 AM John Stultz <jstultz@google.com> wrote:
> >
> > On Tue, Sep 26, 2023 at 9:09 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > The 32-bit ARM kernel stops working if the kernel grows to the point
> > > where veneers for __get_user_* are created.
> > >
> > > AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a
> > > scratch register between a routine and any subroutine it calls. It
> > > can also be used within a routine to hold intermediate values between
> > > subroutine calls."
> > >
> > > However, bl instructions buried within the inline asm are unpredictable
> > > for compilers; hence, "ip" must be added to the clobber list.
> > >
> > > This becomes critical when veneers for __get_user_* are created because
> > > veneers use the ip register since commit 02e541db0540 ("ARM: 8323/1:
> > > force linker to use PIC veneers").
> > >
> > > [1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst
> > >
> > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > > Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
> >
> > + stable@vger.kernel.org
> > It seems like this (commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03
> > upstream) would be a good candidate for -stable?
> 
> 
> Yes.
> 
> This one should be back-ported. Thanks.

Now queued up, thanks.

greg k-h


  reply	other threads:[~2024-07-23 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 16:09 [PATCH] ARM: fix get_user() broken with veneer Masahiro Yamada
2024-07-18 17:09 ` John Stultz
2024-07-19  3:04   ` Masahiro Yamada
2024-07-23 13:15     ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-25 11:00 Masahiro Yamada
2023-09-26 11:37 ` Ard Biesheuvel
2023-09-26 14:26   ` Masahiro Yamada
2023-09-26 15:09     ` Ard Biesheuvel

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=2024072348-perfectly-duct-e0aa@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ardb@kernel.org \
    --cc=jstultz@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=masahiroy@kernel.org \
    --cc=nkapron@google.com \
    --cc=patches@armlinux.org.uk \
    --cc=stable@vger.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