Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1835275imm; Thu, 18 Oct 2018 05:10:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Nl/7Q8jqSkns9USWcWXybq0Gluqw85Nrqd/CxxNWDnlNupv69ylrRtxVyj5aZqfp3gTYL X-Received: by 2002:a63:f64f:: with SMTP id u15-v6mr28589067pgj.258.1539864636548; Thu, 18 Oct 2018 05:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539864636; cv=none; d=google.com; s=arc-20160816; b=q2/w6LLIdws3K3MmcNfB1Zx/HKTIL+Z4YBQY6AZH1H484vIw54NFOp3tojvUTbYraF jjf/mkn4eBLva5hxz+dnWYioX8l2c8V5IXEKMmKWv2fIcgH6jiLC1n/NKa07wdtyFqFo 1iKF01cWlwK7C8S8j5BSzGSnSBHegLsSVThugxSUJbniYVDmcBI49JErspD2x0vRxc0p Qln5w7Bc1n6eHwfsCzRZj9q3DxH4HDwJOdjzA6yaLE8+9HoqpP2U0Aoh4vIBykYx6LjE 20d/J1wUXKQP7vwiODMEBVPRHMcCQIvapJXfmt5u56qq2pdZQIy+pd29pj1Hc+nqpnsl PuvQ== 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; bh=sf9GVB4D3MfowbzCjAXKDrucKcsZjfpawba886JSfy0=; b=x4swsJrJ4iBG4wXa/FP/xwL8qkOCAMxbhHfqJivaxdqI7AS83STKNK1trnibdPnwSp RUDJk2KbYUMEdmsqcHfa1n++HrzszK1lPHcwMFsUfXvJi01g23GUoQP+40HrkTGpbUgd nlHaPYEGLt/0j3777zkKmoQ/zL/vi/Fpf0QvqWXY+UAJlzvRpksUVrDy/RZJdNhAEgrD UT6DNFmiDBJT/COF6iP3UvvPo07xGeIfxgkZKlIA5CvGmTBeZ8vOFSYu2bBuIBq/QHQx aG+9/AntPt3vCXXCO2mcC5V+LnfH4kaTIOkfELJmAmzXhO6U+AcJ7VbUXD7CcYWOoGqL s5fw== 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 a6-v6si19758529pgw.391.2018.10.18.05.10.20; Thu, 18 Oct 2018 05:10:36 -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 S1726530AbeJRUKd (ORCPT + 99 others); Thu, 18 Oct 2018 16:10:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:49736 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726132AbeJRUKd (ORCPT ); Thu, 18 Oct 2018 16:10:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B74EDAD91; Thu, 18 Oct 2018 12:09:48 +0000 (UTC) Date: Thu, 18 Oct 2018 14:09:47 +0200 From: Petr Mladek To: Josh Poimboeuf Cc: Jiri Kosina , Miroslav Benes , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v13 05/12] livepatch: Refuse to unload only livepatches available during a forced transition Message-ID: <20181018120947.py36o462zdqjknsm@pathway.suse.cz> References: <20181015123713.25868-1-pmladek@suse.com> <20181015123713.25868-6-pmladek@suse.com> <20181017183519.wfc2n54ga6cyjhfi@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181017183519.wfc2n54ga6cyjhfi@treble> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2018-10-17 13:35:19, Josh Poimboeuf wrote: > I'm having trouble parsing the subject. How about: > > Allow unloading of patches added after using 'force' ok > > --- a/kernel/livepatch/core.c > > +++ b/kernel/livepatch/core.c > > @@ -45,7 +45,8 @@ > > */ > > DEFINE_MUTEX(klp_mutex); > > > > -static LIST_HEAD(klp_patches); > > +/* Registered patches */ > > +LIST_HEAD(klp_patches); > > Instead of making this non-static, can we just move > klp_force_transition() to core.c? It's nice to have all the list > management code encapsulated in the same file. Come on! We need it just to iterate over a list of available livepatches. The logic used to manage this list is trivial. klp_force_transition() itself is more complicated and it logically fits into transitions.c. I do not want to fight over this. If you resist, I'll move it. I just wanted to share my view. Best Regards, Petr