From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933078AbdKPBRL (ORCPT ); Wed, 15 Nov 2017 20:17:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097AbdKPBRE (ORCPT ); Wed, 15 Nov 2017 20:17:04 -0500 Date: Wed, 15 Nov 2017 19:16:42 -0600 From: Josh Poimboeuf To: Miroslav Benes 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 , "H. Peter Anvin" , Ingo Molnar , Michael Ellerman , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH v4 0/2] livepatch: Introduce signal and force sysfs attributes Message-ID: <20171116011642.65xstuitmi7uv2ke@treble> References: <20171115135014.20594-1-mbenes@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171115135014.20594-1-mbenes@suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 16 Nov 2017 01:17:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Josh