On Mon, Apr 15, 2024 at 8:43 PM Tao Liu <l...@redhat.com> wrote:

> Hi Alexander,
>
> The patch looks good to me, so ack.
>
> Thanks,
> Tao Liu
>
> On Mon, Apr 15, 2024 at 2:41 PM Lianbo Jiang <liji...@redhat.com> wrote:
> >
> > Hi, Alexander
> >
> > Thank you for the early fix.
> >
> > On 4/10/24 22:15, devel-requ...@lists.crash-utility.osci.io wrote:
> > > Date: Wed, 10 Apr 2024 14:55:35 +0200
> > > From: Alexander Gordeev<agord...@linux.ibm.com>
> > > Subject: [Crash-utility] [PATCH] Reflect __{start,end}_init_task
> > >       kernel symbols rename
> > > To:devel@lists.crash-utility.osci.io
> > > Cc: Alexander Egorenkov<egore...@linux.ibm.com>
> > > Message-ID:<20240410125535.2891355-1-agord...@linux.ibm.com>
> > >
> > > Kernel commit 8f69cba096b5 ("x86: Rename __{start,end}_init_task to
> > > __{start,end}_init_stack") leads to failure:
> > >
> > >       crash: invalid count request: 0
> >
> > Could you please point out which command caused the current failure? or
> > failed when crash load?
> >
> >
> > Anyway, the code changes are fine to me.
> >
> >
> > Thanks
> >
> > Lianbo
> >
> > > Assume both __{start,end}_init_task and __{start,end}_init_stack
> > > symbols could exist for backward compatibility.
> > >
> > > Signed-off-by: Alexander Gordeev<agord...@linux.ibm.com>
> > > ---
> > >   task.c | 7 +++++++
> > >   1 file changed, 7 insertions(+)
> > >
>

Currently kernel commit 8f69cba096b5 is in the linux master branch.
Applied:
https://github.com/crash-utility/crash/commit/3879e9104826d5ae14a0824ec47ab60056a249a7

Thanks
Lianbo

> > diff --git a/task.c b/task.c
> > > index ebdb5be..88e1d50 100644
> > > --- a/task.c
> > > +++ b/task.c
> > > @@ -496,10 +496,17 @@ task_init(void)
> > >               ((len = SIZE(thread_union)) != STACKSIZE())) {
> > >               machdep->stacksize = len;
> > >       } else if (!VALID_SIZE(thread_union) && !VALID_SIZE(task_union))
> {
> > > +             len = 0;
> > >               if (kernel_symbol_exists("__start_init_task") &&
> > >                   kernel_symbol_exists("__end_init_task")) {
> > >                       len = symbol_value("__end_init_task");
> > >                       len -= symbol_value("__start_init_task");
> > > +             } else if (kernel_symbol_exists("__start_init_stack") &&
> > > +                        kernel_symbol_exists("__end_init_stack")) {
> > > +                     len = symbol_value("__end_init_stack");
> > > +                     len -= symbol_value("__start_init_stack");
> > > +             }
> > > +             if (len) {
> > >                       ASSIGN_SIZE(thread_union) = len;
> > >                       machdep->stacksize = len;
> > >               }
> > > -- 2.40.1
>
>
--
Crash-utility mailing list -- devel@lists.crash-utility.osci.io
To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to