Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp963886ybk; Wed, 13 May 2020 18:39:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxavpIiUrBnMFrBkwtQ3+kl2qFHO49plcZLANAYWntd0R0ETtaw5B2nJHNGXaPeDgNc7+eZ X-Received: by 2002:a17:906:a415:: with SMTP id l21mr1816936ejz.100.1589420368724; Wed, 13 May 2020 18:39:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589420368; cv=none; d=google.com; s=arc-20160816; b=yOc+TpFXObOOtIfzC2Oow3RcIbV5bP0rmHBj1Uzihpg5caM0FrbDPoh3wh7ubBz8n6 u+vXOIIe7g7XOev7E7nC6CW6PHZkeXEEivvn+QbvRjLSnFcjQ33cIGYDVVjxRSG1S3+F E7e1JoEmjc2PYe5h/P1FXCLY8ybFKiOkD9+9D4UaApE/HWMo7zQN2mMco2EE6rLxn2Kl bShA/8KFrmp2BNMNnIhwbIomgCfpM9YQBCkZG8ltOcjBJ4iCmaiUf1F2mlvLPkDwtRLV BpMjtRvlYnx3CPSUnsFFPUTPfVuokgS0nEoGs2AndnHCB1WkC0o0/CtBWqRp8YC131yC lJrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=ZVHBCjxkrGEodwBNIRUG1uMkUWDGDtQ7oSthSg/nj84=; b=QWh3c7sggtrrc3h7Eyn3qUe6E2Fko/moZ7rGu3LIL57QdgBceLk34zTaDOmT/Il2vU HRRu7BYOMY+FzJWMDZDEo7qkowE9bnpHbUzbss+aDnMneC2m2oT0n0cYeigO+OGRCh81 oie8GnNcK1F2WIzdsqfSNwYIfFjGgXaIcAeucTVX1wmDZJVefUJEHXHouVFZLMZ5Pzbs kgbLCtWlekOh3mEsn+Xr3zf+XP8P51an+IZ8a2wXcUzzZUxpwetNEVy922V3tVMj9jst CicHFa6kJmUe8D6r6sllvjsUAUDYScrwG6PH+ao/1PFpUgW5+SIjDyX/s2FCsYxlQuYm Ec1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=gFupu26v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si950104ejj.92.2020.05.13.18.39.05; Wed, 13 May 2020 18:39:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=gFupu26v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727118AbgENBfo (ORCPT + 99 others); Wed, 13 May 2020 21:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725943AbgENBfo (ORCPT ); Wed, 13 May 2020 21:35:44 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24443C061A0C for ; Wed, 13 May 2020 18:35:44 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id z1so577860pfn.3 for ; Wed, 13 May 2020 18:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=ZVHBCjxkrGEodwBNIRUG1uMkUWDGDtQ7oSthSg/nj84=; b=gFupu26vQQOiPv25Ot4ItrGDlOxezLs3bOwwqudCcRfGeHg7wu4uKuHit3iWHWD/HI 0TCWOz6YWCbmBHJMLHOnxN82/nDihbWsG1Ev8gYSEliM/fM7R/NBdl7I0qm0LRgRZtpa co17IgdfcqKZVzvcFAlobv/D/cVR+SWsRGIghQeH9/5a4ANO1NA3U4vwbnT+AtSS/Aij xmVG63yqPojOuLlQJIlX0aE+HN0ssiqbsI9lhcCMwkfVYF2P6G3US9ODIlXBXSY1PBzx MWjVzDFvYx5MH5tGYFX8sp5M/dSlRze34CXKJPVbJAJjwW0F9axb6zV42lkhH1HvqVxF S8Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=ZVHBCjxkrGEodwBNIRUG1uMkUWDGDtQ7oSthSg/nj84=; b=Xyue2aRfH0FRB9ZapWDxV/BGGHpdm7mBASxy2h4tlFaWeHqY0XuowbQ/X6TtMUSIm/ YrIESzVat42FX5FekTVTYS0WkbZJlOTzs8VsQYxJVg4Mh3mub/ixdecX8G/bJN7xCOOg DV2fKaMAMUdx9bKBOmE2QRilCsV/EgOhTuAOA+hFLB9XjxBb4tnQ0bKbv6hfQNl5jmDH Z7L5laX+X7rK3P9f68EREyoIl14hsLQ0ADoqHEPJlb2OASTjUTiYCocQbjVd3ucA9yK6 wYDHtlwxUf6yzZ4RLROGq+QDWfA5oY/jSxRwJ/gvXieF44Gyg5P01cJOmpOOKztxe3lk MIXw== X-Gm-Message-State: AOAM532s2XCpFe9VnfRQdP+qi86E/uHdh45Wk7hB+GpplBYptiG4N3YI YoqEzH8xWcqnR+sIMmKK597X3g== X-Received: by 2002:a63:f94f:: with SMTP id q15mr1948953pgk.256.1589420143604; Wed, 13 May 2020 18:35:43 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:4dac:bfc1:d4fa:716f? ([2601:646:c200:1ef2:4dac:bfc1:d4fa:716f]) by smtp.gmail.com with ESMTPSA id a16sm704383pff.41.2020.05.13.18.35.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 18:35:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [patch V4 part 3 01/29] x86/traps: Mark fixup_bad_iret() noinstr Date: Wed, 13 May 2020 18:35:40 -0700 Message-Id: References: <807929267.20601.1589416908153.JavaMail.zimbra@efficios.com> Cc: rostedt , Thomas Gleixner , Andy Lutomirski , linux-kernel , x86 , paulmck , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , "Joel Fernandes, Google" , Boris Ostrovsky , Juergen Gross , Brian Gerst , Josh Poimboeuf , Will Deacon In-Reply-To: <807929267.20601.1589416908153.JavaMail.zimbra@efficios.com> To: Mathieu Desnoyers X-Mailer: iPhone Mail (17E262) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 13, 2020, at 5:41 PM, Mathieu Desnoyers wrote: >=20 > =EF=BB=BF----- On May 12, 2020, at 9:51 PM, rostedt rostedt@goodmis.org wr= ote: >=20 >>> On Fri, 8 May 2020 17:39:00 -0700 >>> Andy Lutomirski wrote: >>>=20 >>> On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner wrot= e: >>>>=20 >>>> This is called from deep entry ASM in a situation where instrumentation= >>>> will cause more harm than providing useful information. >>>>=20 >>>=20 >>> Acked-by: Andy Lutomirski >>>=20 >>> Maybe add to changelog: >>>=20 >>> Switch from memmove() to memcpy() because memmove() can't be called >>> from noinstr code. >>=20 >> Yes please, because I was about to say that there was changes that >> didn't seem to fit the change log. >>=20 >> I would also add a comment in the code saying that we need the temp >> variable to use memcpy as memmove can't be used in noinstr code. >=20 > Looking at an updated version of the tree, I see the acked-by from Andy, > but not comment about switching from memmove to memcpy. >=20 > Also, I notice a significant undocumented change in this patch: it changes= > a this_cpu_read() (which presumes preemption is enabled) to a __this_cpu_r= ead(). >=20 > So the 100$ question: is preemption enabled or not in fixup_bad_iret() ? A= nd of > course that change should be documented in the commit message. >=20 IRQs are off, and, if they were on, the lack of a warning from the percpu ac= cess would be the least of our concerns here. > Thanks, >=20 > Mathieu >=20 > --=20 > Mathieu Desnoyers > EfficiOS Inc. > http://www.efficios.com