Received: by 10.213.65.68 with SMTP id h4csp4208452imn; Tue, 10 Apr 2018 10:58:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4967SDhtHeyxNK/4rVNanYbSC9YmxX1u6EfqE1ysMLUthLCuETislv2F8pKCdOFamFad8YP X-Received: by 2002:a17:902:bc06:: with SMTP id n6-v6mr1437607pls.97.1523383085967; Tue, 10 Apr 2018 10:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523383085; cv=none; d=google.com; s=arc-20160816; b=RTqfR0GFyHuvsoNdop/yff0aGsAKYVz43sV23MHS5FpzMw8sbBtqY51UK6AnCdOLgY nJ1WpmlmM4w+mFTezRBaADjp33tGGQr3VS8YS5ReaZBv9pYipmadzdZyagIQOOvQAjwE 7yRTBOQGTMgoX9iWf8CxRajJiKdmPC5fP1eTgIVZEerHkY82kGYmwuDwixay70bNA1+t JpYdlHggHOPN2rhU5vFp3ToQZuBYeqezvSlNXzU4yt3YboGT1k+i6c2HVWUtd0+U+NuS mgS0XpapKqYJ4Di2CXs3X9o7hb2zYk/iN4v3FdUODSse6dmfk7Lr2IY0R1L8PWsCg8FZ axnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=9EhhlAK9F4NL92sOKI6AH8v4RBeIcbOLCona3FMXdTg=; b=l2JkoPhdg8Tgj/LGFvZ5qyE1XdMkyCqIpbbPgWYhrM5EOM+Vn1Bo0ao0nV2zlpHA6+ /VQVjj1jeDFUKjS80SmWb0MzK0ZDWs21JR6bKi1gqlsuc1TUWJt/AbewQGlT0vy2Bkie quqxVicCsUb872C1uJeOXHt2Yy4ppDrmZkMtu4J7c4cOmLEC4DcbU6Kq5/wTmnbCsfWw QfppDPK+CHYqhAeyG37AF2eurFLX+wQuNY02gkNrr7gIpFWIjDaflMwXxKI8spbEYGlx dmb1BhUJyLoSGVGC2CpV2KAkAkq+cffjO1OpyIQSWmRLQJjtFbFslhmu6Iua6/m5Ql6P tMHg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2085297pga.552.2018.04.10.10.57.27; Tue, 10 Apr 2018 10:58:05 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752334AbeDJRxg (ORCPT + 99 others); Tue, 10 Apr 2018 13:53:36 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38218 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751589AbeDJRxf (ORCPT ); Tue, 10 Apr 2018 13:53:35 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E401E40201A1; Tue, 10 Apr 2018 17:53:34 +0000 (UTC) Received: from treble (ovpn-120-110.rdu2.redhat.com [10.10.120.110]) by smtp.corp.redhat.com (Postfix) with SMTP id 56D1F2026DFD; Tue, 10 Apr 2018 17:53:34 +0000 (UTC) Date: Tue, 10 Apr 2018 12:53:34 -0500 From: Josh Poimboeuf To: Petr Mladek Cc: Miroslav Benes , Jiri Kosina , Jason Baron , Joe Lawrence , Jessica Yu , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/8] livepatch: Add an extra flag to distinguish registered patches Message-ID: <20180410175334.uksntqslarnl7izn@treble> References: <20180323120028.31451-1-pmladek@suse.com> <20180323120028.31451-5-pmladek@suse.com> <20180410105625.4o4ozkpmanevytnh@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180410105625.4o4ozkpmanevytnh@pathway.suse.cz> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 10 Apr 2018 17:53:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 10 Apr 2018 17:53:35 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 10, 2018 at 12:56:25PM +0200, Petr Mladek wrote: > > > diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h > > > index f28af280f9e0..d6e6d8176995 100644 > > > --- a/include/linux/livepatch.h > > > +++ b/include/linux/livepatch.h > > > @@ -378,7 +383,7 @@ int klp_disable_patch(struct klp_patch *patch) > > > > > > mutex_lock(&klp_mutex); > > > > > > - if (!klp_is_patch_registered(patch)) { > > > + if (!patch->registered) { > > > > I don't see any actual problem, but I'd feel safer if we preserve > > klp_is_patch_on_stack() even somewhere in disable path. > > It is strictly needed in klp_enable_patch() which will be better > visible if I squash it with the next patch. > > The use in klp_disable_patch() is optional. I do not have problems > to add it there though. If Josh does not see it as too paranoid, > I'll add it. That does seem pointless to me, how did you know? :-) Of course if we make the other changes we've been discussing, maybe it's no longer an issue. -- Josh