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: <5d517282-9dfe-5508-8dbc-a20f862245e1@intel.com>
Date:   Fri, 16 Jun 2023 09:18:28 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jordy Zomer <jordyzomer@...gle.com>, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org
Cc:     corbet@....net, dave.hansen@...ux.intel.com, daniel@...earbox.net,
        tglx@...utronix.de, rdunlap@...radead.org,
        pawan.kumar.gupta@...ux.intel.com
Subject: Re: [PATCH 1/1] nospec: Add documentation for array_index_nospec

On 6/16/23 06:37, Jordy Zomer wrote:
> array_index_nospec() should only be used if the upper boundary is a built
> time constant. Otherwise the boundary could be speculated on as well.
> While it might be more difficult to control two loads, it doesn't rule
> out the problem. Adding this to the documentation so people won't mis-use
> it instead of barrier_nospec().

Then shouldn't we be using __builtin_constant_p() to enforce this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ