Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3097818yba; Tue, 16 Apr 2019 04:48:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqySBkxy5jVClutgWFp4DJKnxX/4KfbJewW/65hM6GNIYdCslzL6CAf+iugULyZe5pCW1DEN X-Received: by 2002:a17:902:3324:: with SMTP id a33mr14313121plc.186.1555415336405; Tue, 16 Apr 2019 04:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555415336; cv=none; d=google.com; s=arc-20160816; b=q++CQFKr4bvzQ5ffAmcYA7r1f2neeeeGdyagep+Sii0zbDhvOYntkdGiz1/sXMrPgq oi97tfCME6bTrEoMfQQc7McKnh8g+5teO9XDyLXgpCxLXjNJ9NrrEb/lhm6wqNhJ2dwD +3cR3LMIWc9IvD6V0AHNEC7BzX7vb69RU3JEw/HLg4HaE0pzRMHhL8JZ3LWbhJYX+mbc tRuQHYPzBsVq98V3GyNqTFnF9rn5gMSfq0/gpntOQmj5aBxt4aBKVPVtkGk+67cqHBQ1 r/n/M3tQWvWGWfkZmatt1Xyy6VtvBWin55Y9ylzMZtDPpWIefc4K/a7nnDfvC3qKbpBr f+IQ== 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:dkim-signature; bh=9d2iNemhtwVcPkUMSPS+XnThDVwrnGDhGV3F4lfbTdQ=; b=dP0tTRgBOEF905FtiF9UIqHVmYS44MMIwA7wuG6ozAnh2VwsfU5e7P0xRjdB3RLHdn BRPlTDekCOn9LvhJKH1s5B/QsjsWpbZwbwNpPIohjj0NdIqSDoWUlK35R2VkklSxUS/j zoPm3jZJy9YKomRsGQWPmGtlq9MWqYDNi0piKVSAINmhPwyqrBWIvi8ZTPO2v6nt7bZo grQxKmpuDwvZI2hSgGG/hl/QADksz9cq1UI0pu0l5IkjYrQHUSMhWT1Mf6+aBqXmi6IC q8NwKi//f0l6Cbd50ShGhGsMbQYkPA47jsspUGwEx7MK7JzSvS2W9BFiw18mph+VMvmT aquQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xAUUKmzG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b68si31533238plb.351.2019.04.16.04.48.39; Tue, 16 Apr 2019 04:48:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=xAUUKmzG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729409AbfDPLrh (ORCPT + 99 others); Tue, 16 Apr 2019 07:47:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:56524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfDPLrd (ORCPT ); Tue, 16 Apr 2019 07:47:33 -0400 Received: from pobox.suse.cz (prg-ext-pat.suse.com [213.151.95.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1BA3420821; Tue, 16 Apr 2019 11:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555415253; bh=0KKGx3IRUURgFXSBzz2yswNUax5ucs9Dd5rxwhu98EU=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=xAUUKmzGkB3UQ+IYvEQOllslO+vZl06kp3pB1Iainxq6i3byweobRbJKV7ACIAWS+ nuQfStbfbfxHa/7PH7DxcQwNKyr5BC9GYpmsM45I6BGl5DSbHNbNDxPLdnu40HKhU0 rxPaFa3zYj8N9fYTFooo5aCZVwE5mFI6DdQhucT8= Date: Tue, 16 Apr 2019 13:47:30 +0200 (CEST) From: Jiri Kosina To: Petr Mladek cc: Josh Poimboeuf , Kamalesh Babulal , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: Re: [PATCH] livepatch: Enforce reliable stack trace as config dependency In-Reply-To: <20190212094608.bzwc26j67daqnx6x@pathway.suse.cz> Message-ID: References: <20190209091728.23046-1-kamalesh@linux.vnet.ibm.com> <20190211140813.z7kap634gz3gp6a4@treble> <20190212094608.bzwc26j67daqnx6x@pathway.suse.cz> 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 Tue, 12 Feb 2019, Petr Mladek wrote: > > I think I'd rather go in the opposite direction: allow the patches to be > > loaded. Then they can be forced, if needed. That enables both compile > > and runtime testing. That way we don't make any backward progress, > > until such arches get reliable stacktraces. > > Do you mean to convert the error into warning? > > For example, the change below. Note that I did not mention > the possibility to force the transition by intention. It is risky > and people should not get used to it. > > Heh, I think that this was the main reason why it was the error. > We did not want to get people used to forcing livepatches. > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index d1af69e9f0e3..8d9bce251516 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -1035,11 +1035,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("Only one livepatch can be installed.\n"); > } > > - This seems to have been lost. I think we should take this aproach before Miroslav is ready with realiable stack traces for s390. At the same time, I'd suggest issuing a proper WARN() there instead of just pr_warn(). The kernel might be in a potentially funky state, so let's at least get the 'W' taint in place. -- Jiri Kosina SUSE Labs