Re: [PATCH RFC] livepatch: add sysfs entry "patched" for each klp_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 28, 2022 at 6:44 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
>
> On Mon 2022-07-25 15:02:31, Song Liu wrote:
> > I was debugging an issue that a livepatch appears to be attached, but
> > actually not. It turns out that there is a mismatch in module name
> > (abc-xyz vs. abc_xyz), klp_find_object_module failed to find the module.
>
> This might be a quite common mistake. IMHO, the module name stored in
> the module metadata always uses underscore '_' instead of dash '-'.
>
> If I get it correctly, it is done by the following command in
> scripts/Makefile.lib:
>
> --- cut ---
> # These flags are needed for modversions and compiling, so we define them here
> # $(modname_flags) defines KBUILD_MODNAME as the name of the module it will
> # end up in (or would, if it gets compiled in)
> name-fix-token = $(subst $(comma),_,$(subst -,_,$1))
> --- cut ---

Yeah, I can confirm the "name-fix" makes the change.

Hi Josh and Joe,

I hit this issue while building live patch for OOT module with kpatch-build.
Do you have some suggestions on how to fix it? My current workaround is
to manually edit the .ko file...

Thanks,
Song



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux