Re: [PATCH v2 12/39] x86/ibt,ftrace: Search for __fentry__ location

From: Steven Rostedt
Date: Thu Feb 24 2022 - 17:51:59 EST


On Thu, 24 Feb 2022 14:46:31 -0800
Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:

> > > > > + rec = lookup_rec(ip - offset, (ip - offset) + size);
>
> If 'offset' is zero then why the math here? ^^^^^^^^^^^ ^^^^^^^^^^^

Because it didn't check for offset being zero when we wrote that line. ;-)

Yes, checking for !offset makes that logic irrelevant.

Good catch.

-- Steve