Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2878216yba; Sun, 28 Apr 2019 11:09:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzX+P4JiLMItnQUYGW97TTZnBVdaySuJHfwEkD6762yryAMjaO4DbTQ/b5KCNvShVqOnLnm X-Received: by 2002:a17:902:6946:: with SMTP id k6mr2358260plt.81.1556474982157; Sun, 28 Apr 2019 11:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556474982; cv=none; d=google.com; s=arc-20160816; b=mlDvjpK1g2WEfZ6a4Gg3cXVi8BRPt+Ka1Q3HxVR6X/jgCoCaZl5DdP6vVFfqgfdBuS iNEA34l89iOGRggbkg5Au+sqchimYoOdOeZCW1cpJxAUbhr206W48zAL75si3zr+s2La Mh+yi25BeU5rEAPatMQjNgQqgCwcG+jany0rQ2HR9w6Zc8wo3fQWarQsPBs6zkQ7jr9q S+XNvGmx7ika+Q9BLVOF+Fq3o4IDXS9+KNvkZVT+dvvzfXluB/fyxyVxP8F+sOpauDZU hBb6Nun33K9Ze89aFIOdV129NMQkr45wSU4YoG0JifCJs9oECqFf05DCgTZdIlxt94Cg 4WVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=FYD656bv9iAQBWULjvE+VvlBMmnQrd2nUgj+MzkTcdI=; b=NLKgSQK7jjZmw0jXxigiRD7T7/7/W4mRCLugKZkHLJkvZs1FbGI96G6fUM52XOO5hY r1+Ra0C9umIrdCSm2GZUNJylgU1SlWzR87QKRwwziB1z45O5oDvVx9zP1iudTYWw9aFy rB35Pz8DqJHuYgc0HYXaDX9vAj11YJPedshJzjjMhQtuSbnsKhqGUnIsZ3mvH2H24BbN TjpsEwzPOLkCRxsf9UGi8myQ68Wv6quZBJWkefQkpt5eptPtB7x/VfUDyBOogRF6uCMI a0y41e9J/snDvwoXwYqZ4a7wJ7pVE2HwzhJK/JF2jSZ2N9NuIGapsAywJt35jQ9OQUeh A4bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=UZWXkJs8; 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 y29si30417207pgk.120.2019.04.28.11.09.26; Sun, 28 Apr 2019 11:09:42 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=UZWXkJs8; 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 S1727072AbfD1SIh (ORCPT + 99 others); Sun, 28 Apr 2019 14:08:37 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:37993 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbfD1SIh (ORCPT ); Sun, 28 Apr 2019 14:08:37 -0400 Received: by mail-pl1-f194.google.com with SMTP id f36so4000408plb.5 for ; Sun, 28 Apr 2019 11:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FYD656bv9iAQBWULjvE+VvlBMmnQrd2nUgj+MzkTcdI=; b=UZWXkJs88BO0LKLomMd82kO6ETPL7CwePZN7DGDD2kgmaUnG8kA29ccqjcUqDugbU6 6SF3vWvMZtdaYfBWEvlRAw+RJ3ORwiu19tv/cWhjDGx8OVarl5Qq5+PpeqBUvY/JYfIX yFd+Qjpcl43xjMKiuhnB5AfM6X+ojHLv2sMRmY4Df4jg/IlwrUVlescOfiCZKlEnG7z0 15iItOHIQJz1IAQUoh254FVMqyGPoeGSAcXu/3AqjEAyWJBKTOhamyf4weuq1o9Yw34E 8RAbcVrUS+VtHDxsbYOvsrWMwyfj3AAIwJyo2kP4kSkkjvWkF4A//ydnQB7ATrtWAARP CtDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FYD656bv9iAQBWULjvE+VvlBMmnQrd2nUgj+MzkTcdI=; b=ExHlkBixpsu6vSf8s7HravuanXgcIK4IygoV77JdG5lHLp3SwDoFskzQyRRgTEsnzf H8MXadx4CFtKRZEyR2GRQz0J964pGyfXekH+kijI/eRZD0kb2ZrkQG4kaokgP0O494Pn jm6i7pTCO5xbCQikmEayuDwS4OFDYYpPmv1FTs4eJI6MQXGcwyaU50eFxFnrEPTogTb3 mp+uz5eXMQF4w8L/9tnBJ9/sXl844ecYTQVdjKi58H0XflwB/OUT6kMWvmFiKmiEaOg2 UZqVjQDJvJHQYYDzfpS7CoW0Vz31cGH4lH0/wqT9MpoCz3UjSQkYdmT/csQjKFgzgnz9 y82Q== X-Gm-Message-State: APjAAAWmWoTmgzm35GP7UpShgIbboWZTwIRUnuumB3hnyWNRp9onm1kI xLp8CzAlPo7XtNKQ7Wjjafg06Q== X-Received: by 2002:a17:902:b181:: with SMTP id s1mr35385995plr.9.1556474916540; Sun, 28 Apr 2019 11:08:36 -0700 (PDT) Received: from ?IPv6:2600:1010:b144:c2ea:2812:6533:d7:28e? ([2600:1010:b144:c2ea:2812:6533:d7:28e]) by smtp.gmail.com with ESMTPSA id b13sm42408198pfd.12.2019.04.28.11.08.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Apr 2019 11:08:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/4] x86/thread_info: introduce ->ftrace_int3_stack member From: Andy Lutomirski X-Mailer: iPhone Mail (16E227) In-Reply-To: <20190428135143.09d35bb6@oasis.local.home> Date: Sun, 28 Apr 2019 11:08:34 -0700 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 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190427100639.15074-1-nstange@suse.de> <20190427100639.15074-2-nstange@suse.de> <20190428135143.09d35bb6@oasis.local.home> To: Steven Rostedt Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 28, 2019, at 10:51 AM, Steven Rostedt wrote: >=20 > On Sun, 28 Apr 2019 10:41:10 -0700 > Andy Lutomirski wrote: >=20 >=20 >>> 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. >>>=20 >>=20 >> That=E2=80=99s quite an assumption. I think your list should also contain= >> exception, exceptions nested inside that exception, and machine >> check, at the very least. I=E2=80=99m also wondering why irq and softirq= are >> treated separately. >=20 > 4 has usually been the context count we choose. But I guess in theory, > if we get exceptions then I could potentially be more. >=20 > 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. >=20 >>=20 >> All this makes me think that one of the other solutions we came up >> with last time we discussed this might be better. >=20 > +100 >=20 > Perhaps adding another slot into pt_regs that gets used by int3 to > store a slot to emulate a call on return? >=20 >=20 That=E2=80=99s not totally nuts, although finding pt_regs isn=E2=80=99t enti= rely trivial. I still think I prefer an approach where we just emulate the call directly.=