Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1867493yba; Sun, 7 Apr 2019 02:27:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7w5CyENhbKuycBCwvbL9CY/b2SNomIZqKHjd2XZ334Mqxpkyb7bVB8+bWa/rz/dQj3GBk X-Received: by 2002:a63:4a5a:: with SMTP id j26mr22002778pgl.361.1554629273159; Sun, 07 Apr 2019 02:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554629273; cv=none; d=google.com; s=arc-20160816; b=TaVc3sA0/LKJtCSYd/W+ZTQJsI6JFLU7ftVxbNC1SmeZrgm1Lc8aSkhkGMTJUfgLyO w7G9Sxmj7KewOKArjs1hTj7NNamg18bl7SkXzFfZp+9URtPHoT0TfWXexj/reLPPadEh iFWo9QKNkKzU0/y9+9PtIc19L2G2sIf6LZeJ+tQwH1t/zI05Ye8JnEIuXLiGdJK5YjGn 29DuI9ccxAuklOCz1Hq3fumyIqL2ru+UCRp1uJIQXevtG4LrvWdpHUe5biQiGeYaEEwk 0o8waRlyndlV9lO19rrFbajH2/IY9AB4GlIlugJTyTPwYBitWC+Vu1sq5jIrkl4FYxdS iJDQ== 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=f7PuE3PU9IZAKRYkOlaFgDb8K/95QJK0u4dqN4qojd8=; b=cOaAJGmSWOC6KIK6DjLEiVb30J22Gn9pe9dkfEZz0RiTMk+L78qad4jmtFLpKBgZ1J ZOAOrUs2mX8zuyyBUzAy853hHgnkxQsIM654xkCO915BlY6a2p1hjwQdNzOHjRNCRgtL QD3xdiloSOl1U9a82wiV5GlvXtCEol56yvccUsX8BK6qTC8djsYY5dh6yiWPZxr1SW66 uHC0MtdAq4A8+ueTbB+T2HqPe+anGJk6+SySA5tb1LUway6+thFy1AeuYNLFCKpAh4qE u48POLzBrrSbLldcCtEm/aT4WfejqxZLS7/sCtLXJ6MjBx2xXVLVyJ5DW5J6i7K145T0 6kEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=bbNfokFi; 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 o16si24353000pgc.327.2019.04.07.02.27.37; Sun, 07 Apr 2019 02:27:53 -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=bbNfokFi; 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 S1726202AbfDGJ04 (ORCPT + 99 others); Sun, 7 Apr 2019 05:26:56 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44253 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfDGJ04 (ORCPT ); Sun, 7 Apr 2019 05:26:56 -0400 Received: by mail-pg1-f195.google.com with SMTP id i2so5546239pgj.11 for ; Sun, 07 Apr 2019 02:26:56 -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=f7PuE3PU9IZAKRYkOlaFgDb8K/95QJK0u4dqN4qojd8=; b=bbNfokFimd5HQORnbNhwUODAS598jejVD1m12V8aOtncSZySR/fuC68GhmvdZv8mHX IDGCOsc9Sum7PTqZbkZMJinGVMDJq4Sn9drQIQeqSn1UiTV3U+gfGTXbcSSY1R9i+Ufg 4QxUmA29ITT+FZI4a5sudgZAKlbpNY8FW5N9ZPCNkTln+HxmNLJlwN5FJtqdtfNENOuT Gh3Cv3B7j7xEb5YQq5rmYH6tQINkdti6qA+0SwNRzWZjNYgsPAAIfD2j3M1nRrwWdS3m TKdqdqrTMhEdv6sQB91s+hcktNGv2UQlEuUavw54FAYpLcO7o0q9Zo9KDFr6kKuIQzN9 lGIQ== 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=f7PuE3PU9IZAKRYkOlaFgDb8K/95QJK0u4dqN4qojd8=; b=YIpzxCRS114o09aAaEMEzaudtP1dVOZGUuLSLKYvzbIIFeW4m5mox2jUvi6Iy4kMLn PPwtatNN8dLvNDyodbRsfPobYP3vuHvxfhB8fDXwsh5Pno6LsUyLPjAl1FjXkha2JrI+ jxSMvi1EYzj7qShJQmKoVOHnbHFQsjBqTci45nhHs8ZOAXfbdyyh47BaN4C80YRAqMei uSwR3CBUeuqgnY23OKnnHssHAFVKMTMMW1tnAg7Tey6oghZTdkRuje207yrX1jHW+sEm LQqX7+T9S2B1WLNqRHZBzx3kj+4Pg0dFox07ev5/WPbgkXgLs398XycUyls8EKvi7iae Cwyw== X-Gm-Message-State: APjAAAV+7MelSp0e9ZURdyJqanF1z4ypUYZIjv9Q2s512f6p4C2nQvsv VFFH3AgsH6i/ZSMRBwxbcj8MXA== X-Received: by 2002:a63:460a:: with SMTP id t10mr21326844pga.354.1554629215717; Sun, 07 Apr 2019 02:26:55 -0700 (PDT) Received: from ?IPv6:2601:646:c200:1ef2:8daf:800d:46cf:9ade? ([2601:646:c200:1ef2:8daf:800d:46cf:9ade]) by smtp.gmail.com with ESMTPSA id n17sm20446687pgk.81.2019.04.07.02.26.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Apr 2019 02:26:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: 8b275b3754 ("x86/irq/64: Remap the IRQ stack with guard pages"): BUG: unable to handle kernel paging request at ffffb659000a1000 From: Andy Lutomirski X-Mailer: iPhone Mail (16D57) In-Reply-To: Date: Sun, 7 Apr 2019 02:26:54 -0700 Cc: Andy Lutomirski , LKML Content-Transfer-Encoding: quoted-printable Message-Id: References: <5ca84952.hpEqUp6kap0tafzR%lkp@intel.com> To: Thomas Gleixner Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Apr 7, 2019, at 2:23 AM, Thomas Gleixner wrote: >=20 >> On Sat, 6 Apr 2019, Andy Lutomirski wrote: >> I haven't spotted the actual bug yet, but the faulting instruction is: >>=20 >> 2a: 65 8b 35 09 ca 75 63 mov %gs:*0x6375ca09(%rip),%esi >> # 0x6375ca3a <-- trapping instruction >>=20 >> This seems to be faulting just above the top of the stack (the thing >> in RSP), so I suspect that there is some path that is shoving the >> remapped value into GSBASE, which is wrong. >>=20 >> Also, FWIW, there was some reason that I initialized all the virtual >> mappings for all possible CPUs early. I don't remember what it was, >> and it may not have been a good reason, but I put at least some >> nonzero amount of thought into it :) >=20 > There is absolutely no reason to have irq stacks before init_IRQ(). 32bit > uses at runtime allocated irq stacks for years. >=20 > If the CPU takes a device interrupt before that, then there are way more > things which explode than just the irqstack pointer being NULL. >=20 Fair enough. Although the patch I emailed in the other thread allows at lea= st the entry code to survive on 64-bit at the cost of just a couple lines of= code. But the kernel does indeed seem to work fine without the change. Feel free t= o disregard that part :)=