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: <6594fc22-e99e-ee5e-c3ea-fb522e510b46@redhat.com>
Date:   Thu, 3 Jun 2021 11:45:10 +0200
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Will Deacon <will@...nel.org>, linux-arm-kernel@...ts.infradead.org
Cc:     linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        Catalin Marinas <catalin.marinas@....com>,
        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>,
        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>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Valentin Schneider <valentin.schneider@....com>,
        kernel-team@...roid.com
Subject: Re: [PATCH v8 14/19] arm64: exec: Adjust affinity for compat tasks
 with mismatched 32-bit EL0

On 6/2/21 6:47 PM, Will Deacon wrote:
> When exec'ing a 32-bit task on a system with mismatched support for
> 32-bit EL0, try to ensure that it starts life on a CPU that can actually
> run it.
> 
> Similarly, when exec'ing a 64-bit task on such a system, try to restore
> the old affinity mask if it was previously restricted.
> 
> Reviewed-by: Quentin Perret <qperret@...gle.com>
> Signed-off-by: Will Deacon <will@...nel.org>
> ---

[...]

>  
> +#ifdef CONFIG_COMPAT
> +int compat_elf_check_arch(const struct elf32_hdr *hdr)
> +{
> +	if (!system_supports_32bit_el0())
> +		return false;
> +
> +	if ((hdr)->e_machine != EM_ARM)
> +		return false;
> +
> +	if (!((hdr)->e_flags & EF_ARM_EABI_MASK))
> +		return false;
> +
> +	/*
> +	 * Prevent execve() of a 32-bit program from a deadline task
> +	 * if the restricted affinity mask would be inadmissible on an
> +	 * asymmetric system.
> +	 */
> +	return !static_branch_unlikely(&arm64_mismatched_32bit_el0) ||
> +	       task_cpus_dl_admissible(current, system_32bit_el0_cpumask());
> +}
> +#endif

>From the DL perspective:

Reviewed-by: Daniel Bristot de Oliveira <bristot@...hat.com>

Thanks!
-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ