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: <e42524f9-87ef-47f4-9c79-bc06b4d71a58@intel.com>
Date:   Wed, 15 Nov 2023 12:48:58 -0800
From:   Dave Hansen <dave.hansen@...el.com>
To:     Michael Roth <michael.roth@....com>, x86@...nel.org
Cc:     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>,
        Tom Lendacky <thomas.lendacky@....com>,
        Joerg Roedel <jroedel@...e.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] x86: Ensure input to pfn_to_kaddr() is treated as a
 64-bit type

On 11/15/23 12:14, Michael Roth wrote:
> While it might be argued that the issue is on the caller side, other
> archs/macros have taken similar approaches to deal with instances like
> this, such as commit e48866647b48 ("ARM: 8396/1: use phys_addr_t in
> pfn_to_kaddr()").

Gah, I really hope nobody is arguing that for real, or is even thinking
about this as a valid argument.

The helper should, well, help the caller.  It makes zero sense to me
that every single call site would need to know if the argument's type
was big enough to hold the _return_ value.  This nonsense can only even
happen with macros.  Type promotion would just do the right thing for
any sanely declared actual helper function.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ