From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>,
Jiri Kosina <jikos@kernel.org>
Subject: Re: [PATCH] livepatch: Enforce reliable stack trace as config dependency
Date: Tue, 12 Feb 2019 12:11:28 +0530 [thread overview]
Message-ID: <20190212064128.GA20554@JAVRIS.in.ibm.com> (raw)
In-Reply-To: <20190211140813.z7kap634gz3gp6a4@treble>
On Mon, Feb 11, 2019 at 08:08:13AM -0600, Josh Poimboeuf wrote:
> On Sat, Feb 09, 2019 at 02:47:28PM +0530, Kamalesh Babulal wrote:
> > After removal of the immediate flag by commit d0807da78e11
> > ("livepatch: Remove immediate feature"), reliable stack trace became
> > enforcing dependency for livepatch support on any architecture. In
> > the current code, we ensure that the dependency is met when
> > enabling the patch during the module load.
> >
> > This dependency check can be improved by moving it to the Kconfig,
> > which disables the support for livepatching in the kernel for unmet
> > dependencies. This patch moves both HAVE_RELIABLE_STACKTRACE and
> > STACKTRACE under config LIVEPATCH, it also removes the
> > klp_have_reliable_stack() function.
> >
> > Loading a livepatching module on an architecture where reliable
> > stack trace is yet to be implemented, the user should see:
> >
> > insmod: ERROR: could not insert module ./livepatch-sample.ko: Invalid module format
> >
> > ...
> > [ 286.453463] livepatch_sample: module is marked as livepatch module, but livepatch support is disabled
>
> Wouldn't the module fail to build in the first place, since
> CONFIG_LIVEPATCH is disabled?
Yes, with this patch applied, the livepatch modules will fail to build.
The intention was to paste the output of a module load, marked as the
livepatch but without the reliable stack trace support. I used the
previously compiled livepatch sample module for the illustration but
yeah we would not have a functioning module build in the first place.
>
> Anyway, I'm not sure about this approach. This patch makes the s390
> livepatch code no longer compilable, turning it into completely dead
> code. So if something changes in the s390 code which causes it to stop
> compiling, nobody will notice.
Fair point, we can drop this patch in favor of getting compile time
testing for s390.
>
> I think I'd rather go in the opposite direction: allow the patches to be
> loaded. Then they can be forced, if needed. That enables both compile
> and runtime testing. That way we don't make any backward progress,
> until such arches get reliable stacktraces.
klp_have_reliable_stack() enforces implementation of reliable
stack trace and run time testing will not be complete with we returning
after the check. We can re-think about enforcing the dependency after
we have the reliable stack trace for s390.
--
Kamalesh
next prev parent reply other threads:[~2019-02-12 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 9:17 Kamalesh Babulal
2019-02-11 8:53 ` Petr Mladek
2019-02-11 14:08 ` Josh Poimboeuf
2019-02-12 6:41 ` Kamalesh Babulal [this message]
2019-02-12 9:46 ` Petr Mladek
2019-04-16 11:47 ` Jiri Kosina
2019-04-16 12:54 ` Jiri Kosina
2019-04-16 12:55 ` Josh Poimboeuf
2019-04-16 18:52 ` Miroslav Benes
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=20190212064128.GA20554@JAVRIS.in.ibm.com \
--to=kamalesh@linux.vnet.ibm.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
/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
all inboxes | Powered by JetHome®