hardening and other opts in kernel config used for benchmarking?
From: Mateusz Guzik
Date: Tue Aug 08 2023 - 12:39:07 EST
Hello,
I have no idea who should be in To: or Cc:, I grabbed names from an
e-mail I got regarding one of previous changes.
Recently I benchmarked a change which added unconditional file
position locking and found a minor regression from it (with profiler
output to justify it):
https://lore.kernel.org/linux-fsdevel/CAHk-=whJtLkYwEFTS9LcRiMjSqq_xswDeXo7hYNWT0Em6nL4Sw@xxxxxxxxxxxxxx/T/#m7c0cd6e913c6295732daea3c88f502bd4724ffb3
However, according to Christian the change was benchmarked by your
machinery and no difference was found.
I briefly poked around and found that used configs have:
CONFIG_RANDOMIZE_KSTACK_OFFSET=y
This is an optional and very expensive hardening feature, my question
is if it was enabled on purpose. The cost comes from adding rdtsc to
every syscall.
Looking at the rest of the config you have a mixed bag (e.g., hardened
usercopy but *no* init_on_alloc) so I genuinely don't know.
Given the high cost of the opt I would suggest removing it, as it
avoidably muddles the waters for single-threaded changes (one way or
the other -- slowdowns can hide and speed ups go unnoticed).
I did not review the whole config.
Any comments? :)
Thanks,
--
Mateusz Guzik <mjguzik gmail.com>