Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp937563ybk; Wed, 13 May 2020 17:45:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysVvd/JCBhIzgHjfxVhYN+WJLmtuSjLP/JLqA3FLdKlGJgyGYYIURjO+NVrMBZDya+1oiS X-Received: by 2002:a17:907:42fe:: with SMTP id oa22mr1553841ejb.98.1589417159602; Wed, 13 May 2020 17:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589417159; cv=none; d=google.com; s=arc-20160816; b=QehUosTU4I1AofY3siwgMs0wzzUsGm5YlreOzrSAiQ7IjIqh2c2mqDQ3QRFSrYHrtz Fp6U7KJ9fMmbw3B7e5Smu4L3WDgFIUC7gzgRvM27QGkS4Jbhk2NJL8G2HK8jfLf4o/vs IZHWYt7DjfprdkwnMVkrtxEjuZa+rz1CcHwiXaKfuWFvXzNUk8pSfbCM4v+b1qAdJnVB MInw+78qwGboN6iUIkNpEVBnJEie2b41lanNkDKQzda/fDk1sJ/1pLDJuOb61i/Rbxxs YHALc90lW/mVD8GGLgWhx+c9CCSh4+PTU7FR6scbtODBN9OeHBo1a15e4YsKRLY+REtM ZTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=3Wm/gvabudc8kHypFiCs++EznKCBk7qXSKbLh6j+DB0=; b=iq1nJiHZCfUlFetZRoyIblM55nF2OaL1ebB+as6EbT2T+4MnTj93lPADNS46k/0VjP kRs6rszxt145oD+9D+bBTAzz3y92HAH0ilo7PwnrjHdN524ICnle9lOdHAf3yztv6Z4h aNYxYJAQG7NkfcW2rS35QUTLrLY664xEqsHtv92oBPHXhUbrrlHFUwN/8Q2Z136ldLJ/ Hvq+UzRCWHl6r3mAgiIP1m0VnnlDp4rUeJg9TwomSZyOx4Ro6dHG8FWwgEM0zWeCojP5 1/q+J23gIjYXvbDCAzHW+A99eHZSK0t2a2bwNXlvve/bCjJlLkAeJk7D9L8QEiePu4uB /B9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=A84VVHvD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nz19si808604ejb.495.2020.05.13.17.45.33; Wed, 13 May 2020 17:45:59 -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=@efficios.com header.s=default header.b=A84VVHvD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733212AbgENAlu (ORCPT + 99 others); Wed, 13 May 2020 20:41:50 -0400 Received: from mail.efficios.com ([167.114.26.124]:44978 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733152AbgENAlu (ORCPT ); Wed, 13 May 2020 20:41:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id A55C82A0C9C; Wed, 13 May 2020 20:41:48 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id P8ONYUEstxRh; Wed, 13 May 2020 20:41:48 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4611B2A0C9B; Wed, 13 May 2020 20:41:48 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4611B2A0C9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1589416908; bh=3Wm/gvabudc8kHypFiCs++EznKCBk7qXSKbLh6j+DB0=; h=Date:From:To:Message-ID:MIME-Version; b=A84VVHvDOq2zBEqUOam5nR011/RxNd+jfUiao9wKPvkAG8XDm7KLpoYCs7W92PY1z 3Az84JohkE3Xb5c+BoxDCg6+JQNIw5jYn546Vh+KXIbYZvm3JZKIGRvU40nL5PJzbO EbMIqb0o4dL5y7aXCI9HuujNBCYLKM3/hJNRBYnQapyF/a91rSVxnmLSZhnI1cUAvp 5sOL0DecAFckThGtPfLjf5N3dQqLgK64dJitjY92Cr4JaBMlUw28sT3L4XqraNUIxl iJHaLL+SmWOahVhRFe7jCsrL+v1z4ta+0bCuWYsFzeS2RY/Qh5vp4NT+Z6j9we2mOA Y2uY4FlllmSyw== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id dLqbyldt-k10; Wed, 13 May 2020 20:41:48 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 2B9032A09AE; Wed, 13 May 2020 20:41:48 -0400 (EDT) Date: Wed, 13 May 2020 20:41:48 -0400 (EDT) From: Mathieu Desnoyers To: rostedt , Thomas Gleixner , Andy Lutomirski Cc: 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 Message-ID: <807929267.20601.1589416908153.JavaMail.zimbra@efficios.com> In-Reply-To: <20200512215108.5ea110b7@oasis.local.home> References: <20200505134354.774943181@linutronix.de> <20200505134903.346741553@linutronix.de> <20200512215108.5ea110b7@oasis.local.home> Subject: Re: [patch V4 part 3 01/29] x86/traps: Mark fixup_bad_iret() noinstr MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3928 (ZimbraWebClient - FF76 (Linux)/8.8.15_GA_3928) Thread-Topic: x86/traps: Mark fixup_bad_iret() noinstr Thread-Index: N3Znk34zz6brd7lyDamU+v8j7pOmBw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On May 12, 2020, at 9:51 PM, rostedt rostedt@goodmis.org wrote: > On Fri, 8 May 2020 17:39:00 -0700 > Andy Lutomirski wrote: > >> On Tue, May 5, 2020 at 7:15 AM Thomas Gleixner wrote: >> > >> > This is called from deep entry ASM in a situation where instrumentation >> > will cause more harm than providing useful information. >> > >> >> Acked-by: Andy Lutomirski >> >> Maybe add to changelog: >> >> Switch from memmove() to memcpy() because memmove() can't be called >> from noinstr code. > > Yes please, because I was about to say that there was changes that > didn't seem to fit the change log. > > 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. Looking at an updated version of the tree, I see the acked-by from Andy, but not comment about switching from memmove to memcpy. 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_read(). So the 100$ question: is preemption enabled or not in fixup_bad_iret() ? And of course that change should be documented in the commit message. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com