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


Groups > linux.kernel > #1695982

Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf)

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf)
Date 2017-07-25 20:00 +0200
Message-ID <u7chI-5RB-17@gated-at.bofh.it> (permalink)
References (1 earlier) <u2lbX-5M9-1@gated-at.bofh.it> <u2r7H-140-3@gated-at.bofh.it> <u2vuG-3Ri-15@gated-at.bofh.it> <u3cpY-6uA-5@gated-at.bofh.it> <u740O-So-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[ Adding Kees to CC for the hardened usercopy discussion. ]

Kees, FYI: frame pointers may be disabled by default on x86 relatively
soon (presumably weeks or months) in favor of the ORC unwinder.  So the
hardened usercopy stack walk will no longer work as advertised.

Using the ORC unwinder for hardened usercopy would probably be pretty
bad performance-wise.  I'm not sure what else could be done.  Ingo did
have a few ideas for sanity checks:

On Tue, Jul 25, 2017 at 11:09:44AM +0200, Ingo Molnar wrote:
> > > > Well, on x86, hardened usercopy relies on frame pointers, but not the
> > > > unwinder.  It does the frame pointer walk manually to avoid the full
> > > > unwinder overhead.  See arch_within_stack_frames().
> 
> BTW., I think this aspect of the hardened user-copy is crazy stuff - there can be 
> many stack frames, and this adds a serious amount of overhead even with frame 
> pointers...
> 
> I think the current behavior is fine: if frame pointers are disabled then 
> arch_within_stack_frames() returns NOT_STACK. Maybe it could do a few sanity 
> checks: we do know the kernel stack range and we could check alignment as well.

I believe it checks the kernel stack range already in
check_stack_object() before deciding whether to call
arch_within_stack_frames().  It also has an overlapping stack check.

-- 
Josh

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


Thread

Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) Ingo Molnar <mingo@kernel.org> - 2017-07-25 11:10 +0200
  Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-25 20:00 +0200
    Re: [PATCH v3 00/10] x86: ORC unwinder (previously undwarf) Kees Cook <keescook@chromium.org> - 2017-07-25 20:50 +0200

csiph-web