linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andrea della Porta <aporta@suse.de>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Andrea della Porta <andrea.porta@suse.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, nik.borisov@suse.com
Subject: Re: [PATCH 2/4] arm64/process: Make loading of 32bit processes depend on aarch32_enabled()
Date: Thu, 19 Oct 2023 16:32:27 +0200	[thread overview]
Message-ID: <ZTE9-4ie8R6zw9od@apocalypse> (raw)
In-Reply-To: <ZTE86PK5YJGV1xVq@FVFF77S0Q05N.cambridge.arm.com>

On 15:27 Thu 19 Oct     , Mark Rutland wrote:
> On Thu, Oct 19, 2023 at 02:38:32PM +0200, Andrea della Porta wrote:
> > On 13:52 Wed 18 Oct     , Mark Rutland wrote:
> > > On Wed, Oct 18, 2023 at 01:13:20PM +0200, Andrea della Porta wrote:
> > > > Major aspect of Aarch32 emulation is the ability to load 32bit
> > > > processes.
> > > > That's currently decided (among others) by compat_elf_check_arch().
> > > > 
> > > > Make the macro use aarch32_enabled() to decide if Aarch32 compat is
> > > > enabled before loading a 32bit process.
> > > > 
> > > > Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
> > > 
> > > Why can't you make system_supports_32bit_el0() take the option into account
> > > instead?
> > >
> > 
> > I may be wrong here, but it seems to me that system_supports_32bit_el0()
> > answers teh question "can this system supports compat execution?" rather than
> > "do I want this system to run any compat execution?". That's the point of
> > aarch32_enabled(), to state whether we want teh system to run A32 code or not,
> > regardless of the system supporting it (of course, if the system does not
> > support A32 in EL0, this is a no-no, but that's another story).
> 
> That's what the implementation does today, but we're really using it as a "do
> we intend for 32-bit EL0 to work?" predicate, and generally the
> system_supports_${FEATURE}() helpers are affected by the combination of actual
> HW support, kernel config options, *and* kernel command line options. For
> example, system_supports_sve() is affected by both CONFIG_ARM64_SVE and the
> "arm64.nosve" command line option.
> 
> Thanks,
> Mark.

Many thanks for the explanation, then inserting aach32_enabled() in
system_supports_32bit_el0() is the way to go.

Andrea

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

  reply	other threads:[~2023-10-19 14:33 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 [this message]
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
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=ZTE9-4ie8R6zw9od@apocalypse \
    --to=aporta@suse.de \
    --cc=andrea.porta@suse.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --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).