Re: [PATCH v3 09/19] unwind: Introduce sframe user space unwinding

From: Josh Poimboeuf
Date: Wed Nov 13 2024 - 16:17:14 EST


On Wed, Nov 13, 2024 at 03:50:40PM -0500, Steven Rostedt wrote:
> On Thu, 7 Nov 2024 17:59:08 +0100
> Jens Remus <jremus@xxxxxxxxxxxxx> wrote:
>
> > On 28.10.2024 22:47, Josh Poimboeuf wrote:
> > ...
> > > diff --git a/kernel/unwind/sframe.c b/kernel/unwind/sframe.c
> > ...
> > > +static int find_fde(struct sframe_section *sec, unsigned long ip,
> > > + struct sframe_fde *fde)
> > > +{
> > > + struct sframe_fde __user *first, *last, *found = NULL;
> > > + u32 ip_off, func_off_low = 0, func_off_high = -1;
> > > +
> > > + ip_off = ip - sec->sframe_addr;
> > > +
> > > + first = (void __user *)sec->fdes_addr;
> > > + last = first + sec->fdes_nr;
> >
> > Could it be that this needs to be:
> >
> > last = first + sec->fdes_nr - 1;
>
> Yep, I discovered the same issue.

Indeed, thanks.

--
Josh