lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] objtool,ftrace: Implement UNWIND_HINT_RET_OFFSET
    On Wed, Apr 01, 2020 at 02:20:15PM -0400, Steven Rostedt wrote:
    > On Wed, 1 Apr 2020 19:45:44 +0200
    > Peter Zijlstra <peterz@infradead.org> wrote:
    >
    > > > I believe what Julien is saying is the above logic is equivalent:
    > > >
    > > > if (x != y &&
    > > > !(z && x == y + z))
    > > >
    > > > is the same as:
    > > >
    > > > if (x != y + z)
    > >
    > > It is not, the former will accept either x==y || x==y+z, while the
    > > latter will only accept x==y+z.
    >
    > No, the former accepts:
    >
    > x==y || (z && x == y + z)
    >
    > Which is the same as: x == y + z
    >
    > As the second condition is only tested if z != 0, and x == y is the same
    > as x == y + 0

    Right, so it accepts both +0 and +z, while the latter will only accept
    +z.

    ( in the iret case I had offset at +0 and stack_size at +40, while with
    the ftrace case I had both at +8; which is why I wrote the form that
    accepts +0 and +z )

    Anyway, I tested it, and for the ftrace case (the only current user of
    the hint) +z is correct for both offset and stack_size. I build both FP
    and ORC variants.

    \
     
     \ /
      Last update: 2020-04-01 22:21    [W:2.217 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site