lkml.org 
[lkml]   [2019]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 6/9] x86/bpf: Fix JIT frame pointer usage
    On Fri, Jun 14, 2019 at 10:50:23AM +0000, David Laight wrote:
    > On Thu, Jun 13, 2019 at 08:21:03AM -0500, Josh Poimboeuf wrote:
    > > The BPF JIT code clobbers RBP. This breaks frame pointer convention and
    > > thus prevents the FP unwinder from unwinding through JIT generated code.
    > >
    > > RBP is currently used as the BPF stack frame pointer register. The
    > > actual register used is opaque to the user, as long as it's a
    > > callee-saved register. Change it to use R12 instead.
    >
    > Could you maintain the system %rbp chain through the BPF stack?

    Do you mean to save RBP again before changing it again, so that we
    create another stack frame inside the BPF stack? That might work.

    > It might even be possible to put something relevant in the %rip
    > location.

    I'm not sure what you mean here.

    --
    Josh

    \
     
     \ /
      Last update: 2019-06-14 15:44    [W:2.193 / U:0.520 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site