All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Kees Cook <kees@kernel.org>
Cc: linux-hardening@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] fortify: add branch hints on unlikely fortify_panic paths
Date: Fri, 27 Jun 2025 17:47:27 +0100	[thread overview]
Message-ID: <7d618e76-5eab-4e4f-90af-18501c0f9035@gmail.com> (raw)
In-Reply-To: <202506270935.283087E22D@keescook>


[-- Attachment #1.1.1: Type: text/plain, Size: 1099 bytes --]

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@gmail.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
> 


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 4901 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2025-06-27 16:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25 16:12 [PATCH][next] fortify: add branch hints on unlikely fortify_panic paths Colin Ian King
2025-06-27  0:14 ` kernel test robot
2025-06-27  1:05 ` kernel test robot
2025-06-27 16:36 ` Kees Cook
2025-06-27 16:47   ` Colin King (gmail) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d618e76-5eab-4e4f-90af-18501c0f9035@gmail.com \
    --to=colin.i.king@gmail.com \
    --cc=kees@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.