All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: jeyu@kernel.org, jikos@kernel.org, pmladek@suse.com,
	lpechacek@suse.cz, pavel@ucw.cz, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andy Lutomirski <luto@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Oleg Nesterov <oleg@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v4 0/2] livepatch: Introduce signal and force sysfs attributes
Date: Wed, 15 Nov 2017 19:16:42 -0600	[thread overview]
Message-ID: <20171116011642.65xstuitmi7uv2ke@treble> (raw)
In-Reply-To: <20171115135014.20594-1-mbenes@suse.cz>

On Wed, Nov 15, 2017 at 02:50:12PM +0100, Miroslav Benes wrote:
> Currently, livepatch gradually migrate the system from an unpatched to a
> patched state (or vice versa). Each task drops its TIF_PATCH_PENDING
> itself when crossing the kernel/user space boundary or it is cleared
> using the stack checking approach. If there is a task which sleeps on a
> patched function, the whole transition can get stuck indefinitely.
> 
> Livepatch has means which can be used in these cases. The transition can
> be cancelled and/or immediate flag may be used for the live patch. On
> the other hand it might be useful to poke the system a little bit and
> help the transition to finish by doing so.
> 
> That is what the fake signal can be used for. A task sleeping/waiting in
> the kernel gets TIF_SIGPENDING set, it handles it and during that its
> TIF_PATCH_PENDING is cleared. Kthreads are only woken up, they do not
> handle signals suitably.
> 
> Still, there are cases which neither fake signal can solve. A task can
> sleep uninterruptedly without reacting to signals at all. Even then, it
> may be safe to clear the task's TIF_PATCH_PENDING. As a last resort,
> admin may force such clearing for all tasks in the system with this
> patch set.
> 
> We use the fake signal in SLES for a long time. Moreover, we don't have
> a stack checking there, so we rely on the fake signal a lot. We send it
> automatically and periodically.
> 
> Petr, I did not add you Reviewed-by tags intentionally because of the changes.
> 
> Changes from v3:
> - only TASK_INTERRUPTIBLE kthreads are woken up - Petr
> - documentation - Pavel
> - function naming and sysfs fix - Josh

For the series:

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

  parent reply	other threads:[~2017-11-16  1:17 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
2017-11-16  1:16 ` Josh Poimboeuf [this message]
2017-12-04 21:37 ` [PATCH v4 0/2] livepatch: Introduce signal and force sysfs attributes 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=20171116011642.65xstuitmi7uv2ke@treble \
    --to=jpoimboe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jeyu@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=lpechacek@suse.cz \
    --cc=luto@kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=oleg@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.