Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp467360yba; Thu, 18 Apr 2019 04:31:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6MvrBhau9Ch+GIh9u8aeUMjpKjaTebMk4s/J04f6wXqi4IB0xXEXTm7EF6UjmJvu1Aaon X-Received: by 2002:a17:902:20c9:: with SMTP id v9mr73688961plg.239.1555587080486; Thu, 18 Apr 2019 04:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555587080; cv=none; d=google.com; s=arc-20160816; b=UYxaLdG4pQo2BQqJqY67Ic4dgDA9gjTmmsDKAMZH4S+y2eN62ErzMffZuC1Lft8pbT cwANoCwEYE3DTKP8c4CbvGCF3pq5OuCqo3ymsGwbYxLZA3+dZ9IFfXpzd7Z6NQoO3sOB +G+9Opf8BrpIa+jMVPqYqRqqGKJ2yqTaEjMRsYnfzVaAhHJc81cltXXzh3K7z2YDGamM hbZxjQ8PVdbvxzUZz6m/YI8gAZPTMwOPqp5F6/eCR+BBkJhBo1ug5KGTIRbGbKeWCNxb kw+7lF62UiUYqWcNKxKFvUdgN2pXVuxSbHUBHUUPFtANDRPw4BPeLRPG3jmoJ/ftWB2N h+dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=iAuDF9bqDjvxRHbg/vc3FTNHqtGIw496gNzBGfQ8PiQ=; b=VmhG7Pz282nRbH3xg8X8VYX1VePhzX0AO3tPfZDlTN36x9293cnOacaf0kYkxneAVD Gm5++sT75tHnlGFpr8EXFU9e3sX2W4G0G+pdtocid4Llilc55W8J2cD2of1vQgmfucfY ZY86FEpSsSbCP2UfwlS/+axvUSjOf0NFmGlNMGZ14Gm3x5JEUypV7PWaxUSNymCy/OO2 mcnQBJgYBWyYPOqSXIJLUkHyEiE4sUibN/as4AybWiDzg4NXvJfPt6jyByxuTAkUXaM3 5eg6DtPdOAOH8Jrwqib4KT7OD455N/nIo0HFwhOm0UX6yV8kieEbzAsx4emHe4TWd+yz gb9A== 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 f2si1680199pgc.182.2019.04.18.04.31.05; Thu, 18 Apr 2019 04:31:20 -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 S2388790AbfDRL3s (ORCPT + 99 others); Thu, 18 Apr 2019 07:29:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:42558 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728074AbfDRL3r (ORCPT ); Thu, 18 Apr 2019 07:29:47 -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 ABCCFAE60; Thu, 18 Apr 2019 11:29:46 +0000 (UTC) From: Petr Mladek To: Jiri Kosina , Josh Poimboeuf , Miroslav Benes Cc: Kamalesh Babulal , Joe Lawrence , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Mladek Subject: [PATCH] livepatch: Convert error about unsupported reliable stacktrace into a warning Date: Thu, 18 Apr 2019 13:29:36 +0200 Message-Id: <20190418112936.13295-1-pmladek@suse.com> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit d0807da78e11d46f ("livepatch: Remove immediate feature") caused that any livepatch was refused when reliable stacktraces were not supported on the given architecture. The limitation is too strong. User space processes are safely migrated even when entering or leaving the kernel. Kthreads transition would need to get forced. But it is safe when: + The livepatch does not change the semantic of the code. + Callbacks do not depend on a safely finished transition. Suggested-by: Josh Poimboeuf Signed-off-by: Petr Mladek --- kernel/livepatch/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index eb0ee10a1981..14f33ab6c583 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -1003,11 +1003,10 @@ int klp_enable_patch(struct klp_patch *patch) return -ENODEV; if (!klp_have_reliable_stack()) { - pr_err("This architecture doesn't have support for the livepatch consistency model.\n"); - return -EOPNOTSUPP; + pr_warn("This architecture doesn't have support for the livepatch consistency model.\n"); + pr_warn("The livepatch transition may never complete.\n"); } - mutex_lock(&klp_mutex); ret = klp_init_patch_early(patch); -- 2.16.4