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]
Date: Mon, 1 Apr 2024 10:56:14 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Javier Pello <devel@...eo.eu>, linux-kernel@...r.kernel.org
Cc: x86@...nel.org, Thomas Gleixner <tglx@...utronix.de>,
 Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
 Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t
 to avoid split locks

On 4/1/24 09:57, Javier Pello wrote:
> -typedef u64	pteval_t;
> -typedef u64	pmdval_t;
> -typedef u64	pudval_t;
> -typedef u64	p4dval_t;
> -typedef u64	pgdval_t;
> -typedef u64	pgprotval_t;
> +/*
> + * Variables of these types are subject to atomic compare-and-exchange
> + * operations, so they have to be properly aligned to avoid split locks.
> + */
> +typedef u64	pteval_t	__aligned(8);
> +typedef u64	pmdval_t	__aligned(8);
> +typedef u64	pudval_t	__aligned(8);
> +typedef u64	p4dval_t	__aligned(8);
> +typedef u64	pgdval_t	__aligned(8);
> +typedef u64	pgprotval_t	__aligned(8);

First of all, how is it that you're running a PAE kernel on new, 64-bit
hardware?  That's rather odd.

The case that you're hitting is actually an on-stack pmd_t.  The fun
part is that it's not shared and doesn't even _need_ atomics.  I think
it's just using pmd_populate() because it's convenient.

I'd honestly much rather just disable split lock support in 32-bit
builds than mess with this stuff.  You really shouldn't be running
32-but kernels on this hardware.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ