Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp843226imu; Fri, 11 Jan 2019 10:00:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN7O+n9MI3w7avC7LMTWJo4kZNLZKyAGk8Bzgwia0zTPq/N0kWeSwa45QeImw+GATObrlJFv X-Received: by 2002:a17:902:6b87:: with SMTP id p7mr15861266plk.282.1547229652557; Fri, 11 Jan 2019 10:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547229652; cv=none; d=google.com; s=arc-20160816; b=DPPdtjS6ssnqpjc3ZGvPYj7wZfBcdawW9uNk3aeN5FHe+ItigOM36CVJdrLx74Sd7f m8zszi6OgBFIguusSwZN2HAuShQSgHk9UTViC7gbm5v+usZVjr0XBO17jp5g2NpM0VSh AauQX/BVw9BLPXwaGK3QQQFlw0ZvULBYpcpD+iH3IqAe4lMobyz4IqnGAYbRvUjDHQLH q+d3IbjNHTWNalVPQhaQhZoOoh0RjdOVWqbQnAcwS24/1i9kZkgaCWZexQCwmcU4Onni oyPF761rKeMnIqAODarNQfPQUKrhSt+RHqRpSbCwNjmpN9mFNB7EmVwkL9tHzhh4VIcg 8KuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vYokSj6HZdpVhgmsR5UYVRLNZuwSppMV4z0K7GJ9z1w=; b=KX+PwlGQxtmUHCB+PqGnTp7ZOW5KxeR35vqb+4N6mHAcWyBYwePv5bedpzcq7Uh3Qt H1HPMybN+aVA17ciY1EXDiNkklcTsT4H7aQpg/R+H9Rzl0RAUp4zTc+EoHr5vzMzKqAu 9ZHNtifHOykWHB8wFKtQPQHOtqiVNZ/HCbj27I0aqmz9oqwzikpuyyWdfWgsAM0I1k7w uFOf/Afc1wqf5h8NoaaydkMoz1xS7R7sJGZEzq7uDUEqqC6O9pc9B8s1KIxr4+fevsGK QMm4y/pookw4zpc2W4g0prT/ryeYowsu8QHYVtrMKM27+EUlkfHB9pTfzINvRrwgv88I nGsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jnkz4S8t; 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 h96si6445524plb.230.2019.01.11.10.00.36; Fri, 11 Jan 2019 10:00:52 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jnkz4S8t; 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 S1732961AbfAKN7x (ORCPT + 99 others); Fri, 11 Jan 2019 08:59:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:51004 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbfAKN7x (ORCPT ); Fri, 11 Jan 2019 08:59:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vYokSj6HZdpVhgmsR5UYVRLNZuwSppMV4z0K7GJ9z1w=; b=jnkz4S8tu3lU+r+ywDhPiydWZQ aHhOxNg25NnKFYxGWR1KdwBx7azgolMUsJE65NnC7vrObpane5uygP7Upt/qaS0H6bpmIIZD1xzMA b1kVBHt9v0A/obRSuegJCyhoPTisCMP3WJUuCJ/BvThys6Lo8pmVCrysqd+JEy20R37mIn1Lv/e45 m2JLgN1hLt0bl2xGahQhHZOB749pfN87cTXb8s75DOo4dc3w4jdtsZUc0/Le+/WD5ieCeZKoOIkuV pxGM3/F6ftzofK0wPM55t6vQvXFftXYIzvTwn1mBTqHes7TXWGRqjLF9AHt3dnpMfS2JpBsOoixz5 MSa4e8GA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghxLi-0002mT-5f; Fri, 11 Jan 2019 13:59:50 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 56BB520194963; Fri, 11 Jan 2019 14:59:48 +0100 (CET) Date: Fri, 11 Jan 2019 14:59:48 +0100 From: Peter Zijlstra To: Esme Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , JJiri Olsa , Namhyung Kim , "linux-kernel@vger.kernel.org" Subject: Re: PROBLEM: syzkaller found / reduced C repro for non-fatal unchecked MSR access error Message-ID: <20190111135948.GA20688@hirez.programming.kicks-ass.net> References: <20190111100253.GO30894@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 11, 2019 at 01:37:50PM +0000, Esme wrote: > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Friday, January 11, 2019 5:02 AM, Peter Zijlstra wrote: > > > On Thu, Jan 10, 2019 at 11:21:16PM +0000, Esme wrote: > > > > > Attached is a fairly small C repro I did not see any references to > > > this possible flaw (unchecked MSR access) in relation to > > > __NR_perf_event_open > > > Attached is the config directly extracted from proc. This is the call > > > stack in relation to the MSR access error (5.0.0-rc1+), I get a very > > > similar stack running this test case on a stock Ubuntu > > > "4.18.0-11-generic" (pasted after this one). > > > > > -- Esme > > > [ 70.228744] unchecked MSR access error: WRMSR to 0xc0010000 (tried to write 0x0000020000130076) at rIP: 0xffffffff812dde28 (native_write_msr+0x8/0x30) > > > > That's K7_EVNTSEL0. What kind of hardware are you running this on? > > QEMU emulator version 3.0.93 (v3.1.0-rc3-dirty) > [ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 > > > [ 0.000000] Linux version 4.18.0-11-generic (buildd@lcy01-amd64-027) (gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)) #12-Ubuntu SMP Tue Oct 23 19:22:37 UTC 2018 (Ubuntu 4.18.0-11.12-generic 4.18.12) > [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-11-generic root=UUID=3a43ccb9-a433-4296-8dc5-0443f2a32128 ro quiet splash vt.handoff=1 > [ 0.000000] KERNEL supported cpus: > [ 0.000000] Intel GenuineIntel > [ 0.000000] AMD AuthenticAMD > [ 0.000000] Centaur CentaurHauls > [ 0.000000] random: get_random_u32 called from bsp_init_amd+0x205/0x2a0 with crng_init=0 > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers' > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers' > [ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers' > [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 > [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format. Feh, then you get to figure out how the heck it passes check_hw_exists(). Stupid virt crap _again_.