Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2344377imj; Mon, 11 Feb 2019 00:55:28 -0800 (PST) X-Google-Smtp-Source: AHgI3IaNy7BERTQxtf+7EC1KKqaLnH0J1MZf2yGytLkqr5uSu2DEvKJmO6suVsYU3VDeMmAHP+uD X-Received: by 2002:a17:902:6949:: with SMTP id k9mr13148439plt.188.1549875327975; Mon, 11 Feb 2019 00:55:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549875327; cv=none; d=google.com; s=arc-20160816; b=Mw91vks8Cl8PPlq0JMq4J8v6ce/zleGVlcrg24kgf2ZT8Wqa0oHa4pxIVDbauCPDVG sLbKsIr1vd32lR4v6BW4dWo1hM79sTrOXn2fkFr+CgUw6Nmcd6+/azcy6feOir8yQtui 29G6pp2UGTqZSp1phn3Qfdg4IQJiaJlZr9h7QPnIwDGEBsAnUWMca92m97uYp+31L9/J d/Bg7DQ8gh6UdP0WdxFGXsGgLRfUaTFjCFuaVvEfQQ7FVJ6D7xKBFtWHvS96gIq8cGaX /mmShpWp4ltiyT38RQ/rhNZz92HYoZLuS8pwwwQCVNhs2ULFy2CXmoQ+Boi67hr7foSC U6Ng== 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=O34pfEKaoXAf/laEC8WlQYLkSk/3/fQyY/evQGknpyA=; b=afqefX31+kyNDClxXzECFcKCFI8Gjxb9keK8HIZTTSun16sSxvi70WewZVnvI3tV+r 2FnkdlzNjKcgfURt/XrsxK3EVVKo5Xw+/U+mJLCpZ6tNSYAZWjTWuH1g7aaBJHLxnIhu /QP3p1mRFLDj9tkS51iVrAbAehK1JVU195ErAAldzywSLlXqdQLifACjxBlRZE9nspAk GfazvB6FYRZ8gzi5FxptH0aI8upLpHroYPMTk2iqVuOf0Bf25rxSvaVjD/88btDglAyu +JrGSiJflItAW8X1wd17W51NNGnPPAsd9+Fi1Wg+nCnhEF4n3RtLRYdLbioz0mJ8pnO1 kc2A== 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 33si9668497plt.228.2019.02.11.00.55.11; Mon, 11 Feb 2019 00:55:27 -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 S1727045AbfBKIxr (ORCPT + 99 others); Mon, 11 Feb 2019 03:53:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:44834 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726891AbfBKIxr (ORCPT ); Mon, 11 Feb 2019 03:53:47 -0500 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 E4F69AF99; Mon, 11 Feb 2019 08:53:45 +0000 (UTC) Date: Mon, 11 Feb 2019 09:53:45 +0100 From: Petr Mladek To: Kamalesh Babulal Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes , Josh Poimboeuf , Jiri Kosina Subject: Re: [PATCH] livepatch: Enforce reliable stack trace as config dependency Message-ID: <20190211085345.xiyoto3u2joeajwt@pathway.suse.cz> References: <20190209091728.23046-1-kamalesh@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190209091728.23046-1-kamalesh@linux.vnet.ibm.com> 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 Sat 2019-02-09 14:47:28, Kamalesh Babulal wrote: > While the consistency model was introduced, architectures without the > reliable stack trace implementation could use the immediate flag for > livepatching but with its own limitations. > > After removal of the immediate flag by commit d0807da78e11 > ("livepatch: Remove immediate feature"), reliable stack trace became > enforcing dependency for livepatch support on any architecture. In > the current code, we ensure that the dependency is met when > enabling the patch during the module load. > > This dependency check can be improved by moving it to the Kconfig, > which disables the support for livepatching in the kernel for unmet > dependencies. This patch moves both HAVE_RELIABLE_STACKTRACE and > STACKTRACE under config LIVEPATCH, it also removes the > klp_have_reliable_stack() function. > > Loading a livepatching module on an architecture where reliable > stack trace is yet to be implemented, the user should see: > > insmod: ERROR: could not insert module ./livepatch-sample.ko: Invalid module format > > ... > [ 286.453463] livepatch_sample: module is marked as livepatch module, but livepatch support is disabled > > [pmladek@suse.com: Suggested to explicitly add CONFIG_STACKTRACE under > config LIVEPATCH] > Signed-off-by: Kamalesh Babulal Acked-by: Petr Mladek Best Regards, Petr