Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10116imu; Thu, 3 Jan 2019 13:00:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN6o69jDWqlgBuJHY3Po0z8vr/wZBWHU5SNtKYrGp1VxBYQeGw2HmU/ehG2t/pae/jMmc1xK X-Received: by 2002:a17:902:7687:: with SMTP id m7mr48081290pll.187.1546549202143; Thu, 03 Jan 2019 13:00:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546549202; cv=none; d=google.com; s=arc-20160816; b=rCShX77cONxlEPlHfvFc44NDlibPNTOu0Ssacibg55EkV3NH29sJa+6/2SWjZU4C5h /tVj1daNot6q7DlE4EUw+6/WneuLld1Sgez/Mr7a5O6Ag27ap/KOy1pZ/1gV4kZtOQpF C0CbKUe2QTnP1mcs0xuNCSgYZ/n3pWfPFByESQonLlwRUGdOIg7MY7kmb7Jb8SZXb1M6 4j3RCFFQAKgeiSrMD0wjGFfsHbvWTC1CyTbX1Ous8SlfZWM+b2h+Modfs79cVLPEq1/d EjahcDyxM3jQtVsjUuWUS2k6U5CL/HdbYGU7nM37u+JF8j+bcGWjMKO6SB6NjryeCMU5 8vxA== 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=e9493ca2zcQSIyBd673Lcrcf9yVwpiv2fjUsfmVAbss=; b=WmvyZUdWmzNuCRTGbVw2pFM4EyKZJlmntzWpguQabbwD7Z1xJE2e1Yp9lu0sGqgDKq SqMZngmmUiBok0fldp4Owwx+asw47ssuUp+qrtfFh5X/YW2bwud5KAUL9fB2JO+N9JA3 BijuMmuKmWx3jeGvv3txQ4aMbSaTwF8SY5jr4NMWkXZ3gkF+KK3qmP3cFAyyxaw6iCNB XDtdIFLe46gQfEJllKrPY8O3GpJwW9j81Y4Z9zdtRuSTCJkXdTyFU2NrnPkRw0x1/UNy DCtJAeCn6KJ71RQNO1Ltn5mV/h+b50KQwxCTVrz5M70FvdLj/T+5+QBOOG4VmydEvrEO 9maQ== 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 187si39448162pfv.238.2019.01.03.12.58.50; Thu, 03 Jan 2019 13:00:02 -0800 (PST) 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 S1730160AbfACNh1 (ORCPT + 99 others); Thu, 3 Jan 2019 08:37:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53620 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbfACNhZ (ORCPT ); Thu, 3 Jan 2019 08:37:25 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E083C057F34; Thu, 3 Jan 2019 13:37:25 +0000 (UTC) Received: from treble (ovpn-122-188.rdu2.redhat.com [10.10.122.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 726795D75E; Thu, 3 Jan 2019 13:37:22 +0000 (UTC) Date: Thu, 3 Jan 2019 07:37:20 -0600 From: Josh Poimboeuf To: Petr Mladek Cc: Jiri Kosina , Miroslav Benes , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH v14 07/11] livepatch: Add atomic replace Message-ID: <20190103133720.3d57kssgvvg44zjt@treble> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-8-pmladek@suse.com> <20181213225528.ies3kxjjtzl6dmd3@treble> <20181217152741.2i2trzjk5rmofgc3@pathway.suse.cz> <20190103124740.s3mpgmjw4no4qr6f@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190103124740.s3mpgmjw4no4qr6f@pathway.suse.cz> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 03 Jan 2019 13:37:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 03, 2019 at 01:47:40PM +0100, Petr Mladek wrote: > On Mon 2018-12-17 16:27:41, Petr Mladek wrote: > > On Thu 2018-12-13 16:55:28, Josh Poimboeuf wrote: > > > On Thu, Nov 29, 2018 at 10:44:27AM +0100, Petr Mladek wrote: > > > Side note, it would probably be useful to have a klp_for_each_patch() > > > helper. > > > > Will do. > > Hmm, there are two possibilities: > > 1) #define klp_for_each_patch(patch) \ > list_for_each_entry(patch, &klp_patches, list) > > 2) #define klp_for_each_patch(patches, patch) \ > list_for_each_entry(patch, &patches, list) > > Problems: > > 1st variant would need to declare klp_patches in > include/linux/livepatch.h. Josh did not like even > kernel/livepatch/core.h. > > 2nd variant looks ugly to me. > > > Alternative solution would be to move all klp_for_each*() > definitions from include/linux/livepatch.h to kernel/livepatch/core.h. > But there might be some users. I wonder if we use these > macros when preparing the cumulative patches. > > > As any solution looks controversial, I would prefer to postpone this change > after this patchset is accepted. I would vote #1, and just put it in core.c next to the klp_patches definition. But it's fine with me if you want to postpone it. -- Josh