Received: by 10.223.164.221 with SMTP id h29csp3084732wrb; Fri, 3 Nov 2017 01:08:34 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T+TN8oYD6dG3yXw/1LxTIYFQCVA+pdSimUf0M+r5qTfsBiO9oxdXzyaeYRQ2IoNXxfiLOF X-Received: by 10.98.163.2 with SMTP id s2mr6807335pfe.242.1509696514872; Fri, 03 Nov 2017 01:08:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509696514; cv=none; d=google.com; s=arc-20160816; b=le45hzK5Fh3YHz/REJAK8Wiy1xHulRy9D5Y9irzWlcU/ZGQNQfomZqK1CvirwPzl+j aU7q8xnFxoHvqdGP7UzNrJs6/8YQTQFl81DgOhUjg3SBbX/WFbMeHWFI9RBwo+4rjm7D Rvs8/rQgINaRCbT4LDgNit0uWEniEJD+Hr73iT/zSKqTnC/IU+8Us/adRCP420NccpHe F3LOyJ0zNz9jrU6Uoo7aiub7mTrZvt2ednrDwfSA75U6kVXR6eDNeOmIsueqR3JPxYvF dSAp2Heox2Y7sGpCsFYR2houZpm1L/McVG46fu6CozbrD0VAWIBhK7T6JQBUxHgl8Lt1 ujFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=KQ+7KtFVW++5RRGawHsrQBg+UBOzlcEI2DEWQK4CEeo=; b=ZRBrw6EolIQLN7yRghsiSEWk4xA12Dj6XL7CUAOVGDL3nmTNDAaIn0aJJR6eT+nMK7 A0TWnjPcebBuaXVoulcsRgf0W9nQHpk2o4GV6aW4eJCihzIcQxLSTceYerQHsbla9pcK 7Fty4RohI3nM2XEmkFY2Q3RBUKcwYrcmJ9l3fBZTYIzcX5Gh6pmRMAGRhso5lLXbUpSN B1dNDOWNpS1pwgLLmCNNef1fRZWGNeNyB9/LX5oJ4ZfQtBqlvB6B0ViCVkXYk9vZB07Z KUA17QqhWLv7Em4vPcGFdXpZpGzbobkObqeS/FKyzjx0WURJankGUN8wpuUIuU0Wima+ Ql2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t23si5575251pgo.645.2017.11.03.01.08.21; Fri, 03 Nov 2017 01:08:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932390AbdKCIH1 (ORCPT + 96 others); Fri, 3 Nov 2017 04:07:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:48659 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbdKCIHZ (ORCPT ); Fri, 3 Nov 2017 04:07:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5C01EAD31; Fri, 3 Nov 2017 08:07:24 +0000 (UTC) Date: Fri, 3 Nov 2017 09:07:24 +0100 (CET) From: Miroslav Benes To: Josh Poimboeuf 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 Subject: Re: [PATCH v3 2/2] livepatch: force transition process to finish In-Reply-To: <20171102131318.ovjpygmerxhadhu7@treble> Message-ID: References: <20171031114853.841-1-mbenes@suse.cz> <20171031114853.841-3-mbenes@suse.cz> <20171102131318.ovjpygmerxhadhu7@treble> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017, Josh Poimboeuf wrote: > On Tue, Oct 31, 2017 at 12:48:53PM +0100, 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. > > The phrase "transition process" (here and in the patch title) confused > me a little bit, since elsewhere we just call it "transition". Ok. > > +static ssize_t force_store(struct kobject *kobj, struct kobj_attribute *attr, > > + const char *buf, size_t count) > > +{ > > + int ret; > > + bool val; > > + > > + /* > > + * klp_mutex lock is not grabbed here intentionally. It is not really > > + * needed. The race window is harmless and grabbing the lock would only > > + * hold the action back. > > + */ > > + if (!klp_transition_patch) > > + return -EINVAL; > > + > > + ret = kstrtobool(buf, &val); > > + if (ret) > > + return ret; > > + > > + if (val) > > + klp_force_transitions(); > > The plural "transitions" is inconsistent with the rest of the code, > which uses it in the singular. How about klp_force_transition() or > klp_force()? klp_force_transition() it is. Miroslav From 1582960199189699045@xxx Thu Nov 02 13:14:45 +0000 2017 X-GM-THRID: 1582773873031494647 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread