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 8/3/22 1:53 AM, Song Liu wrote:
> 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...
> 

Hi Song,

Was the original issue that the module's filename included '-' dash
character(s) while the module name ends up replaced those with '_'
underscores?

If that is the case, would you prefer that kpatch-build warn or refuse
to create .ko filenames that include '-' characters?

If you have ideas, feel free to post a new issue over on the project's
github.  No one should have to resort to manually (hex) editing .ko files :)

-- 
Joe




[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