Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1232430yba; Sat, 6 Apr 2019 07:03:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqynBp06kle/umj5UQdCW07ctHr6mI+Yxfk2fAJoNHICtPXyJUJmapsYlv7pWJnyBkRq4RJ6 X-Received: by 2002:a63:9246:: with SMTP id s6mr18443747pgn.316.1554559397267; Sat, 06 Apr 2019 07:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554559397; cv=none; d=google.com; s=arc-20160816; b=okQY1laTviC6rs8zMGSDq66RdXz55eXS5DX7ulQYwR0rzQ301STS12TB3YV5F/Cb3E 2wEcduuhMNqt2FHQIm7Jz9/jOKT4V6hkOwM2mPXEOGoQZgzqQR/gZHgW9fwXdUbuug55 R+KTuATmivkgtJZVjGu92FuJ1fCLxdhHoy0Dw94RRNLOO4uvKPkw4DHbW0ulok3XzyOM LO8v6yJDqU7fxnf/j3gemofo1i2UUiBS9uzS/m9mqFYbZI3FF++gOCnVQpFtz5W1Uiao 8vW89DuFw//Mvc4ywpPto6u8wyPEGu9OlFcHLnKCZ4O3Ge3I7dU4PVUm4AuIe4wbddHX DTCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=QUleRves/cXQnlSex3LyBMt8+K/SSfV3pvh2FSGM9Y0=; b=JxFtwdOypXKp6dleEr0ih+VA+HII85N7slg3mII460BB7PLsfPNr3e7dk4rHCWUq+m NpO/Cs0d5tTa+OnkX1omapgQkP7clBcJ8FkZ09B2J9M5sqBVzBU154TcXBp3MvZ+U3Zb DZK0H0VbFK+4SHcPPZ+ib0wL/FXdXGW5eS0Uua3wvbfkBke6pABCJts82in8AzNmTVhj HDjS6YIutMxd+uJYRvj7X0x1583zawxT9gRsEi82Eg2CIBhn2MMCWpQWRSNHZWMAkcBN mw3dOfQIIOILr79CLwDXHT5GAQf4sBOI1QuDJxTaMPdqeAC2qP+woNfrxFNk1Xaz6UlH 0p/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DIo1BrQt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si21439756pfg.109.2019.04.06.07.03.01; Sat, 06 Apr 2019 07:03:17 -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=@kernel.org header.s=default header.b=DIo1BrQt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbfDFOBq (ORCPT + 99 others); Sat, 6 Apr 2019 10:01:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:47390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbfDFOBq (ORCPT ); Sat, 6 Apr 2019 10:01:46 -0400 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF2152173C for ; Sat, 6 Apr 2019 14:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554559304; bh=Qugy+65Xr98HUt0l2CC0BvERrlJmUfNVGq1lBHgSZho=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DIo1BrQtXOvKyfihtLdA/N6dNJs0LGl76qFFpbmd1lY+7pCLB0uTfRlOWELzN5KnS IjyCK9uzobdBdj6tM7B3AmavD/YmpEFlj2VJdwlcd+O4fsxSMp+JJpKqAFLIZTl1/I J3rKelgzpjfpCfVp1+Qba8ip2Qwt3JHXI+9b0Ink= Received: by mail-wm1-f48.google.com with SMTP id y197so10026356wmd.0 for ; Sat, 06 Apr 2019 07:01:44 -0700 (PDT) X-Gm-Message-State: APjAAAWyXYaQcrusCphl2I621RA1GdBy0oz3GkrtsKsv4obly2B0ZmrI VT9V5d8luH+o5YxslNmTJAKGadWGG5pDRmWS0180vg== X-Received: by 2002:a1c:4102:: with SMTP id o2mr11074198wma.91.1554559303207; Sat, 06 Apr 2019 07:01:43 -0700 (PDT) MIME-Version: 1.0 References: <5ca84952.hpEqUp6kap0tafzR%lkp@intel.com> In-Reply-To: From: Andy Lutomirski Date: Sat, 6 Apr 2019 07:01:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 8b275b3754 ("x86/irq/64: Remap the IRQ stack with guard pages"): BUG: unable to handle kernel paging request at ffffb659000a1000 To: Andy Lutomirski Cc: LKML , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 6, 2019 at 6:54 AM Andy Lutomirski wrote: > > On Fri, Apr 5, 2019 at 11:38 PM kernel test robot wrote: > > > > Greetings, > > > > 0day kernel testing robot got the below dmesg and the first bad commit is > > > > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/stackguards > > > > commit 8b275b3754465d502d393f8ae8dd355b7067e73f > > Author: Andy Lutomirski > > AuthorDate: Fri Jul 13 19:01:23 2018 -0700 > > Commit: Thomas Gleixner > > CommitDate: Fri Apr 5 17:04:10 2019 +0200 > > > > x86/irq/64: Remap the IRQ stack with guard pages > > > > The IRQ stack lives in percpu space, so an IRQ handler that overflows it > > will overwrite other data structures. > > > > Use vmap() to remap the IRQ stack so that it will have the usual guard > > pages that vmap/vmalloc allocations have. With this the kernel will panic > > immediately on an IRQ stack overflow. > > > > [ tglx: Move the map code to a proper place and invoke it only when a CPU > > is about to be brought online. No point in installing the map at > > early boot for all possible CPUs. Fail the CPU bringup if the vmap > > fails as done for all other preparatory stages in cpu hotplug. ] > > > > Signed-off-by: Andy Lutomirski > > Signed-off-by: Thomas Gleixner > > I haven't spotted the actual bug yet, but the faulting instruction is: > > 2a: 65 8b 35 09 ca 75 63 mov %gs:*0x6375ca09(%rip),%esi > # 0x6375ca3a <-- trapping instruction > Gah, -ETOOLITTLESLEEP. This is a bit strange: e: 4c 8d 74 24 08 lea 0x8(%rsp),%r14 ... 26: 49 83 c6 08 add $0x8,%r14 2a:* 4d 8b 7e f8 mov -0x8(%r14),%r15 <-- trapping instruction Which is an access to the stack above RSP by a few bytes. But that can't be an overflow, since it's *above* RSP. Is something possibly screwy with the mapping? I might have a chance to debug this for real this evening. Right now I'm about to try to wrangle a sick kid through an airport.