Re: [PATCH 1/1] nospec: Add documentation for array_index_nospec

From: Matthew Wilcox
Date: Fri Jun 16 2023 - 14:05:29 EST


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.