Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9930720imu; Wed, 5 Dec 2018 12:50:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xq+HmYV6AQEJo2JtjqIschSJrREyWnfQGlCjEE3yrcjv937F3a5NPu8ajyt1fFgwlLMaml X-Received: by 2002:a17:902:7588:: with SMTP id j8mr6443927pll.215.1544043008196; Wed, 05 Dec 2018 12:50:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544043008; cv=none; d=google.com; s=arc-20160816; b=lyL31VvEaFtltLRU6nImKdrvBoJkZP8XJtyM4UQ1NlNw/cKF+NJH3yXbn1jFP1G91o Vv7oS3Mb4t9X1GpBODAAtg/X5rRQRcUSlDsrcPiV1u8SzzhtyLDcB4RJ9QbskzXfxmZH 4g+jLIxYSsPbpgdqzmPlOVUqcvvbewquIHyCfZej+FBA9AgKlKvl85eJGFEHSREWKwpv 87HoOf8+zc5B8EegEcrCYA40B7Y5/cWbNyFaNYXQEvSXERfUqH4k6OJ2VvCpFQu0Ocv6 s+xOzTK0c6R2g96fJm7xOqBLe2mTtnUgvLiJZP5sbHRCJTCdFlIDRmlFI6yV/1mPGBBN VvkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=PcUNnBbVAItboZ9JtNY+c/qHOdJp9vjEsv7IUU496Rk=; b=rK3C2JoxbJxhvsEkkeMYmieyPUaytAXUgQVJZK7+42pb9t06g7qh7LP30KEVaimgy7 e46iunXalZMmL0TFv87RTPTIME6ho02xpt0C9A5gt2QokTEhpyKWxJMt70gTWkb7yu2e b+yGlZJxyKR6IeOoHosC2qCBKe/tAdwotO7l6uMYj/VFcbkj/prgAjxR7Qg/kgc2NqId mhuRuCxqaCyATvvVZC/+SOGQGfmO9tbMk5RkxsmjMzP+OncMuW6J7HCE6t5xUWUPmwVL Flb2L6rEefSgHCIQvSjt2cEUCN14YqlTv+PEsKfNz5jgoMh1ahbDpuq1ssyBZhugWpxY pCvg== 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 w5si10827968plp.208.2018.12.05.12.49.51; Wed, 05 Dec 2018 12:50:08 -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 S1728372AbeLEUtR (ORCPT + 99 others); Wed, 5 Dec 2018 15:49:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727436AbeLEUtQ (ORCPT ); Wed, 5 Dec 2018 15:49:16 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4636220262; Wed, 5 Dec 2018 20:49:16 +0000 (UTC) Received: from jlaw-desktop.bos.csb (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 664515C548; Wed, 5 Dec 2018 20:49:15 +0000 (UTC) Subject: Re: [PATCH v14 00/11] livepatch: Atomic replace feature To: Petr Mladek , Jiri Kosina , Josh Poimboeuf , Miroslav Benes Cc: Jason Baron , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181129094431.7801-1-pmladek@suse.com> From: Joe Lawrence Organization: Red Hat Message-ID: <176e592d-6e9c-8e1c-abe6-d07ba9b10d54@redhat.com> Date: Wed, 5 Dec 2018 15:49:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181129094431.7801-1-pmladek@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 05 Dec 2018 20:49:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/2018 04:44 AM, Petr Mladek wrote: > Hi, > > I have an updated present for your mailboxes. > > The atomic replace allows to create cumulative patches. They > are useful when you maintain many livepatches and want to remove > one that is lower on the stack. In addition it is very useful when > more patches touch the same function and there are dependencies > between them. > > All the changes were simple in principle but they required quite > some refactoring again :-( IMHO, the biggest change is renaming > klp_init_lists() ->klp_init_patch_before_free(). It does all > init actions that need to succeed before klp_free() functions > can be safely called. The main motivation was the need to > initialize also the new .kobj_alive flags. > > > Changes against v13: > > + Rename old_addr -> old_func instead of new_func -> new_addr. [Josh] > > + Do not add the helper macros to define structures. [Miroslav, Josh] > > + Add custom kobj_alive flag to reliably handle kobj state. [Miroslav] > Aside: I don't suppose that this could ever be folded into the kobject code/data structure itself? This seems like a common problem that kobj-users will need to solve like this. > + Avoid renaming .forced flag to .module_put by calling klp_free > functions only with taken module reference. [Josh] > > + Use list_add_tail() instead of list_add() when updating the dynamic > lists of klp_object and klp_func structures. Note that this > required also updating the order of messages from the pre/post > callbacks in the selftest. [Josh, Miroslav] > Updated self-tests ran fine for me, thanks for updating. > + Do not unnecessarily initialize ret variable in klp_add_nops(). [Miroslav] > > + Got rid of klp_discard_replaced_stuff(). [Josh] > > + Updated commit messages, comments and documentation, especially > the section "Livepatch life-cycle" [Josh, Miroslav] Thank you for adding/revising this part. It was pretty clear and it helped to read this before going through the individual patches. I don't have many code comments as the changes appear to safely and correctly do what the say. (We are at v14 after all :) I mainly compared the text and comments to the implementation and noted typos (marked by substitution s/old/new) and awkward wordings (marked by "re-wording suggestion"). That said, I ack'd each patch as I wouldn't want these to hold up the patchset. Thanks, -- Joe