overflow: Adjust check_*_overflow() kern-doc to reflect results
authorKees Cook <keescook@chromium.org>
Mon, 29 Jan 2024 18:21:58 +0000 (10:21 -0800)
committerKees Cook <keescook@chromium.org>
Thu, 29 Feb 2024 21:38:01 +0000 (13:38 -0800)
commit3e19086fb5a9079611de426e8cb2f4503e28757e
treecd6e2d20f3e76522542aee1f9b8799362d30c27e
parentadeb04362d74188c1e22ccb824b15a0a7b3de2f4
overflow: Adjust check_*_overflow() kern-doc to reflect results

The check_*_overflow() helpers will return results with potentially
wrapped-around values. These values have always been checked by the
selftests, so avoid the confusing language in the kern-doc. The idea of
"safe for use" was relative to the expectation of whether or not the
caller wants a wrapped value -- the calculation itself will always follow
arithmetic wrapping rules.

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/overflow.h