Thread (1 message) 1 message, 1 author, 2023-08-18

Re: [PATCH v2] creds: Convert cred.usage to refcount_t

From: Eric W. Biederman <hidden>
Date: 2023-08-18 21:08:43
Also in: linux-hardening, linux-nfs, lkml

Kees Cook [off-list ref] writes:
On Fri, Aug 18, 2023 at 04:10:49PM -0400, Jeff Layton wrote:
quoted
[...]
extra checks (supposedly) compile down to nothing. It should be possible
to build alternate refcount_t handling functions that are just wrappers
around atomic_t with no extra checks, for folks who want to really run
"fast and loose".
No -- there's no benefit for this. We already did all this work years
ago with the fast vs full break-down. All that got tossed out since it
didn't matter. We did all the performance benchmarking and there was no
meaningful difference -- refcount _is_ atomic with an added check that
is branch-predicted away. Peter Zijlstra and Will Deacon spent a lot of
time making it run smoothly. :)
Since you did all of the work should the text size of be growing by a
kilobyte for this change?

Is that expected?

That is a valid concern with this change and it really should be
justified in the change long as someone brought it up.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help