From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752276AbdKFLLI (ORCPT ); Mon, 6 Nov 2017 06:11:08 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:43525 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbdKFLLH (ORCPT ); Mon, 6 Nov 2017 06:11:07 -0500 Date: Mon, 6 Nov 2017 12:11:05 +0100 From: Pavel Machek To: Miroslav Benes 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 Message-ID: <20171106111105.GC24863@amd> References: <20171031114853.841-1-mbenes@suse.cz> <20171031114853.841-3-mbenes@suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <20171031114853.841-3-mbenes@suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > Signed-off-by: Miroslav Benes > --- > 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(-) >=20 > diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documenta= tion/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. > =20 > +What: /sys/kernel/livepatch//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 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAloAQ0kACgkQMOfwapXb+vLdqQCguGKWggrL4e8TiBEoSBVx6UNK 674An140SPJ8cjNt+/s2DFxg3hTcUIhg =Scfg -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--