lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210524120959.GB14913@willie-the-truck>
Date:   Mon, 24 May 2021 13:09:59 +0100
From:   Will Deacon <will@...nel.org>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org, Marc Zyngier <maz@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Qais Yousef <qais.yousef@....com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Quentin Perret <qperret@...gle.com>, Tejun Heo <tj@...nel.org>,
        Li Zefan <lizefan@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>, kernel-team@...roid.com
Subject: Re: [PATCH v6 02/21] arm64: Allow mismatched 32-bit EL0 support

On Fri, May 21, 2021 at 11:41:56AM +0100, Catalin Marinas wrote:
> On Tue, May 18, 2021 at 10:47:06AM +0100, Will Deacon wrote:
> > +static int enable_mismatched_32bit_el0(unsigned int cpu)
> > +{
> > +	struct cpuinfo_arm64 *info = &per_cpu(cpu_data, cpu);
> > +	bool cpu_32bit = id_aa64pfr0_32bit_el0(info->reg_id_aa64pfr0);
> > +
> > +	if (cpu_32bit) {
> > +		cpumask_set_cpu(cpu, cpu_32bit_el0_mask);
> > +		static_branch_enable_cpuslocked(&arm64_mismatched_32bit_el0);
> 
> It may be worth only calling static_branch_enable_cpuslocked() if not
> already set, in case you try this on a system with lots of CPUs.

static_key_enable_cpuslocked() already checks this early on, so I don't
think we need another check here (note that we're not calling stop_machine()
here _anyway_; the '_cpuslocked' suffix just says that we're already holding
cpu_hotplug_lock via the notifier).

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ