Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp3759160ybg; Sun, 7 Jun 2020 09:41:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyypwLK4McYvUCH9J3/64SlZALY2Vk4UgF5HxsWsWQvlSHF335dNtzNJKKfjfqbjTEjMS2j X-Received: by 2002:a17:906:4a8d:: with SMTP id x13mr16815563eju.26.1591548061266; Sun, 07 Jun 2020 09:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591548061; cv=none; d=google.com; s=arc-20160816; b=MBenY0P1ZGxoob5lst1vq/uHUF/wI3rpvqVtjx3h5FAFVlsUApOfVnKqgqEbtnA2hP rLwiYcZY0WVOqKL2qA5H5pri1BPFJNknG6vk25EV4+MG395319PfpIp+wHdyK4epJXXM 0zPbAI136v/zF8xNYtWvIceSQ1iVNtPuysBYN7eng1ma23B8xeDvVcdsIlZOHnDa/96b XvfdYZN/PB9CZB9u03npyyZNNB3/8JfVMEjhSFywpK6RrT+Sqqx4bWfTOknYroxUejjT ZKe2p+Y77wtsfSQv7dogE/GYnaUf8IMYKZdMx7a9mSnkejm6OYG4kA4gNfVZ6QTB1kMj 8rjw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=qi9NU3vv4TZmC0W1ZOt14fn9X3OaUT+itb75LrPqRnY=; b=TbViNt+VqZgTZ3rNqtPzSqAtrZbWqDhPgGeF8YhbTjnLYVLAnxpQ7T1fyOuAth2eiT s+kd6Mcc2KDO9SBm3FwNvW9/uXLxcVnVbJh3WXvnwZy03xnkpM+oNA2ZxfyF9E6O5a92 OcMrVv9/ennAqPzDnQuKeGcmIjU6yGIM+oXywhm66FM3h+AqD2xboGmUuoGJmpApCFEN SaDPhySp3NNidMyrcJ82dxz806/zns15yDlrDNJANO5v/WUJtLWAu3PZsxzN339FOxob BM8c5lI0DxVnac1Ww+Jsijgf2SNCvYtt3BLMJzkmL36VXy61v21WF2MxirAZK1LPRsN8 vhMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si7313487edi.116.2020.06.07.09.40.37; Sun, 07 Jun 2020 09:41:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbgFGQiG (ORCPT + 99 others); Sun, 7 Jun 2020 12:38:06 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:54508 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbgFGQiG (ORCPT ); Sun, 7 Jun 2020 12:38:06 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 4BFA81C0BD2; Sun, 7 Jun 2020 18:38:04 +0200 (CEST) Date: Sun, 7 Jun 2020 18:38:03 +0200 From: Pavel Machek To: "Alex Xu (Hello71)" Cc: alsa-devel@alsa-project.org, bp@alien8.de, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@redhat.com, perex@perex.cz, tglx@linutronix.de, tiwai@suse.com, x86@kernel.org, rientjes@google.com, hch@lst.de, hch@infradead.org Subject: 82fef0ad811f "x86/mm: unencrypted non-blocking DMA allocations use coherent pools" was Re: next-0519 on thinkpad x60: sound related? window manager crash Message-ID: <20200607163803.GA10303@duo.ucw.cz> References: <20200520111136.GA3802@amd> <1591545088.74ii116nf2.none@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <1591545088.74ii116nf2.none@localhost> 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 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > I have a similar issue, caused between aaa2faab4ed8 and b170290c2836. >=20 > [ 20.263098] BUG: unable to handle page fault for address: ffffb2b582cc= 2000 > [ 20.263104] #PF: supervisor write access in kernel mode > [ 20.263105] #PF: error_code(0x000b) - reserved bit violation > [ 20.263107] PGD 3fd03b067 P4D 3fd03b067 PUD 3fd03c067 PMD 3f8822067 PT= E 8000273942ab2163 > [ 20.263113] Oops: 000b [#1] PREEMPT SMP > [ 20.263117] CPU: 3 PID: 691 Comm: mpv Not tainted 5.7.0-11262-gb170290= c2836 #1 > [ 20.263119] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.= M./B450 Pro4, BIOS P4.10 03/05/2020 > [ 20.263125] RIP: 0010:__memset+0x24/0x30 > [ 20.263128] Code: cc cc cc cc cc cc 0f 1f 44 00 00 49 89 f9 48 89 d1 8= 3 e2 07 48 c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 <= f3> 48 ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1 f3 > [ 20.263131] RSP: 0018:ffffb2b583d07e10 EFLAGS: 00010216 > [ 20.263133] RAX: 0000000000000000 RBX: ffff8b8000102c00 RCX: 000000000= 0004000 > [ 20.263134] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb2b58= 2cc2000 > [ 20.263136] RBP: ffff8b8000101000 R08: 0000000000000000 R09: ffffb2b58= 2cc2000 > [ 20.263137] R10: 0000000000005356 R11: ffff8b8000102c18 R12: 000000000= 0000000 > [ 20.263139] R13: 0000000000000000 R14: ffff8b8039944200 R15: ffffffff9= 794daa0 > [ 20.263141] FS: 00007f41aa4b4200(0000) GS:ffff8b803ecc0000(0000) knlG= S:0000000000000000 > [ 20.263143] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 20.263144] CR2: ffffb2b582cc2000 CR3: 00000003b6731000 CR4: 000000000= 03406e0 > [ 20.263146] Call Trace: > [ 20.263151] ? snd_pcm_hw_params+0x3f3/0x47a > [ 20.263154] ? snd_pcm_common_ioctl+0xf2/0xf73 > [ 20.263158] ? snd_pcm_ioctl+0x1e/0x29 > [ 20.263161] ? ksys_ioctl+0x77/0x91 > [ 20.263163] ? __x64_sys_ioctl+0x11/0x14 > [ 20.263166] ? do_syscall_64+0x3d/0xf5 > [ 20.263170] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 > [ 20.263173] Modules linked in: uvcvideo videobuf2_vmalloc videobuf2_me= mops videobuf2_v4l2 videodev snd_usb_audio videobuf2_common snd_hwdep snd_u= sbmidi_lib input_leds snd_rawmidi led_class > [ 20.263182] CR2: ffffb2b582cc2000 > [ 20.263184] ---[ end trace c6b47a774b91f0a0 ]--- > [ 20.263187] RIP: 0010:__memset+0x24/0x30 > [ 20.263190] Code: cc cc cc cc cc cc 0f 1f 44 00 00 49 89 f9 48 89 d1 8= 3 e2 07 48 c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 <= f3> 48 ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1 f3 > [ 20.263192] RSP: 0018:ffffb2b583d07e10 EFLAGS: 00010216 > [ 20.263193] RAX: 0000000000000000 RBX: ffff8b8000102c00 RCX: 000000000= 0004000 > [ 20.263195] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb2b58= 2cc2000 > [ 20.263196] RBP: ffff8b8000101000 R08: 0000000000000000 R09: ffffb2b58= 2cc2000 > [ 20.263197] R10: 0000000000005356 R11: ffff8b8000102c18 R12: 000000000= 0000000 > [ 20.263199] R13: 0000000000000000 R14: ffff8b8039944200 R15: ffffffff9= 794daa0 > [ 20.263201] FS: 00007f41aa4b4200(0000) GS:ffff8b803ecc0000(0000) knlG= S:0000000000000000 > [ 20.263202] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 20.263204] CR2: ffffb2b582cc2000 CR3: 00000003b6731000 CR4: 000000000= 03406e0 >=20 > I bisected this to 82fef0ad811f "x86/mm: unencrypted non-blocking DMA=20 > allocations use coherent pools". Reverting 1ee18de92927 resolves the=20 > issue. >=20 > Looks like Thinkpad X60 doesn't have VT-d, but could still be DMA=20 > related. Note that newer -next releases seem to behave okay for me. The commit pointed out by siection is really simple: AFAIK you could verify it is responsible by turning off CONFIG_AMD_MEM_ENCRYPT on latest kernel... Best regards, Pavel index 1d6104ea8af0..2bf2222819d3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1520,6 +1520,7 @@ config X86_CPA_STATISTICS config AMD_MEM_ENCRYPT bool "AMD Secure Memory Encryption (SME) support" depends on X86_64 && CPU_SUP_AMD + select DMA_COHERENT_POOL select DYNAMIC_PHYSICAL_MASK select ARCH_USE_MEMREMAP_PROT select ARCH_HAS_FORCE_DMA_UNENCRYPTED --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXt0X6wAKCRAw5/Bqldv6 8nR9AKCEQ5c2R1u4+cXEO0PCRlvn6BRgQwCeLIGOijUJZFuQ4aVPjBCzO69tKp8= =cYie -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--