Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2866596yba; Sun, 28 Apr 2019 10:52:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiwrTOpFy+KkjDSMOdBUuwP/AYDMi4mywAJKkm/tHW1tmWALXFnWIvgIUP77LwiGtI2xH+ X-Received: by 2002:a62:2ad5:: with SMTP id q204mr58041718pfq.259.1556473978323; Sun, 28 Apr 2019 10:52:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556473978; cv=none; d=google.com; s=arc-20160816; b=CimdPhMe4JsyMGozIa+VOlStuqTqwZu9UJ7X1ivfh6CFwUkdkifcrApgDCl9dV+NYW oBzhT5LAsjvEWuftOJE8q4VEVfy9RhgNaGVE/WqQrLzh4x2Jyk2zXqAYnX8h+GC9ROoM KErwS+cIi7PQ/sfae8uYZarCSC7GSDSlPI9HPl8YBtdhXQa3ACi6wR+mnfg6CNHWypw8 vUy4DRgtoAb9r2BzIiPfMIum4EnYElUBKBgJXjkVeNQS4RTGWrAO+ysdunQGB2lRU8KD 7NYl9+6tjtokP6uLMpW5b1E7dVMho3DWFuwRtVdEn6EAsfwVFV6ufZaZaD/zW05kUHe/ 564g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=AioCkXz/VM9g59SEd9+3K4zTH5FZUJp0L99GkPnZ+G4=; b=GwvB8tTg1upAWSwdIzxdOdlyughFGyGc+ZoGoC6aqMO1lJS0voBhpyanTiNrlruH+f qWzUMFsfnJE8IFBu194XTXxNp6WZ6C5I82P4/v5aGj54lRq3Zho1fv47rIc7galz30XH uCL3TTsTTwjIkRddnXoaIM5ppn2U+YB77V80DfjtH/wRIZdu7Uf5hhkHALc6rcemJdrI u7645u6vYQ3AqPQaIkEMHgtA+ZMFCTmLKPMWggHXSlqqKjv3nMO8gStLFkemROjPWIVA qo5hAFidQ49LSZOiQZaGPGtGo3Ps6c+6oOXG6I6s1NXz1sR+5gC5biGxJlzbUqop8Mh5 jKeQ== 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 5si31669991plx.407.2019.04.28.10.52.42; Sun, 28 Apr 2019 10:52:58 -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 S1727061AbfD1Rvs convert rfc822-to-8bit (ORCPT + 99 others); Sun, 28 Apr 2019 13:51:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:33844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbfD1Rvs (ORCPT ); Sun, 28 Apr 2019 13:51:48 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 351F420679; Sun, 28 Apr 2019 17:51:45 +0000 (UTC) Date: Sun, 28 Apr 2019 13:51:43 -0400 From: Steven Rostedt To: Andy Lutomirski Cc: Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, 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 , Andy Lutomirski , Joerg Roedel , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 1/4] x86/thread_info: introduce ->ftrace_int3_stack member Message-ID: <20190428135143.09d35bb6@oasis.local.home> In-Reply-To: References: <20190427100639.15074-1-nstange@suse.de> <20190427100639.15074-2-nstange@suse.de> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Apr 2019 10:41:10 -0700 Andy Lutomirski wrote: > > Note that at any given point > > in time, there can be at most four such call insn emulations pending: > > namely at most one per "process", "irq", "softirq" and "nmi" context. > > > > That’s quite an assumption. I think your list should also contain > exception, exceptions nested inside that exception, and machine > check, at the very least. I’m also wondering why irq and softirq are > treated separately. 4 has usually been the context count we choose. But I guess in theory, if we get exceptions then I could potentially be more. As for irq vs softirq, an interrupt can preempt a softirq. Interrupts are enabled while softirqs are running. When sofirqs run, softirqs are disabled to prevent nested softirqs. But interrupts are enabled again, and another interrupt may come in while a softirq is executing. > > All this makes me think that one of the other solutions we came up > with last time we discussed this might be better. +100 Perhaps adding another slot into pt_regs that gets used by int3 to store a slot to emulate a call on return? -- Steve