Re: [PATCH next 2/3] fortify: Optimise strnlen()

Kees Cook
2026-03-31T23:51:27Z

On Tue, Mar 31, 2026 at 11:09:14PM +0100, David Laight wrote:
> Any uses should be replaced by __builtin_strlen().

When I looked at this before, __builtin_strlen() flip to run-time strlen
on non-constant strings, which is why I had to jump through all the
hoops to avoid calling it in those cases.

--
Kees Cook