mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org,
	lpechacek@suse.cz, pavel@ucw.cz, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] livepatch: force transition to finish
Date: Tue, 21 Nov 2017 11:04:24 +0100	[thread overview]
Message-ID: <20171121100424.frdmd52jefluyu4x@pathway.suse.cz> (raw)
In-Reply-To: <alpine.LSU.2.21.1711201647300.25182@pobox.suse.cz>

On Mon 2017-11-20 16:57:19, Miroslav Benes wrote:
> On Wed, 15 Nov 2017, Miroslav Benes wrote:
> 
> > If a task sleeps in a set of patched functions uninterruptedly, it could
> > block the whole transition indefinitely.  Thus it may be useful to clear
> > its TIF_PATCH_PENDING to allow the process to finish.
> > 
> > Admin can do that now by writing to force sysfs attribute in livepatch
> > sysfs directory. TIF_PATCH_PENDING is then cleared for all tasks and the
> > transition can finish successfully.
> > 
> > Important note! Administrator should not use this feature without a
> > clearance from a patch distributor. It must be checked that by doing so
> > the consistency model guarantees are not violated.
> > 
> > Signed-off-by: Miroslav Benes <mbenes@suse.cz>
> 
> While working on "immediate" removal, I realized we had the similar 
> problem here with modules removal. There is no way out of the rabbit hole.
> 
> If a patch is forced, we obviously cannot say there is no task sleeping in 
> the old code. This could be disastrous if such old module is then removed 
> (either we disabled it and we want to rmmod it, or there is a new "atomic 
> replace" patch and we want to remove the old one).

> We need something like the following (at least as a starting point)

Great catch! The proposed solution looks good to me. And as already
mentioned, it might be worth updating the documentation.

For the whole patchset, including this fixup:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

  parent reply	other threads:[~2017-11-21 10:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 13:50 [PATCH v4 0/2] livepatch: Introduce signal and force sysfs attributes Miroslav Benes
2017-11-15 13:50 ` [PATCH v4 1/2] livepatch: send a fake signal to all blocking tasks Miroslav Benes
2017-11-30 21:53   ` Jiri Kosina
2017-12-01 10:13     ` Michael Ellerman
2017-11-15 13:50 ` [PATCH v4 2/2] livepatch: force transition to finish Miroslav Benes
2017-11-20 15:57   ` Miroslav Benes
2017-11-20 23:02     ` Josh Poimboeuf
2017-11-20 23:09       ` Jiri Kosina
2017-11-20 23:11         ` Jiri Kosina
2017-11-20 23:14           ` Josh Poimboeuf
2017-11-22 10:29           ` [PATCH v4.1 " Miroslav Benes
2017-12-15 18:04             ` Jason Baron
2017-12-18 13:23               ` Miroslav Benes
2017-12-18 19:30                 ` Josh Poimboeuf
2017-12-19 13:27                 ` Petr Mladek
2017-11-20 23:14       ` [PATCH v4 " Pavel Machek
2017-11-20 23:17         ` Jiri Kosina
2017-11-21 10:04     ` Petr Mladek [this message]
2017-11-16  1:16 ` [PATCH v4 0/2] livepatch: Introduce signal and force sysfs attributes Josh Poimboeuf
2017-12-04 21:37 ` Jiri Kosina
2017-12-07 12:23   ` Jiri Kosina

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=20171121100424.frdmd52jefluyu4x@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=lpechacek@suse.cz \
    --cc=mbenes@suse.cz \
    --cc=pavel@ucw.cz \
    /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®