Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4024322yba; Mon, 29 Apr 2019 12:25:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxutF0AgqhQ1cFunetdiuGdg2Ug38Mknrey0GUT/73ZbuIkxSePUC1kYInyFUTdWe+Q3GiJ X-Received: by 2002:a62:5542:: with SMTP id j63mr827423pfb.34.1556565953285; Mon, 29 Apr 2019 12:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556565953; cv=none; d=google.com; s=arc-20160816; b=kLfEU/zyu+UM1oAmgyiEOlG4iOO3uGF5DjhVPYaoaqZKhHephPG256Ti+ptVLSOqiZ 0s1xOR5X8oI3Ig/3fUe7lR6lI/jP4oBLP+4yT76YcgcBkxX2LnYM8691UYFTGVf+T5LT tDtRPsie1ru0zSSz44LutXJteAzBlF5HO2jT9covlRIZiSPv77elfGrHEw2rekXxk9Qo dBCFbSqicdkDmUCazWiknaFiiXeqxaR09KRHd3jH6nlV9+Yt0Zo1OA8G78H12wV0R+2W y2tQng7Ah7dfrxwSZnLKF1b3a6HlRHvJEehTRJxX8kA1sOQ5urHd7QdVWH3qUiJdz70K y1uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=x15O556ypFT8Ka/tbgfrNdH61aeIPfbaneBnqM2aHfE=; b=lfhEMKzMJzvQ4JZD3BSPpvw2tWcLw+Kn2Ix1U9GB3nuKIIHs1pz9JIgxLVs6znMFDi D79u0vP361j7zJopXzJ9dseVfby/EnlaZgTesEI8suNgtTrDf206fNPMTb8ELDo14mK8 BT3Na6n750qzCz12ASzdVLu5gJDIBW0SuxSGuPXX9p6ILc7SRKC/6tI/F8SPtQQFUEt6 LG9QC1VMryUFlNqVesRFhxp04nChYsmldSzAP3rKt0x1kZH5qdTNZkwze/Qk7jUUP4+7 +q9R36dfREUGedI0D5vhywhsgRt6zTHKxYII2ybQC1UmZS0ilZlmqNfVGiMep/RJWxrZ OhyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DXjxbd2L; 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 k4si13495158pgs.232.2019.04.29.12.25.36; Mon, 29 Apr 2019 12:25:53 -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=DXjxbd2L; 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 S1729188AbfD2TYk (ORCPT + 99 others); Mon, 29 Apr 2019 15:24:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:41156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728928AbfD2TYj (ORCPT ); Mon, 29 Apr 2019 15:24:39 -0400 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4BCD5217F4 for ; Mon, 29 Apr 2019 19:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556565878; bh=Fu/hOYIZwVfzmJTjU83cB5kYU+/G8jx9tdKv57qTrFw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DXjxbd2Lmoo7ZhT4rQRWlNx5tEMhMkUhhz6oNcEqKJmks+85LbaOlYELmHhzWnmXw t1P35R8xDyDyVPx7mebki/bK7xMFQYVF//VBvJS31jfq0Z83F3sRF6+kJgN2WhRHD1 1yPl5zKEp0fXgsgRq3kEdoNEfBSDGCCwrnFjQTJw= Received: by mail-wm1-f43.google.com with SMTP id h18so736025wml.1 for ; Mon, 29 Apr 2019 12:24:38 -0700 (PDT) X-Gm-Message-State: APjAAAVXuukoxD7yt7DVFpwNPVAz8yTCRBh4waHBugk+qHEQ8Fky5M7B lS346lj6+zgPLXLIAipDYrcHo8j3fz8LGDbWP18uRA== X-Received: by 2002:a7b:c257:: with SMTP id b23mr415036wmj.83.1556565875080; Mon, 29 Apr 2019 12:24:35 -0700 (PDT) MIME-Version: 1.0 References: <20190427100639.15074-1-nstange@suse.de> <20190427100639.15074-4-nstange@suse.de> <20190427102657.GF2623@hirez.programming.kicks-ass.net> <20190428133826.3e142cfd@oasis.local.home> In-Reply-To: From: Andy Lutomirski Date: Mon, 29 Apr 2019 12:24:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/4] x86/ftrace: make ftrace_int3_handler() not to skip fops invocation To: Linus Torvalds Cc: Andrew Lutomirski , Steven Rostedt , Peter Zijlstra , Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Shuah Khan , Konrad Rzeszutek Wilk , Tim Chen , Sebastian Andrzej Siewior , Mimi Zohar , Juergen Gross , Nick Desaulniers , Nayna Jain , Masahiro Yamada , Joerg Roedel , Linux List Kernel Mailing , live-patching@vger.kernel.org, "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 12:13 PM Linus Torvalds wrote: > > > > On Mon, Apr 29, 2019, 12:02 Linus Torvalds wrote: >> >> >> >> If nmi were to break it, it would be a cpu bug. > > > Side note: we *already* depend on sti shadow working in other parts of the kernel, namely sti->iret. > Where? STI; IRET would be nuts. Before: commit 4214a16b02971c60960afd675d03544e109e0d75 Author: Andy Lutomirski Date: Thu Apr 2 17:12:12 2015 -0700 x86/asm/entry/64/compat: Use SYSRETL to return from compat mode SYSENTER we did sti; sysxit, but, when we discussed this, I don't recall anyone speaking up in favor of the safely of the old code. Not to mention that the crash we'll get if we get an NMI and a rescheduling interrupt in this path will be very, very hard to debug.