lkml.org 
[lkml]   [2016]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [INFO] ratio of const vs dynamic usercopy
On Tue, Sep 20, 2016 at 5:31 PM, Kees Cook <keescook@chromium.org> wrote:
>
> trace-cmd seemed to break for me (lost one of the CPU buffers?), so I
> just did this manually:
>
> # echo __skip_check_object_size > set_ftrace_filter
> # echo __check_object_size >> set_ftrace_filter
> # echo 1 > function_profile_enabled
> ... build the kernel 5 times ...

I suspect other loads will give possibly radically different numbers.

I like the kernel build as a benchmark, but at the same time I have to
admit that it's fairly specific. It tends to do mostly some fairly
simple filesystem stuff.

It would be interesting to see what the most common direct callchains
for the object size check is, though. Maybe there's only one or two
really common cases (the page cache copies for read/write? I dunno)
Maybe if we special-case those, that cuts down on the dynamic cases a
lot.

And obviously the reason it would be good to make that size check as
uncommon as possible is that obviously once it's not a very common
case, that makes it much more valid to enable this all by default
and/or make more expensive checks.

Linus

\
 
 \ /
  Last update: 2016-09-21 03:01    [W:0.266 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site