Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9298959imu; Wed, 5 Dec 2018 02:28:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/XRLhWz27pLFN2oSuNmya7Dl21CXog6yoUGcQMD+xnB1rx/PrDaQEGCcbmHtg3spva1+O3l X-Received: by 2002:a17:902:20e9:: with SMTP id v38mr22605346plg.250.1544005696045; Wed, 05 Dec 2018 02:28:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544005696; cv=none; d=google.com; s=arc-20160816; b=OepMQ533+pBXEcX9ffCA51opxJTOmCKNDXK8WZQbnEhBsz9amlxxW4+0MXHRoc3tzi pyQEzkf8Y2cjezsPqgY+tumI39SwUQt9Gu/khH4KzdPSrEXH8dviLgunPl07v//Cq6fR ZkYmjO6SYcEfyMsTsYpu+J3QQhwpiagxLmFBeGpDSNLqeHX6B4yV0zxzcjcjetFQa9PT tuoZzwTElwxwUBINi5f5uZxiCnzus9OomivsbcK43Dy7n8Fjjn6IY4xEGLw7FLlOGV6K mAhNjVTgBfRY+AxY0HIDHf+IbA7g3GaSTREQ5t7A1P4tTPnw8tktUYE2CBNqUt8asKBQ S/Dg== 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; bh=PH55fg91riF0hTLBrZjCQ2sSEWj7arA6YLf/EB5l0OU=; b=N+qQpPCa22qeC1E72vm+9ZuGb8Vl3G93/ZZ0LxRJZiKran/DqsGsHE68phrtUIACIg JB0rCC2AQRT+NcSLcMk4d/J6sDoi+duWFgDzVgqiYNaCHtNzleLQ/LLYJw6B81aRghzi 3hlak4vqiHcM6hC5qIfh37Et5E4koubc+tEU6C2HJeGwqeK7MJx4WYYTnvzLHqB7gVpP VrTjX3Uezxub/S7CFips/oaWIZgpsg18SLqQ+5TWrV6MNN9OgfIDJJB8I5tU/igEY9RJ 1XgvPsggOHNGQn/jiJMm6WL5oQq6IBDldHkFypC/Qbik4/d7QaTmesBzB3yjtng+cMCh 9O8Q== 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 h88si21342337pfa.49.2018.12.05.02.28.00; Wed, 05 Dec 2018 02:28:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727497AbeLEK10 (ORCPT + 99 others); Wed, 5 Dec 2018 05:27:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:48784 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727326AbeLEK10 (ORCPT ); Wed, 5 Dec 2018 05:27:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AB560AF17; Wed, 5 Dec 2018 10:27:24 +0000 (UTC) Date: Wed, 5 Dec 2018 11:27:22 +0100 (CET) From: Miroslav Benes To: Petr Mladek cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 10/11] livepatch: Remove ordering and refuse loading conflicting patches In-Reply-To: <20181129094431.7801-11-pmladek@suse.com> Message-ID: References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-11-pmladek@suse.com> 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, 29 Nov 2018, Petr Mladek wrote: > The atomic replace and cumulative patches were introduced as a more secure > way to handle dependent patches. They simplify the logic: > > + Any new cumulative patch is supposed to take over shadow variables > and changes made by callbacks from previous livepatches. > > + All replaced patches are discarded and the modules can be unloaded. > As a result, there is only one scenario when a cumulative livepatch > gets disabled. > > The different handling of "normal" and cumulative patches might cause > confusion. It would make sense to keep only one mode. On the other hand, > it would be rude to enforce using the cumulative livepatches even for > trivial and independent (hot) fixes. > > This patch removes the stack of patches. The list of enabled patches > is still needed but the ordering is not longer enforced. > > Note that it is not possible to catch all possible dependencies. It is > the responsibility of the livepatch authors to decide. > > Nevertheless this patch prevents having two patches for the same function > enabled at the same time after the transition finishes. It might help > to catch obvious mistakes. But more importantly, we do not need to > handle situation when a patch in the middle of the function stack > (ops->func_stack) is being removed. > > Signed-off-by: Petr Mladek Acked-by: Miroslav Benes M