linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Miroslav Benes <mbenes@suse.cz>
Cc: jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org,
	pmladek@suse.com, lpechacek@suse.cz,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] livepatch: force transition process to finish
Date: Mon, 6 Nov 2017 12:11:05 +0100	[thread overview]
Message-ID: <20171106111105.GC24863@amd> (raw)
In-Reply-To: <20171031114853.841-3-mbenes@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 2219 bytes --]

On Tue 2017-10-31 12:48:53, Miroslav Benes wrote:
> If a task sleeps in a set of patched functions uninterruptedly, it could
> block the whole transition process 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! Use wisely. Admin must be sure that it is safe to
> execute such action. This means that it must be checked that by doing so
> the consistency model guarantees are not violated.
> 
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
> ---
>  Documentation/ABI/testing/sysfs-kernel-livepatch | 10 +++++++++
>  Documentation/livepatch/livepatch.txt            | 24 +++++++++++++++------
>  kernel/livepatch/core.c                          | 27 ++++++++++++++++++++++++
>  kernel/livepatch/transition.c                    | 25 ++++++++++++++++++++++
>  kernel/livepatch/transition.h                    |  1 +
>  5 files changed, 81 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch
> index 22f6267836c2..105f617008f1 100644
> --- a/Documentation/ABI/testing/sysfs-kernel-livepatch
> +++ b/Documentation/ABI/testing/sysfs-kernel-livepatch
> @@ -42,6 +42,16 @@ Contact:	live-patching@vger.kernel.org
>  		course of an existing transition. Writing 1 sends a signal to
>  		all remaining blocking tasks.
>  
> +What:		/sys/kernel/livepatch/<patch>/force
> +Date:		Oct 2017
> +KernelVersion:	4.15.0
> +Contact:	live-patching@vger.kernel.org
> +Description:
> +		A writable attribute that allows administrator to affect the
> +		course of an existing transition. Writing 1 clears
> +		TIF_PATCH_PENDING flag of all tasks and thus forces the tasks to
> +		the patched or unpatched state.
> +

NAK. Admin does not have chance to decide if this is safe or not.

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2017-11-06 11:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 11:48 [PATCH v3 0/2] livepatch: Introduce signal and force sysfs attributes Miroslav Benes
2017-10-31 11:48 ` [PATCH v3 1/2] livepatch: send a fake signal to all blocking tasks Miroslav Benes
2017-11-01 15:06   ` Miroslav Benes
2017-11-01 15:13   ` Petr Mladek
2017-11-01 16:43     ` Oleg Nesterov
2017-11-02 10:36       ` Miroslav Benes
2017-11-02 14:08         ` Oleg Nesterov
2017-11-02 13:09   ` Josh Poimboeuf
2017-11-03  8:02     ` Miroslav Benes
2017-11-03 12:57       ` Josh Poimboeuf
2017-11-02 13:32   ` Josh Poimboeuf
2017-11-03  8:06     ` Miroslav Benes
2017-11-06 11:08   ` Pavel Machek
2017-10-31 11:48 ` [PATCH v3 2/2] livepatch: force transition process to finish Miroslav Benes
2017-11-01 15:32   ` Petr Mladek
2017-11-02 13:13   ` Josh Poimboeuf
2017-11-03  8:07     ` Miroslav Benes
2017-11-06 11:11   ` Pavel Machek [this message]
2017-11-06 12:03     ` Jiri Kosina
2017-11-09 11:14       ` Pavel Machek

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=20171106111105.GC24863@amd \
    --to=pavel@ucw.cz \
    --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=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;
as well as URLs for NNTP newsgroup(s).