lkml.org 
[lkml]   [2019]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch V2 28/29] x86/irq/64: Remap the IRQ stack with guard pages
    On Mon, Apr 08, 2019 at 09:18:00AM -0700, Andy Lutomirski wrote:
    > On Sun, Apr 7, 2019 at 11:46 PM Thomas Gleixner <tglx@linutronix.de> wrote:
    > >
    > > On Sun, 7 Apr 2019, Andy Lutomirski wrote:
    > > > On Sun, Apr 7, 2019 at 3:44 PM Thomas Gleixner <tglx@linutronix.de> wrote:
    > > > > Actually we have: save_stack_trace()
    > > > >
    > > >
    > > > Like I did here:
    > > >
    > > > https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h=WIP.x86/stackguards
    > >
    > > Kinda, but what that code wants is to skip any entry before 'caller'. So we
    > > either add something like save_stack_trace_from() which is trivial on x86
    > > because unwind_start() already has an argument to hand in the start of
    > > stack or we filter out the entries up to 'caller' in that code.
    > >
    > >
    >
    > Whoops!
    >
    > I could add a save_stack_trace_from() or I could add a "caller"
    > argument to struct stack_trace. Any preference as to which looks
    > better? The latter seems a little nicer to me.

    The current official way to do that is to use the stack_trace "skip"
    field. That's a hack though because it relies on inlining decisions.

    It would be nicer if the skip interface were pointer-based like your
    suggestion.

    --
    Josh

    \
     
     \ /
      Last update: 2019-04-08 18:36    [W:3.895 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site