From: Marcos Paulo de Souza <mpdesouza@suse.de>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: Petr Mladek <pmladek@suse.com>,
Joe Lawrence <joe.lawrence@redhat.com>,
Miroslav Benes <mbenes@suse.cz>,
Marcos Paulo de Souza <mpdesouza@suse.com>,
live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
shuah@kernel.org, jpoimboe@redhat.com
Subject: Re: [PATCH v2 0/2] livepatch: Move tests from lib/livepatch to selftests/livepatch
Date: Mon, 5 Dec 2022 14:40:15 -0300 [thread overview]
Message-ID: <20221205174015.4u4p665dnh2zdb4u@daedalus> (raw)
In-Reply-To: <21025073-0ed6-427e-219e-99e9731f6688@linuxfoundation.org>
On Fri, Dec 02, 2022 at 01:03:25PM -0700, Shuah Khan wrote:
> On 12/2/22 02:25, Petr Mladek wrote:
> > On Thu 2022-12-01 16:58:38, 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 am sorry but I do not understand the meaning here. module_init() is
> > called when module is loaded. It is not called in userspace.
> >
> > Maybe, you mean that modules under lib/ are clearly in-tree
> > modules. If we move then under tools/ then they will be build
> > like out-of-tree modules. Except that they will be maintained in-tree
> > so that it will be easy to keep them in sync.
> >
>
> Yes. That is what I mean.
>
> > And I am sure that they will be actively maintained. The fixes are
> > there to make sure that livepatching still works as expected.
> > They must pass when any change is done in the livepatch subsystem.
> > And they must pass when any kernel is released.
> >
>
> In other words, livepatch and kernel are revision matched.
>
> > The only concern might be how build failure is handled. IMHO, we
> > need to handle it the same way and test failure.
> >
> >
>
> Yes. This is another concern - build failures. Let's experiment with
> modules under selftests and see if this becomes a problem.
>
> > > In general, newer tests offer the best coverage, hence the recommendation
> > > to run newer tests on older kernels assuming that the tests are built
> > > on a newer kernel and backwards should run in a backwards compatible
> > > way on older kernels.
> >
> > This works for the userspace interface that should always be backward
> > compatible. But it does not work for kABI.
> >
>
> This is broader than revision matching. Tests should gracefully exit
> with skip when a config option they depend on is disabled. The same
> gets extended to older kernel versions.
Agreed. I'll change functions.sh to do better checking when compiling modules.
>
> >
> > > Do you have a requirement that livepatch test has to be revision
> > > matched with the kernel? Even if that is the case, there is no real
> > > reason to move modules under selftests other than keeping them in
> > > one location.
> >
> > 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.
> >
>
> Okay. 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.
I'm happy that we reached to a point where we agreed to have the modules moved
into kselftests, as the move will allow us to implement more tests that are
currently downstream.
The v3 is being prepared now. I hope to send it soon.
Thanks,
Marcos
>
> thanks,
> -- Shuah
prev parent reply other threads:[~2022-12-05 17:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 14:12 [PATCH v2 0/2] livepatch: Move tests from lib/livepatch to selftests/livepatch Marcos Paulo de Souza
2022-06-30 14:12 ` [PATCH v2 1/2] " Marcos Paulo de Souza
2022-06-30 14:12 ` [PATCH v2 2/2] selftests: livepatch: Test livepatching a heavily called syscall Marcos Paulo de Souza
2022-07-12 14:56 ` Joe Lawrence
2022-07-29 13:19 ` Petr Mladek
2022-11-23 13:35 ` Marcos Paulo de Souza
2022-11-24 3:39 ` Marcos Paulo de Souza
2022-11-24 13:05 ` Marcos Paulo de Souza
2022-11-30 22:19 ` Joe Lawrence
2022-06-30 14:36 ` [PATCH v2 0/2] livepatch: Move tests from lib/livepatch to selftests/livepatch Shuah Khan
2022-07-01 7:48 ` Miroslav Benes
2022-07-01 22:13 ` Shuah Khan
2022-07-15 14:45 ` Petr Mladek
2022-11-30 22:22 ` Joe Lawrence
2022-12-01 23:58 ` Shuah Khan
2022-12-02 7:33 ` Miroslav Benes
2022-12-02 20:17 ` Shuah Khan
2022-12-02 9:25 ` Petr Mladek
2022-12-02 20:03 ` Shuah Khan
2022-12-02 21:05 ` Joe Lawrence
2022-12-05 17:30 ` Marcos Paulo de Souza
2022-12-05 17:40 ` Marcos Paulo de Souza [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221205174015.4u4p665dnh2zdb4u@daedalus \
--to=mpdesouza@suse.de \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mpdesouza@suse.com \
--cc=pmladek@suse.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox