Re: [PATCH v3] docs: deprecated.rst: Clarify open-coded arithmetic with literals

From: Jonathan Corbet
Date: Tue Oct 26 2021 - 11:44:18 EST


Len Baker <len.baker@xxxxxxx> writes:

> Although using literals for size calculation in allocator arguments may
> be harmless due to compiler warnings in case of overflows, it is better
> to refactor the code to avoid the use of open-coded arithmetic.
>
> So, clarify the preferred way in these cases.
>
> Suggested-by: Kees Cook <keescook@xxxxxxxxxxxx>
> Signed-off-by: Len Baker <len.baker@xxxxxxx>
> ---
> Changelog v1 -> v2
> - Clarify the sentence by changing "keep <foo> out" with "avoid <foo>"
> (Joe Perches).
>
> Changelog v2 -> v3
> - Reword the sentence to comunicate better (Jonathan Corbet).
>
> The previous version can be found here [1].
>
> [1] https://lore.kernel.org/linux-hardening/20210829144716.2931-1-len.baker@xxxxxxx/

Applied, thanks.

jon