Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5058737ybi; Sat, 6 Jul 2019 20:46:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhC+gvEzTyRIWhkRktOwwyYYue94T4idbQxj5pjjwtEcH57nVUkvFHyI1jF1jWMF6FD2Gc X-Received: by 2002:a17:90a:80c4:: with SMTP id k4mr15179730pjw.74.1562471202745; Sat, 06 Jul 2019 20:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562471202; cv=none; d=google.com; s=arc-20160816; b=Dmmt0/xZgqeNgmKaDihrUaJi27qtz7BYgsXIZxWmZuKYlxqJF+ndvdvJbBvdyp8yn4 93a+rl99bUA6Kss4Fy1Am97cD3qAcY8KL9LrgEF9MdtG/YdCJBirep4ugExAhd0/moer f1W6dVjN3hUAj0Fo7Nzul6lFgFqOWaONEcKvYRAgJsFWahENnYjQO9UrhCQUEl6lT2if pYS+tvyOPtaY8Jb9u+SLgm9gAR86xIauevL7mbVakVZAkpeVPTdxGiIKd33QywK7LCtg SEOOh0TlzWRmRHTavRd+8YtiYhu3dO57DjYqixrE2kLpL0GkgpuTKXLtDU6ATOGS3DlK pJPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=OGUlAsCzUJoVYKt86uXjpY15AX803LKAiJ+hKkbXiTw=; b=h+t9y8Aui07f4jQT0BtqNnVvcGqJBMZ5tWz0EEpORLaPCT9Fqh9GaGpjrUSVr2uijH ttr4qrU6NphffEzVNzQyMXJPtOwuIzNvF5a17KCabj4qGsF+ertnAn+dysEcTRBwR2UU f/IoJuFsewid4nx6hlxw6E6rN1iGGjiAa1g31eVwouhklIsomq7DkbgNQglG2cIy8SEN JsZFrdK6CJviw4FJZZD+Qxz2lQ7wq259EiGguHdsXGQRnItdLJ3cWAeV0mnyiBR/hM49 1BfvgMTxuhHlzBqvQddslpRW2b2/lOjn4HxU6Gzt1w8UNRPsO/5+GsWA05hHub7PWU6h 3Tfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=K+lwpCzM; 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 w12si13161012plp.296.2019.07.06.20.45.59; Sat, 06 Jul 2019 20:46: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=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=K+lwpCzM; 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 S1727213AbfGGDoJ (ORCPT + 99 others); Sat, 6 Jul 2019 23:44:09 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42321 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727127AbfGGDoI (ORCPT ); Sat, 6 Jul 2019 23:44:08 -0400 Received: by mail-pf1-f195.google.com with SMTP id q10so5943004pff.9 for ; Sat, 06 Jul 2019 20:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsukata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OGUlAsCzUJoVYKt86uXjpY15AX803LKAiJ+hKkbXiTw=; b=K+lwpCzMTYmA/zgfuwuOhNyywUhdndxBklkJQFtamOnGFQgBymUzxtd+ZnZnC34BQn HpGdYR+MaSj86LwaPTsUFPSAqNaYztJBf828LhLgpXVLKiKUUuWQamnohQ954phD5PBU sTku+RMuT/x6xZEO3yziQLmLGyS4esSqrZF7Oiga0E/SOHjHTJ5ukilmpeOrzMgx9tSs t50CZw+BoHCupXPQ5Q5gBEgs5P8+Ya7RGFEwR/XFZhXVV1N85vGgWLnCs5RwRQ/J8BKs x7wJ3LT+Y2Qq+UcFDRg2fuFRWWoe1SYidyJtsN483bKk9DR7iwIEGdlu8E/eXhf7gWlM qipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=OGUlAsCzUJoVYKt86uXjpY15AX803LKAiJ+hKkbXiTw=; b=GOyPsLUKfso8UTLKg4YYYP1c6MCPOOjBljVFaCfsvHv/ODCG4LLAjK0XxO4DO5KBdL AoFvAjfOOxVhBxj93EgqrbZpuGKsZy9jTDi3B+Q3IoMnMGEC3C/QLCETgQ2nybkDB1uH 1EE4Y5V+ltBLPgLuldcEofQnZKFKDfrtJQPMt/RmiJZypKO0CxrDUVL8GjxzhCCLZdHS 3sLsj614OMu93hPvjEc6u1jmD/CMhAJzQe7+5NKM/n0PL7f5QNKPQUsbV5NaiM/BNbW0 CGF9gRPT5xr0HPk2LRI4bUeK3fzRObxsdBPhfBS92HrntdholvB/LqB+ptT2cRpwlZa5 akZQ== X-Gm-Message-State: APjAAAVwwrrt4DKcTi8ZF5lyv4jr9FqIFU+pvc8d1l/GQXegWrF4HttP EfbCvRkd8plV18HmoxnEEFAVGA== X-Received: by 2002:a65:4347:: with SMTP id k7mr14240023pgq.253.1562471047834; Sat, 06 Jul 2019 20:44:07 -0700 (PDT) Received: from Etsukata.local (p2517222-ipngn21701marunouchi.tokyo.ocn.ne.jp. [118.7.246.222]) by smtp.gmail.com with ESMTPSA id r15sm13506677pfh.121.2019.07.06.20.44.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jul 2019 20:44:07 -0700 (PDT) Subject: Re: [PATCH v2 5/7] x86/mm, tracing: Fix CR2 corruption To: Steven Rostedt Cc: Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Borislav Petkov , Ingo Molnar , Andrew Lutomirski , Peter Anvin , Dave Hansen , Juergen Gross , Linux List Kernel Mailing , He Zhe , Joel Fernandes References: <20190704195555.580363209@infradead.org> <20190704200050.534802824@infradead.org> <20190705134916.GU3402@hirez.programming.kicks-ass.net> <20190706182728.435a89ed@gandalf.local.home> From: Eiichi Tsukata Openpgp: preference=signencrypt Autocrypt: addr=devel@etsukata.com; keydata= mQINBFydxe0BEAC2IUPqvxwzh0TS8DvqmjU+pycCq4xToLnCTy9gfmHd/mJWGykQJ7SXXFg2 bTAp8XcITVEDvhMUc0G4l+RBYkArwkaMHO5iM4a7+Gnn6beV1CL/dk9Wu5gkThgL11bhyKmQ Ub1duuVkX3fN2cRW2DrHsTp+Bxd/pq5rrKAbA/LIFmF4Oipapgr69I5wUeYywpzPFuaVkoZc oLdAscwEvPImSOAAJN0sesBW9sBAH34P+xaW2/Mug5aNUm/K6whApeFV/qz2UuOGjzY4fbYw AjK1ALIK8rdeAPxvp2e1dXrj29YrIZ2DkzdR0Y9O8Lfz1Pp5aQ+pwUQzn2vWA3R45IItVtV5 8v04N/F7rc/1OHFpgFtzgAO2M51XiIPdbSmF/WuWPsdEHWgpVW3H/I8amstfH519Xb/AOKYQ 7a14/3EESVuqXyyfCdTVnBNRRY0qXJ7mA0oParMD8XKMOVLj6Nlvs2Zh2LjNJhUDsssKNBg+ sMKiaeSV8dtcbH2XCc2GDKsYbrIKG3cu5nZl8xjlM3WdtdvqWpuHj6KTYBQgsXngBA7TDZWT /ccYyEQpUdtCqPwV0BPho6pr8Ug6J99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eXEr3siS2/6E4UhDNXd/ZGZi5fRI2lo8Cp+oTS0Q m6FIxqnoPWVCsi1XJdSSQtTMxU0qesAjRXTPE76lMdUQkYZ/Ux1rbzYAgWFatvx4aUntR+1N 2aCDuAIID8CNIhx40fGfdxVa4Rf7vfZ1e7/mK5lDZVnWwTOJFNouvlILKLcDPNO51R5XKsc1 zxZwI+P1sTpSBI/KtFfphfaN93H3dLiy26D1P8ShFz6IEfTgK4OVWhqCaOe9oTXTwwNzBQ4= Message-ID: <128b96b9-b6c8-5c15-3ca5-c2b38a404ea9@etsukata.com> Date: Sun, 7 Jul 2019 12:44:02 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190706182728.435a89ed@gandalf.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/07/07 7:27, Steven Rostedt wrote: > > We also have to deal with reading vmalloc'd data as that can fault too. > The perf ring buffer IIUC is vmalloc, so if perf records in one of > these locations, then the reading of the vmalloc area has a potential > to fault corrupting the CR2 register as well. Or have we changed > vmalloc to no longer fault? > > -- Steve > It seems that perf ring buffer does not normally use vmalloc. It depends on CONFIG_PERF_USE_VMALLOC introduced by the following commit: commit 906010b2134e14a2e377decbadd357b3d0ab9c6a Author: Peter Zijlstra Date: Mon Sep 21 16:08:49 2009 +0200 perf_event: Provide vmalloc() based mmap() backing Some architectures such as Sparc, ARM and MIPS (basically everything with flush_dcache_page()) need to deal with dcache aliases by carefully placing pages in both kernel and user maps. These architectures typically have to use vmalloc_user() for this. However, on other architectures, vmalloc() is not needed and has the downsides of being more restricted and slower than regular allocations. Signed-off-by: Peter Zijlstra Acked-by: David Miller Cc: Andrew Morton Cc: Jens Axboe Cc: Paul Mackerras LKML-Reference: <1254830228.21044.272.camel@laptop> Signed-off-by: Ingo Molnar