Re: [PATCH v3 2/2] livepatch: force transition process to finish

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx
>  		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@xxxxxxxxxxxxxxx
> +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: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux