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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 Aug 2016 16:08:42 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Kees Cook <keescook@...omium.org>,
        "H . Peter Anvin" <hpa@...or.com>,
        Nilay Vaish <nilayvaish@...il.com>,
        the arch/x86 maintainers <x86@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Brian Gerst <brgerst@...il.com>,
        Byungchul Park <byungchul.park@....com>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v4 54/57] x86/mm: convert arch_within_stack_frames() to
 use the new unwinder

On Tue, Aug 23, 2016 at 01:31:20PM -0700, Andy Lutomirski wrote:
> On Aug 23, 2016 12:11 AM, "Linus Torvalds"
> So the fact that this seems to have any significant effect on
> performance suggests to me that it's being run unnecessarily

Yeah, I think check_object_size() is being run unnecessarily in a lot of
cases.  Calling it only when size is non-const would probably speed
things up a lot.

> or that somehow we're walking all the way to the top of the stack in
> cases where we shouldn't have done so.

I know that's not happening because this code would print a warning.

> Josh, can you see an example call site in a profile of your test to
> find out what this code is doing?

I can try to figure it out tomorrow.  But really it doesn't surprise me
much that this patch makes arch_within_stack_frames() an order of
magnitude slower.  The original code was very simple, whereas
__unwind_start() and unwind_next_frame() have a lot more code.

-- 
Josh

Powered by blists - more mailing lists