Received: by 10.223.164.202 with SMTP id h10csp2637742wrb; Fri, 24 Nov 2017 14:36:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMaoeIUTSnWLT4dRNnPDlUBj3e+OdanJ5G+42J8Dzqi1FqaCZP+AopC1rE0XxXFJbJTF0KSj X-Received: by 10.84.235.137 with SMTP id p9mr29139188plk.291.1511562998907; Fri, 24 Nov 2017 14:36:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511562998; cv=none; d=google.com; s=arc-20160816; b=HFlqnldaDsieLtSy1Xc0iwah9RSqTmfJ0kRLFLcvyl4a+y4jXpnN7lac0H+UEViP6T F8LJLe2oGY3eji65sFvj0mJwYbQEsZAZXQpJ+EbCjjowe8gh6pmnX9xsZnKh2M5/RVei K3O58WGqiH2lKlGgkM5H6qakKibxIiLpFZ0jin5g/I5Y+Eoo/KRQBo3nkJ/r8zNl3EFa Uk3iDA+Gwoz8hoHqoOj4jiwg0B97c5IZ5RlGx/M4KY5fF0ZMfY5Lkyk4qaLmUslpM6KT MoJ/vIAgP6UylndVa0rlbO5u26j67hOiaLCnZQT47EvWzD6DxmX7ukVclUY3bAILOo+I WlHw== 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:arc-authentication-results; bh=6gs6AekbEaPwleF95v1cPuGyUckO2udQ/TisCTZ7tLc=; b=wjqDwSev0KbsWs03fN6AKXfWgPU5yzdf3SCe6bH5PeLtktuJ/Q5vNkNPN6bc8EBRVR 3qFruteIS7Scfy8CD3YRcggb4a7xpyvI6atJ9XU11mw6bprfYGGf1qcDn6EgW3N5Wv4K LfLf/Mdx68zwLT2+b3Zr2DM0NcvdYBsY/mUOiRoztzSw7/5ipVtEhEwrIgaraOht4XXM oJDEXSDLXwoqkpv5HnCVu+bcd+pbW6wzZxRrI2t1baqz0uU5BB6R9bPt3PuYCScF3kU6 GXK46AZGNgdpa4RcFritVFMUcQZfL1ZsfQ4JzgeIL8c66v5rcZ05LZ6rNIns2FNJDtJC qMEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=pXyhqUhA; 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 t10si7932041plh.762.2017.11.24.14.36.26; Fri, 24 Nov 2017 14:36:38 -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=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=pXyhqUhA; 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 S1753852AbdKXWft (ORCPT + 78 others); Fri, 24 Nov 2017 17:35:49 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:34292 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753730AbdKXWfs (ORCPT ); Fri, 24 Nov 2017 17:35:48 -0500 Received: by mail-ot0-f195.google.com with SMTP id o23so19814435otd.1 for ; Fri, 24 Nov 2017 14:35:47 -0800 (PST) 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=6gs6AekbEaPwleF95v1cPuGyUckO2udQ/TisCTZ7tLc=; b=pXyhqUhAWiRE2c9EZKyPUKQ0m03qLzsWhGmLJtlTh/0huuesifOrPxepO3mVSnjT98 4248eQCslSlshS+hRBDwXpgR6CbSvI+zoR62ipcVgaY5YlcOcZv9uT0V1nfLehjl3qr8 R3W9tMMVDnEFjFSkQQkMcuorZsz9IJnh3twxHfCJzwcnZTmf7ozb69GIZJ9Supp8aHQM FacTRTbCxAjakhvpy7lqNF1kHi/HI1Y8IF+4cmUUMjfVznDqUgI4RmhbnrJJqbj30aNS nkrYFE4qOuAkFLWCJz4TXcgmdwj/d38JEVnLW9PaaMyt4KYxKnSIfm2NcQq48ukjTsl5 NUyg== 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=6gs6AekbEaPwleF95v1cPuGyUckO2udQ/TisCTZ7tLc=; b=qkNSoFlhsH+7i5o7yXUH3+sZRGJAPds62OADCVIdmxDBPO2p4EYlYx5QTWYRTFzuFP sa0m6i8nZCXtzp1L1uxqKiNr3Y2PviyHmIJYh6Yn4hIeWMWNqcnpr5l4ejqv2l89ixhx foTkHl37RDJxfdoXFHdZk/vsBnucatRKcNnRzggIn0CTB3OP2oaXiQBmf7iSxuVNbnF4 frExDgp7oylr4cjTLF4cPa3ltsiqcu6Clg9T8nZ/k+/gAnvHzQB7BPesKDkSfZP2LbFp kHuqmibXQIUW4ljALXewsbV4z+nw5sv7YGkaItYJfwremt5rBVbTXwfi/iR20sOrUR4S T7iw== X-Gm-Message-State: AJaThX7khMHv5ZsIZbin9dW245tIvKYMStZ/ADkau03uRKECOcIaoqy5 jklPVyoLeJOlfcq3kouOAe9Ax9DhJiM= X-Received: by 10.157.29.1 with SMTP id m1mr21864333otm.15.1511562947032; Fri, 24 Nov 2017 14:35:47 -0800 (PST) Received: from ?IPv6:2600:100e:b002:f221:51d6:b8f4:42f7:d366? ([2600:100e:b002:f221:51d6:b8f4:42f7:d366]) by smtp.gmail.com with ESMTPSA id g9sm7798238otb.23.2017.11.24.14.35.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Nov 2017 14:35:45 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [crash] PANIC: double fault, error_code: 0x0 From: Andy Lutomirski X-Mailer: iPhone Mail (15B150) In-Reply-To: <20171124220934.q7ovq4yzaihevqls@gmail.com> Date: Fri, 24 Nov 2017 15:35:43 -0700 Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Dave Hansen , Thomas Gleixner , "H . Peter Anvin" , Peter Zijlstra , Borislav Petkov , Linus Torvalds Content-Transfer-Encoding: quoted-printable Message-Id: <464B14E7-EC38-4A5A-8BF6-B086F437C6D1@amacapital.net> References: <20171124172411.19476-1-mingo@kernel.org> <20171124202237.oytdkqq25s3ak2ul@gmail.com> <20171124220934.q7ovq4yzaihevqls@gmail.com> To: Ingo Molnar Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 24, 2017, at 3:09 PM, Ingo Molnar wrote: >=20 >=20 > * Ingo Molnar wrote: >=20 >>=20 >> * Ingo Molnar wrote: >>=20 >>> This is a repost of the latest entry-stack plus Kaiser bits from Andy Lu= tomirski >>> (v3 series from today) and Dave Hansen (kaiser-414-tipwip-20171123 versi= on), >>> on top of latest tip:x86/urgent (12a78d43de76). >>>=20 >>> This version is pretty well tested, at least on the usual x86 tree test s= ystems. >>> It has a couple of merge mistakes fixed, the biggest difference is in pa= tch #22: >>>=20 >>> x86/mm/kaiser: Prepare assembly for entry/exit CR3 switching >>>=20 >>> The other patches are identical or very close to what I posted earlier t= oday. >>=20 >> Here's a new bug, on a testsystem I get the double fault boot crash attac= hed=20 >> below. The same bzImage crashes on other systems as well, so it's not CPU= =20 >> dependent. >>=20 >> Via Kconfig-bisection I have narrowed it down to the following .config de= tail:=20 >> it's triggered by _disabling_ CONFIG_DEBUG_ENTRY and enabling CONFIG_KAIS= ER=3Dy. >>=20 >> I.e. one of the sanity checks of CONFIG_DEBUG_ENTRY has some positive sid= e effect.=20 >> I'll try to track down which one it is - any ideas meanwhile? >>=20 >> Thanks, >>=20 >> Ingo >>=20 >> [ 8.797733] calling pt_dump_init+0x0/0x3b @ 1 >> [ 8.803144] initcall pt_dump_init+0x0/0x3b returned 0 after 1 usecs >> [ 8.810589] calling aes_init+0x0/0x11 @ 1 >> [ 8.815757] initcall aes_init+0x0/0x11 returned 0 after 141 usecs >> [ 8.823020] calling ghash_pclmulqdqni_mod_init+0x0/0x54 @ 1 >> [ 8.831002] PANIC: double fault, error_code: 0x0 >> [ 8.831002] CPU: 11 PID: 260 Comm: modprobe Not tainted 4.14.0-01419-g= 1b46550a680d-dirty #17 >> [ 8.831002] Hardware name: Intel Corporation S2600GZ/S2600GZ, BIOS SE5= C600.86B.02.02.0002.122320131210 12/23/2013 >> [ 8.831002] task: ffff880828ba8000 task.stack: ffffc90004444000 >> [ 8.831002] RIP: 0010:page_fault+0x11/0x60 >> [ 8.831002] RSP: 0000:ffffffffff0e7fc8 EFLAGS: 00010046 >> [ 8.831002] RAX: 00000000819d4d77 RBX: 0000000000000001 RCX: ffffffff8= 19d4d77 >=20 > After much more debugging, the patch below 'fixes' the crash as well, when= =20 > CONFIG_DEBUG_ENTRY is disabled. >=20 > Note that if *any* of those 4 padding sequences is removed, the kernel sta= rts=20 > crashing again. Also note that the exact size of the padding appears to be= not=20 > material - it could be larger as well, i.e. it's not an alignment bug I th= ink. >=20 > In any case it's not a problem in the actual assembly code paths itself it= =20 > appears. >=20 > One guess would be tha it's some sort of sizing bug: maybe the padding for= ces a=20 > key piece of data or code on another page - but I'm too tired to root caus= e it=20 > right now. >=20 > Any ideas? This smells like a pagerable setup bug. Either the pagetables are a bit brok= en or they're totally busted and the passing gets something in a more TLB-fr= iendly place. >=20 > Thanks, >=20 > Ingo > --- > arch/x86/entry/entry_64.S | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S > index 4ac952080869..e83029892017 100644 > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -547,6 +547,8 @@ END(irq_entries_start) > ud2 > .Lokay_\@: > addq $8, %rsp > +#else > + .rep 16; nop; .endr > #endif > .endm >=20 > @@ -597,6 +599,8 @@ END(irq_entries_start) > je .Lirq_stack_okay\@ > ud2 > .Lirq_stack_okay\@: > +#else > + .rep 16; nop; .endr > #endif >=20 > .Lirq_stack_push_old_rsp_\@: > @@ -707,6 +711,8 @@ GLOBAL(swapgs_restore_regs_and_return_to_usermode) > jnz 1f > ud2 > 1: > +#else > + .rep 16; nop; .endr > #endif > POP_EXTRA_REGS > popq %r11 > @@ -773,6 +779,8 @@ GLOBAL(restore_regs_and_return_to_kernel) > jz 1f > ud2 > 1: > +#else > + .rep 16; nop; .endr > #endif > POP_EXTRA_REGS > POP_C_REGS From 1584987037405793264@xxx Fri Nov 24 22:10:29 +0000 2017 X-GM-THRID: 1584980346327414425 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread