Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2781858ybi; Thu, 4 Jul 2019 19:23:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmkguP+tHHMFSBYqX2ov4IMg+y/M18Vm+U16APKYwf3QNDkyLI6UUPURPymdpuOo3vSwPf X-Received: by 2002:a63:ad07:: with SMTP id g7mr1568396pgf.405.1562293394709; Thu, 04 Jul 2019 19:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562293394; cv=none; d=google.com; s=arc-20160816; b=a23sehEuNWlOFmgvOwL7Q7meIXdHdmtwPbPtVCNXK5BPSchCN6O90BhbgAOdP5MVcH 93t2jYs4ZrkS0v40Lit+lmbbrHOL7LEIpvMvYwoWSA4jillxu4LE8M1PboVqyLB/siMa QcGIfzjP1/Wj44bA9i4bOP6Vsh1D0bSvcIEr+iDdJ17gvWv2Xfmv4yrbtIIz8JdMWSbo rjwTTl7d5r7z8vDqKatyE5Fr+7qwTceTUzmePcy70QoT15AjVNrpiK4jnof2RhVq/hih L23KkNuZ3ATQovp+eAjs+sUFCKGgk8kJKZ7HmfT2z92xcsI0bwPfngpKjeJUZG+tXzHp SU5w== 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=ppmsU326jmCnGQtsgUl4Jwt/AQfrJLsdjvPTYcPdT6A=; b=gwtVRsnF0tClrI8K0Gs1HOnEzZfkoj1Kd20MvT9CWMOPSjQDiA1nGoYIz10LGG391h 1OjCsdOq/HPeZLg9zzWAs7RJNXZQxzJJxoq0YV+OQ0B1/pxINiun7ZGwGwu0a/PZkzOv Cw2YC94mxAPxpm+iQ5txUcXB/jK4SYsdqBuAIPAmCuISMgVCGl33Jb4+qkKDAmEr6Mxe zwYTi4DrxkkwAOtyZbZUfpLbrau6r0RlHd8PAAKSGFi4JLumx0CNXFhcIWdNK7oRpMLD vkxdOaXAFPMW35cfCEpTZKdQNQiKUNcfwEkbTvZpBNi8kqd3+4Ff/Ou6gL/VwnFbVmFQ HZoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Ijb3DsNq; 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 n3si6695101pgh.53.2019.07.04.19.22.49; Thu, 04 Jul 2019 19:23:14 -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=@linux-foundation.org header.s=google header.b=Ijb3DsNq; 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 S1727286AbfGECTM (ORCPT + 99 others); Thu, 4 Jul 2019 22:19:12 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39068 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726404AbfGECTM (ORCPT ); Thu, 4 Jul 2019 22:19:12 -0400 Received: by mail-lj1-f196.google.com with SMTP id v18so7685554ljh.6 for ; Thu, 04 Jul 2019 19:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ppmsU326jmCnGQtsgUl4Jwt/AQfrJLsdjvPTYcPdT6A=; b=Ijb3DsNqgNxMoBeF35blgNhG6L2yH/ppmCbwH3OrkeOuBkfG1xcIkS7V3Myi5KcuJs 1pJvWkzbxNxPjvI6fcnJu6l+8yGGpxehHYOlVZ3t9Mfp7poM1moTYV3BRlqn6zawnJTU vw+aijKTsdX5MdAJQjyZS1iXr9dMGupP5HYUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ppmsU326jmCnGQtsgUl4Jwt/AQfrJLsdjvPTYcPdT6A=; b=F10MUDuVXkFT04SyCUpxbeFZWJpo2hAPs7dLA7cMFRBMqlZES45RzFbO8LbQwZdx/a RlEKZ+oT7Jc3enVeomjR00MnbAxQAJLlf05MPaV7RJ+2ai4s+7agbFwRdkpAlvonc+w4 qWRgKUg+W9XhN36x/TR4iZKLpgmNpLLgs9bs3iWox1R2n9Y7aKI+sf5MBmC5REg72D8Z vI8CnQuqGxtsQrckhrdmzekRUuo2vvtd5K4ToagWaIZA/LR+PH4awArMpXHwpHq8J/tG U6yLwkVUbhHYdLKsVUWyzvJCbj03HedvexmEDbWJFneegKWsp6U7Ys2XloZDOIhtQ/27 1kiw== X-Gm-Message-State: APjAAAVQU5LbrJrJXs2MlfTs44+vQcwtQ1qpoX9iQD1dPcf10MYdKQCB sif5tiNMbK1RKhRdgFkXG62Uunk9Oix9RQ== X-Received: by 2002:a2e:9003:: with SMTP id h3mr576894ljg.194.1562293149337; Thu, 04 Jul 2019 19:19:09 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id l24sm1472496lji.78.2019.07.04.19.19.07 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 19:19:08 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id s19so4543729lfb.9 for ; Thu, 04 Jul 2019 19:19:07 -0700 (PDT) X-Received: by 2002:ac2:59c9:: with SMTP id x9mr663528lfn.52.1562293147609; Thu, 04 Jul 2019 19:19:07 -0700 (PDT) MIME-Version: 1.0 References: <20190704195555.580363209@infradead.org> <20190704200050.534802824@infradead.org> In-Reply-To: <20190704200050.534802824@infradead.org> From: Linus Torvalds Date: Fri, 5 Jul 2019 11:18:51 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/7] x86/mm, tracing: Fix CR2 corruption To: Peter Zijlstra Cc: Thomas Gleixner , Borislav Petkov , Ingo Molnar , Steven Rostedt , Andrew Lutomirski , Peter Anvin , Dave Hansen , Juergen Gross , Linux List Kernel Mailing , He Zhe , Joel Fernandes , devel@etsukata.com 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 Fri, Jul 5, 2019 at 5:03 AM Peter Zijlstra wrote: > > Despire the current efforts to read CR2 before tracing happens there > still exist a number of possible holes: So this whole series disturbs me for the simple reason that I thought tracing was supposed to save/restore cr2 and make it unnecessary to worry about this in non-tracing code. That is very much what the NMI code explicitly does. Why shouldn't all the other tracing code do the same thing in case they can take page faults? So I don't think the patches are wrong per se, but this seems to solve it at the wrong level. Linus