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] [day] [month] [year] [list]
Message-ID: <89806be0-c95d-4a85-a8da-a253aea68093@arm.com>
Date: Fri, 20 Sep 2024 14:57:25 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Dave Hansen <dave.hansen@...el.com>, linux-mm@...ck.org,
 akpm@...ux-foundation.org
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
 Palmer Dabbelt <palmer@...belt.com>, Thomas Gleixner <tglx@...utronix.de>,
 Dave Hansen <dave.hansen@...ux.intel.com>,
 David Hildenbrand <david@...hat.com>, Ryan Roberts <ryan.roberts@....com>,
 x86@...nel.org, linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Move set_pxd_safe() helpers from generic to platform



On 9/20/24 14:22, Dave Hansen wrote:
> On 9/19/24 23:42, Anshuman Khandual wrote:
>>> I just did a quick grep and don't see any difference between the _safe
>>> and normal variants.  A quick grep didn't turn up any actual users.
>>>
>>> Did anyone actually double check that these are still needed on x86 in
>>> the first place?
>> arch/x86/mm/init_64.c
> 
> Ahh, the #defines make them immune to grep. :)
> 
> Long-term, we should make sure these are still necessary.  Short term

Agreed, David H has also mentioned about that.

> (in this patch), please just put the #defines in init_64.c if it is the
> only site that needs them.

That is not the only site where they get used. set_pmd/pud/p4d/pgd_safe()
are also called from respective pmd/pud/p4d/pgd_populate_safe() helpers
in the header arch/x86/include/asm/pgalloc.h.

Besides also hit a road block in converting these macros as static inline
functions as suggested by David H earlier, because pmd/pud/p4d/pgd_same()
macros are defined in include/linux/pgtable.h, way after <asm/pgtable.h>
gets included.

I guess we will have just leave these macros is in arch/x86/include/asm/pgtable.h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ