From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [INFO] ratio of const vs dynamic usercopy
Date: Tue, 20 Sep 2016 09:19:03 -0500 [thread overview]
Message-ID: <20160920141902.qgz7efgdzanpqsys@treble> (raw)
In-Reply-To: <20160920045839.GA139098@beast>
On Mon, Sep 19, 2016 at 09:58:39PM -0700, Kees Cook wrote:
> Hi,
>
> Al had asked me a couple weeks back what the ratio of const vs dynamic
> usercopying was. With Josh's cleanup and my fix-up to only call the
> hardened usercopy when non-const, I can actually gather these statistics
> on a build. It's a bit of a hack (see attached patch that should not go
> into the tree), but with my not-very-defconfig, it's rougly 2 to 1 const
> vs dynamic. However, this doesn't take into account the frequency at
> _runtime_, which maybe could be discovered via perf comparing copy*user()
> calls to __check_object_size() calls, but I didn't try that. Does someone
> have perf setup to check this?
Maybe do something like this with your patch?
trace-cmd record -p function -l __check_object_size -l __skip_check_object_size [command you want to benchmark]
trace-cmd report
--
Josh
next prev parent reply other threads:[~2016-09-20 14:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 4:58 [INFO] ratio of const vs dynamic usercopy Kees Cook
2016-09-20 5:48 ` kbuild test robot
2016-09-20 23:17 ` Kees Cook
2016-09-21 2:31 ` Fengguang Wu
2016-09-21 2:41 ` Kees Cook
2016-09-20 14:19 ` Josh Poimboeuf [this message]
2016-09-21 0:31 ` Kees Cook
2016-09-21 1:00 ` Linus Torvalds
2016-09-21 5:36 ` kbuild test robot
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=20160920141902.qgz7efgdzanpqsys@treble \
--to=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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.