linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andrea della Porta <aporta@suse.de>
To: Will Deacon <will@kernel.org>
Cc: Andrea della Porta <andrea.porta@suse.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, nik.borisov@suse.com,
	arnd@arndb.de, keescook@chromium.org
Subject: Re: [PATCH 0/4] arm64: Make Aarch32 compatibility enablement optional at boot
Date: Thu, 19 Oct 2023 11:17:00 +0200	[thread overview]
Message-ID: <ZTD0DAes-J-YQ2eu@apocalypse> (raw)
In-Reply-To: <20231018122729.GA18556@willie-the-truck>

On 13:27 Wed 18 Oct     , Will Deacon wrote:
> Hi,
> 
> On Wed, Oct 18, 2023 at 01:13:18PM +0200, Andrea della Porta wrote:
> > Aarch32 compatibility mode is enabled at compile time through
> > CONFIG_COMPAT Kconfig option. This patchset lets 32-bit support
> > (for both processes and syscalls) be enabled at boot time using
> > a kernel parameter. Also, it provides a mean for distributions 
> > to set their own default without sacrificing compatibility support,
> > that is users can override default behaviour through the kernel
> > parameter.
> 
> I proposed something similar in the past:
> 
> https://lkml.kernel.org/linux-fsdevel/20210916131816.8841-1-will@kernel.org/
> 
> bu the conclusion there (see the reply from Kees) was that it was better
> to either use existing seccomp mechanisms or add something to control
> which binfmts can be loaded.
> 
> Will

I see. Seccomp sounds like a really good idea, since just blocking the compat
binfmt would not avoid the call to 32-bit syscalls per se: it's true that
ARM64 enforce the transition from A64 to A32 only on exception return and
PSTATE.nRW flag can change only from EL1, maybe though some exploitation
may arise in the future to do just that (I'm not aware of any or come up
with a proof off the top of my head, but I can't exclude it either). So,
assuming by absurd a switch to A32 is feasible, the further step of embedding
A32 instruction in a A64 ELF executable is a breeze. Hence blocking the 
syscall (and not only the binfmt loading) could prove necessary. I know all
of this is higly speculative right now, maybe it's worth thinking nonetheless.

Andrea

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-10-19  9:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 11:13 [PATCH 0/4] arm64: Make Aarch32 compatibility enablement optional at boot Andrea della Porta
2023-10-18 11:13 ` [PATCH 1/4] arm64: Introduce aarch32_enabled() Andrea della Porta
2023-10-18 11:13 ` [PATCH 2/4] arm64/process: Make loading of 32bit processes depend on aarch32_enabled() Andrea della Porta
2023-10-18 12:52   ` Mark Rutland
2023-10-19 12:38     ` Andrea della Porta
2023-10-19 14:27       ` Mark Rutland
2023-10-19 14:32         ` Andrea della Porta
2023-10-19 14:50           ` Mark Rutland, Will Deacon
2023-10-18 11:13 ` [PATCH 3/4] arm64/entry-common: Make Aarch32 syscalls' availability " Andrea della Porta
2023-10-18 12:57   ` Mark Rutland
2023-10-19 12:48     ` Andrea della Porta
2023-10-22 20:30   ` kernel test robot
2023-10-18 11:13 ` [PATCH 4/4] arm64: Make Aarch32 emulation boot time configurable Andrea della Porta
2023-10-18 13:02   ` Mark Rutland
2023-10-19 12:50     ` Andrea della Porta
2023-10-18 12:27 ` [PATCH 0/4] arm64: Make Aarch32 compatibility enablement optional at boot Will Deacon
2023-10-18 12:44   ` Arnd Bergmann
2023-10-19 10:52     ` Andrea della Porta
2023-10-19 11:41       ` Arnd Bergmann
2023-10-19  9:17   ` Andrea della Porta [this message]
2023-10-18 12:52 ` Mark Rutland
2023-10-19 12:34   ` Andrea della Porta

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=ZTD0DAes-J-YQ2eu@apocalypse \
    --to=aporta@suse.de \
    --cc=andrea.porta@suse.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nik.borisov@suse.com \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).