[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d618e76-5eab-4e4f-90af-18501c0f9035@gmail.com>
Date: Fri, 27 Jun 2025 17:47:27 +0100
From: "Colin King (gmail)" <colin.i.king@...il.com>
To: Kees Cook <kees@...nel.org>
Cc: linux-hardening@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] fortify: add branch hints on unlikely fortify_panic
paths
On 27/06/2025 17:36, Kees Cook wrote:
> On Wed, Jun 25, 2025 at 05:12:20PM +0100, Colin Ian King wrote:
>> Analysis with gcov while running the stress-ng urandom stressor
>> shows that there are a couple of fortify panic paths that are highly
>> unlikely to be executed for well-behaving code. Adding appropriate
>> branch hints improves the stress-ng urandom stressor my a small
>> but statistically measureable amount. Ran 100 x 1 minute tests and
>> measured the stressor bogo-op rates on a Debian based Intel(R)
>> Core(TM) Ultra 9 285K with a 6.15 kernel with turbo disabled to
>> reduce jitter.
>>
>> Results based on a Geometic Mean of 100 tests:
>>
>> Without patch: 50512.95 bogo-ops/sec
>> With patch: 50819.58 bogo-ops/sec
>>
>> %Std.Deviation of ~0.18%, so low jitter in results, improvement of ~0.6%
>>
>> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
>
> Nice find! It seems some ftrace configs are unhappy with this change,
> though?
I'll resend once I get some time to figure out the issues with the
ftrace configs
Colin
>
> -Kees
>
Download attachment "OpenPGP_0x68C287DFC6A80226.asc" of type "application/pgp-keys" (4825 bytes)
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (841 bytes)
Powered by blists - more mailing lists