Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1088269yba; Wed, 24 Apr 2019 14:54:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwC/QS9tHc//Gou0HpN74FwVMlff3iMv+mfj8Jtujwiwhsci5N2r9/uiI0UdhTwsEmoHYvz X-Received: by 2002:a17:902:42:: with SMTP id 60mr35072083pla.79.1556142899832; Wed, 24 Apr 2019 14:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556142899; cv=none; d=google.com; s=arc-20160816; b=poPDmulkJaDWD8r+8HjTKqXBt1wovrmjAopM/LALWX0rXe6sYurdMIKD4VZlr5sNtr vgg34he4fpbwdU+n7yn8b2ExJPpelSJyj2ksPTll1bwSUnrVga7QyWBAqUTzUfUcMdE9 VsAy2huWSkLHAZ4RjCD10ix1wV6NDYOdaKtBybJgIx8dAli6aGRYDNOphSncsHRVr0+E f722DBKdjaAPgmwjkhMfYbuAi19/p9i+8SnmvyAPV+UuvFHiv/LM+gL58o4YBkmjzA1M UoIdSiGkiMyooHTzPILeP8Vb5NfQ828v9y4pO9S5P4BddYZgA1IJjOhrHHw6/4tWX518 fOmg== 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=vSaLnKL7J5udcLNdSjiM2D6BYt/U9C2cG+MrlCCckGY=; b=YELX+ZZiRduLysoGmUX7Hk0w+EbCjtKsdjW6UQBEvqBPeC41mM7jzoMH9vlKrNZMif P3y4DJMBnHZSigpxUOytoOyh6QkEwonEuIlTl5goUJ4+7MbrHdujq08zvzzMd7FfAOUO 3R58LEALyTe1+1GgQKSC4IMOIuROIhA2+SGhgNEm9h4KkRsyTkxELDz40biMY23Bh/On WAYM4bpbNh1erw824FgA8zLrfbboTJhx5WW4EfNnzviwSJUAqcSFaYmxV60TAEuVbJfx Po/Q9sZNGu1cg52c4RrXQ6olzV/H12tp0OsXL9oI1FxLzQYDZTpw8on2fR3vLFMB338s 6iwA== 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 t9si18656072pgp.273.2019.04.24.14.54.45; Wed, 24 Apr 2019 14:54:59 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731865AbfDXPve (ORCPT + 99 others); Wed, 24 Apr 2019 11:51:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42110 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730625AbfDXPve (ORCPT ); Wed, 24 Apr 2019 11:51:34 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D036F30BDA05; Wed, 24 Apr 2019 15:51:32 +0000 (UTC) Received: from treble (ovpn-123-99.rdu2.redhat.com [10.10.123.99]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B74BB60C64; Wed, 24 Apr 2019 15:51:23 +0000 (UTC) Date: Wed, 24 Apr 2019 10:51:20 -0500 From: Josh Poimboeuf To: Petr Mladek Cc: Jiri Kosina , Miroslav Benes , Joe Lawrence , Kamalesh Babulal , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] livepatch: Convert error about unsupported reliable stacktrace into a warning Message-ID: <20190424155120.pnau7k4qaavplpnv@treble> References: <20190424085550.29612-1-pmladek@suse.com> <20190424085550.29612-2-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190424085550.29612-2-pmladek@suse.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 24 Apr 2019 15:51:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 10:55:48AM +0200, Petr Mladek wrote: > 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 > Acked-by: Josh Poimboeuf -- Josh