[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABjM8Zc8H22YVJcHvPS0rROowYC_fhAikJ_dcevA6pr1G7=mDA@mail.gmail.com>
Date: Fri, 16 Jun 2023 20:46:58 +0200
From: Jordy Zomer <jordyzomer@...gle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
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
Thanks both, I was planning on doing some plumbing next week to fix the
already affected calls and then add a BUILD_BUG_ON() in combination with
__builtin_constant_p() to prevent misuse from happening in the future. In
addition I'll send a V2 next week to fix the spelling/wording issue.
Cheers,
Jordy
On Fri, Jun 16, 2023 at 8:05 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Fri, Jun 16, 2023 at 01:37:35PM +0000, Jordy Zomer wrote:
> > +Please note that this function should only be used if the upper
> > +boundary is a built-time constant, otherwise this could be
> > +speculated on as well. If this is not the case please refer to
> > +barrier_nospec().
>
> "build time", not "built time". Also, "Please note that" doesn't
> really add any value. You can just write:
>
> This function should only be used if the upper boundary is a build-time
> constant, otherwise this could be speculated on as well. If it is not
> a constant, use barrier_nospec() instead.
>
Powered by blists - more mailing lists