Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2824140ybi; Thu, 4 Jul 2019 20:18:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNSN3RT+bJHcXCtClis0YZniC5fMsfP9TBQTMZEHncFlmc0CCf3XJrktvD6sAGFmbgkmrQ X-Received: by 2002:a17:902:204:: with SMTP id 4mr1902440plc.178.1562296710027; Thu, 04 Jul 2019 20:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562296710; cv=none; d=google.com; s=arc-20160816; b=PKucZAp9Gw/Tm97nhyOXMqtxudXzUMXHWbwoCrq153t7T9zjMEd4MiqxHhF45XyxC8 nElO/hHcjL0YojYrcclyFH4uSFhqHqkrx6QfjDeOQDRnOuRzukTJRx9Wr3MAH92o0p4E ejlmLIRQGdQP2Ha9jsqsn6KSJ7q59tCt7bA1dH2QCutn3lqv649LafPi+bHAJCrRxCZi yynWUFfkXO2qsNHnKyWkc1k69z/0ii4+n4CR7+auiwsRFZ954ddI4UpftN5bqpyOSsqG Cekig91C359EVDTdKXWR4yv1sF7ORc6P4SpHgx2UvNv+vCQER2N6v76G8vfS2iS4GRdT FxmQ== 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=aWklrXUceZD8WSljMzr7F6TlSTq4WKBAsYdg+zJZVhI=; b=RxLYeLJXot0FWJKTe7IEtC85kmJRayTRniC9QdYY/lszEFrKxkCz4nUjFECqavlOVe 1Fw8GPhPXX4oLPEijN+mTGnHAw3SopasU/iHvJK6N6us2g9NLHrWdtoyKFAzfv8rPiIK uceaBKDWT2FvCREDH0OsPX0odSmYitnSV1h3q0LDFM/F/IYTA8pxbXHv36bslwJFNucA gsjymjZaIrO4jCioBr2RbC6NSs++18Y9vFvvXKpwQCH8ExGmbXVQIJijdyRYe8lZIueM n3dGH9gnu0hLkRbEGmrBaXou2yz9BD0k8n/kG1Q/fZ8DhwF695D4kUlhBNS2UFoWftvg iRbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=MHFCKRKV; 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 o63si6726590pjo.94.2019.07.04.20.18.14; Thu, 04 Jul 2019 20:18:30 -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=MHFCKRKV; 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 S1727809AbfGEDQ6 (ORCPT + 99 others); Thu, 4 Jul 2019 23:16:58 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43160 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726404AbfGEDQ6 (ORCPT ); Thu, 4 Jul 2019 23:16:58 -0400 Received: by mail-pg1-f196.google.com with SMTP id f25so3622376pgv.10 for ; Thu, 04 Jul 2019 20:16:58 -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=aWklrXUceZD8WSljMzr7F6TlSTq4WKBAsYdg+zJZVhI=; b=MHFCKRKVxGKWHPIfO8W5iuXr495O9SFT/TeCt0ZWUdRvy7+7ekE72jxHrzKuvLdwyn vbR90wFznfusbmoc6KR+sOlWZaFBzUbn2uF9YwA+a08wsdR1CWKOXRkliMuEhMhr+aVW 7NnV0cZCd3R0+wvJVvPn40jksBODj0mQjmr5dJvvWZmpH43nK7wf+Bapihhh/3KqE7Nn 56D8FATpQTroniDi9v1mSWjWfheg46Z5TFeEHzblEbAUhX2Xutc4p8NihMYzyY/eD9lr y5XSBWN0QyIcepxU44Adkj2e8y/DRjjEAcq7ODXd8yj7KQLC9syQAs7ZDDaaJwpjhMP6 6IQQ== 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=aWklrXUceZD8WSljMzr7F6TlSTq4WKBAsYdg+zJZVhI=; b=hqTXqmctsZa5fOb78Hfz5T0sjUJFl4RkCUk2N/vORHPmAtDai8EWaZ3fmPS7Ng7E+u 2cIidjh1eUXjpH8vM5IEPP4+75h18UxOMEZn1Rgg/7vpH3AUWyvqHXrslN6u5LcuZyKT k0dngB/PtECPUXIfWry3szZ6FLvtNLawBxxFROt8OVNQnt8IjhThRCQVcfIl51TKizj9 ZvA2ElSNCvauAIDbEEpKiH4jHXdLkbc5AkXTSo6QfE9bBCCh4KZnjeTe/0wGgMTFQhtM 2jo2FvXKZ4yK9PdMd7Ch/EfcsGjppxLqhbhYRp44SWYK85BZr003p1PD91uIYCDZ2DUl 7bhQ== X-Gm-Message-State: APjAAAVk7/HJR3wUM6bg07qcPnQkDyjO884WQeBGRiZFgyfaQzFIlEVu ovo4EWevNoriSKK84wECSB8pIw== X-Received: by 2002:a63:4f46:: with SMTP id p6mr2106430pgl.268.1562296617581; Thu, 04 Jul 2019 20:16:57 -0700 (PDT) Received: from ?IPv6:2600:1010:b00c:9a6b:b5fb:b920:a52a:98a0? ([2600:1010:b00c:9a6b:b5fb:b920:a52a:98a0]) by smtp.gmail.com with ESMTPSA id p2sm9214590pfb.118.2019.07.04.20.16.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 20:16:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2 5/7] x86/mm, tracing: Fix CR2 corruption From: Andy Lutomirski X-Mailer: iPhone Mail (16F203) In-Reply-To: Date: Thu, 4 Jul 2019 20:16:54 -0700 Cc: Peter Zijlstra , 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-Transfer-Encoding: quoted-printable Message-Id: <41D6F2E2-C4CF-41DF-A843-FCBD03B7BEEB@amacapital.net> References: <20190704195555.580363209@infradead.org> <20190704200050.534802824@infradead.org> To: Linus Torvalds Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jul 4, 2019, at 7:18 PM, Linus Torvalds = wrote: >=20 >> On Fri, Jul 5, 2019 at 5:03 AM Peter Zijlstra wrot= e: >>=20 >> Despire the current efforts to read CR2 before tracing happens there >> still exist a number of possible holes: >=20 > 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. >=20 > 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? >=20 If nothing else, MOV to CR2 is architecturally serializing, so, unless there= =E2=80=99s some fancy unwinding involved, this will be quite slow.=