[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW4pd8gEiRNj920kO8c4JuEWoXT=MhFK-nWvJZ9QseefaQ@mail.gmail.com>
Date: Wed, 19 Feb 2025 09:44:16 -0800
From: Song Liu <song@...nel.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: Puranjay Mohan <puranjay@...nel.org>, Weinan Liu <wnliu@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>, Indu Bhagat <indu.bhagat@...cle.com>,
Peter Zijlstra <peterz@...radead.org>, Mark Rutland <mark.rutland@....com>, roman.gushchin@...ux.dev,
Will Deacon <will@...nel.org>, Ian Rogers <irogers@...gle.com>, linux-toolchains@...r.kernel.org,
linux-kernel@...r.kernel.org, live-patching@...r.kernel.org,
joe.lawrence@...hat.com, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel
On Tue, Feb 18, 2025 at 10:41 AM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>
> On Tue, Feb 18, 2025 at 10:20:10AM -0800, Song Liu wrote:
> > Hi Josh,
> >
> > On Mon, Feb 17, 2025 at 10:37 PM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > >
> > > On Mon, Feb 17, 2025 at 08:38:22PM -0800, Song Liu wrote:
> > > > On Fri, Feb 14, 2025 at 3:23 PM Josh Poimboeuf <jpoimboe@...nel.org> wrote:
> > > > > Poking around the arm64 module code, arch/arm64/kernel/module-plts.c
> > > > > is looking at all the relocations in order to set up the PLT. That also
> > > > > needs to be done for klp relas, or are your patches already doing that?
> > > >
> > > > I don't think either version (this set and my RFC) added logic for PLT.
> > > > There is some rela logic on the kpatch-build side. But I am not sure
> > > > whether it is sufficient.
> > >
> > > The klp relas looked ok. I didn't see any signs of kpatch-build doing
> > > anything wrong. AFAICT the problem is that module-plts.c creates PLT
> > > entries for regular relas but not klp relas.
> >
> > In my tests (with printk) module-plts.c processes the .
> > klp.rela.vmlinux..text.copy_process section just like any other .rela.*
> > sections. Do we need special handling of the klp.rela.* sections?
>
> Ok, I see how it works now:
>
> klp_write_section_relocs()
> apply_relocate_add()
> module_emit_plt_entry()
>
> If that code is working correctly then I'm fresh out of ideas...
I tried to dump assembly of copy_process, but couldn't find any
clue. I am wondering whether this is an issue with gcc-14.2.1.
Puranjay, could you please try with a different gcc, like some
version of gcc-14?
Thanks,
Song
Powered by blists - more mailing lists