Re: [PATCH v2 0/2] livepatch: Move tests from lib/livepatch to selftests/livepatch

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

 



On 12/2/22 00:33, Miroslav Benes wrote:
On Thu, 1 Dec 2022, Shuah Khan wrote:

On 11/30/22 15:22, Joe Lawrence wrote:
On 7/15/22 10:45 AM, Petr Mladek wrote:
On Fri 2022-07-01 16:13:50, Shuah Khan wrote:
On 7/1/22 1:48 AM, Miroslav Benes wrote:
On Thu, 30 Jun 2022, Shuah Khan wrote:

Sorry Nack on this. Let's not add modules under selftests. Any usage of
module_init()
doesn't belong under selftests.

Yes I did and after reviewing and thinking about it some more, I decided
this
is the right direction go down on.

Do you have some particular reason why building modules in selftests
directory might cause problems, please?


My reasons are that with this change module_init() propagates out of
strictly kernel space and now is in selftests which are user-space.
Any changes to this interface will be tied to user-space change.

I do not understand this (have not had a cup of tea yet).

module_init() is defined in include/linux/module.h. It is API. Every
kernel module, in-tree or out-of-tree, uses it. There is only one usage of
module_init() in Marcos's patch. In a kernel module, in tools/
subdirectory yes.

If there is a change to module_init, it might need editing all the call
sites, yes. That is inherent.
This is my main concern. That is reason why I still ask the question
about why is it necessary to make this change other than self-contained
sources?

I will quote myself from an earlier email in the thread which you have not
replied to...

"
My main question is different though. As Marcos mentioned before, we would
like to have our tests really flexible and a possibility to prepare and
load different live patch modules based on a template is a part of it.
What is your proposal regarding this? I can imagine having a template in
lib/livepatch/ which would not be compilable and a script in
tools/testing/selftests/livepatch/ would copy it many times, amend the
copies (meaning parameters would be filled in with sed or the code would
be changed), compile them and load them. But this sounds horrible to me,
especially when compared to Marcos' approach in this patch set which is
quite straightforward.
"


Responded to Petr's message -

"Yes, kABI is not backward compatible. But building the tests
modules out-of-tree way would allow to build test modules with
different kABI from the same sources."

This is a solid reason for livepatch modules to live under
sefltests. Let's capture this in README and the other updates that
need to be made to it in v3.

thanks,
-- Shuah




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux