Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp466527yba; Thu, 9 May 2019 00:26:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmI6QTIQYGc8WZAY/ubpVtWjFMs28zVdODfedN4cVcBH9oNc3S7nRXy8na9QU8SKPLVp+d X-Received: by 2002:a63:e24:: with SMTP id d36mr3569929pgl.80.1557386761598; Thu, 09 May 2019 00:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557386761; cv=none; d=google.com; s=arc-20160816; b=ypZL6J47Dsj0jYFW9MnFgTGssm6khersF9Li1t9n9WFCCGzUuRtqyxU4TgNRfo2m7K Lvr1qRBaWYrU+WpCnXSbcM1b/CLOyyLhht3m4xXk4qUJMd/1gqnX5q5iUoUEVcNV4+o1 B3NGyNJfZ5NKheKtbca0Xr73yAOp+uEPUMqb/I/kQoRJz/8dUmpECRfa+3dCC1NHhmgH TPuQHQA698+pBCs9EAt/ezEwi8kL4jbzbbGHWG3QOnXzjT59jPf0Yr1b+6k9+SA2sqa8 djpcgYXla50n22IqtpLxOfQ6Y9ItAMevvNrbTUPDTzPfGextvSDg5nVqTl5NH3kOc+U7 x4+g== 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=Lfw9elUKXYDlA0PaCjzPErT2jelKTEWgVePtzECvkus=; b=vELnoYFvo/P7KzuSmwvnxZNbmNkEdyo9bdocWpBZCavh3dy9s7HphNmEsWzEsXlgOv n2mHfJQ1QfVJR1nW7lcwNRSQ8blhb1VGTprZXhsn+U5DsmamuwL8Ix8pexL54dHuShRx VHlPbdoiaaZMNFzJnSN1tH6p/b6bNOHCXQTNwQ2g9jxom3ly17PUjX1ASlJL1TRL3S2V j3GLfp5/238/cu4kCFagXY47hTnzGlJa9TPKRrG7SN7cQJW/G+JJJoGbqqVPPN8yFmTV kg8X/URAXAFRTdtZx2PRXP+VrONP1JoOumAJjHmhaPSua1y5ndS7GOXKAmNmoy4hP3dQ X/UQ== 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 r8si1854127pgg.345.2019.05.09.00.25.44; Thu, 09 May 2019 00:26:01 -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 S1726617AbfEIHYz (ORCPT + 99 others); Thu, 9 May 2019 03:24:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:35930 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726549AbfEIHYz (ORCPT ); Thu, 9 May 2019 03:24:55 -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 EED45AC24; Thu, 9 May 2019 07:24:53 +0000 (UTC) Date: Thu, 9 May 2019 09:24:53 +0200 (CEST) From: Miroslav Benes To: Josh Poimboeuf cc: Petr Mladek , Jiri Kosina , Joe Lawrence , Kamalesh Babulal , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] livepatch: Remove duplicate warning about missing reliable stacktrace support In-Reply-To: <20190507212425.7gfqx5e3yc4fbdfy@treble> Message-ID: References: <20190430091049.30413-1-pmladek@suse.com> <20190430091049.30413-2-pmladek@suse.com> <20190507004032.2fgddlsycyypqdsn@treble> <20190507014332.l5pmvjyfropaiui2@treble> <20190507112950.wejw6nmfwzmm3vaf@pathway.suse.cz> <20190507120350.gpazr6xivzwvd3az@treble> <20190507142847.pre7tvm4oysimfww@pathway.suse.cz> <20190507212425.7gfqx5e3yc4fbdfy@treble> 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 > > > But I think Miroslav's suggestion to revert 1d98a69e5cef would be even > > > better. > > > > AFAIK, Miroslav wanted to point out that your opinion was inconsistent. > > How is my opinion inconsistent? > > Is there something wrong with the original approach, which was reverted > with > > 1d98a69e5cef ("livepatch: Remove reliable stacktrace check in klp_try_switch_task()") > > ? > > As I mentioned, that has some advantages: > > - The generated code is simpler/faster because it uses a build-time > check. > > - The code is more readable IMO. Especially if the check is done higher > up the call stack by reverting 1d98a69e5cef. That way the arch > support short-circuiting is done in the logical place, before doing > any more unnecessary work. It's faster, but also, more importantly, > it's less surprising. Correct. I forgot we removed return from klp_enable_patch() if klp_have_reliable_stack() errors out and we only warn now. So reverting 1d98a69e5cef definitely makes sense. My... "We removed it in 1d98a69e5cef ("livepatch: Remove reliable stacktrace check in klp_try_switch_task()") and I do think it does not belong here. We can check for the facility right at the beginning in klp_enable_patch() and it is not necessary to do it every time klp_check_stack() is called." ...from the other email is rubbish then. Miroslav