Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487747

Re: [INFO] ratio of const vs dynamic usercopy

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [INFO] ratio of const vs dynamic usercopy
Date 2016-09-21 03:10 +0200
Message-ID <sjEcV-2eq-5@gated-at.bofh.it> (permalink)
References <sjljX-6Og-3@gated-at.bofh.it> <sju3T-43v-13@gated-at.bofh.it> <sjDJT-1PH-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[INFO] ratio of const vs dynamic usercopy Kees Cook <keescook@chromium.org> - 2016-09-20 07:00 +0200
  Re: [INFO] ratio of const vs dynamic usercopy kbuild test robot <lkp@intel.com> - 2016-09-20 08:00 +0200
    Re: [INFO] ratio of const vs dynamic usercopy Kees Cook <keescook@chromium.org> - 2016-09-21 01:20 +0200
      Re: [INFO] ratio of const vs dynamic usercopy Fengguang Wu <lkp@intel.com> - 2016-09-21 04:40 +0200
        Re: [INFO] ratio of const vs dynamic usercopy Kees Cook <keescook@chromium.org> - 2016-09-21 04:50 +0200
  Re: [INFO] ratio of const vs dynamic usercopy Josh Poimboeuf <jpoimboe@redhat.com> - 2016-09-20 16:20 +0200
    Re: [INFO] ratio of const vs dynamic usercopy Kees Cook <keescook@chromium.org> - 2016-09-21 02:40 +0200
      Re: [INFO] ratio of const vs dynamic usercopy Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-21 03:10 +0200
  Re: [INFO] ratio of const vs dynamic usercopy kbuild test robot <lkp@intel.com> - 2016-09-21 07:40 +0200

csiph-web