lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160920141902.qgz7efgdzanpqsys@treble>
Date:   Tue, 20 Sep 2016 09:19:03 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [INFO] ratio of const vs dynamic usercopy

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ