From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 489ABC433DF for ; Tue, 26 May 2020 20:22:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B09F20899 for ; Tue, 26 May 2020 20:22:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n4OBH/Cc"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="W6NNzQlr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B09F20899 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PzUVSUBcHTfFoWDTNJQ1eMSO/nd1+hVLBw0jIiAdrwY=; b=n4OBH/Ccquys9p gXv32XaaYd1dH7N0RO4DlMQnUv9++q1OBsqTkTLf2qC9mLj+TT6Xa/JeKi3tHTgXkedxPsbFWkZD2 VwRUnRXtzAQ1CbprIPRPDee1LQV9VOfhoM9TUf2ZyHJswVHvL3UtKAeWLAYquB+SqoITEQaz3yunr k405iMsFc179P+Zt6m05WenC+/Hp1b6n2NkhEuWXJPa/4HpTdEmRvtC0Vnc42Zt8efCLvrhUnfgru WJvrpHlE9+Xz7SPOHRC5ZvYXw0dMn/o5Op2mJmjBdgks6ENB/1IOFr29X3N22mHZQK5BQgx696qur isoUx5c3I1xTUL2dz6Xg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdg5N-0001u1-LR; Tue, 26 May 2020 20:22:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdg5K-0001tK-Cr for linux-arm-kernel@lists.infradead.org; Tue, 26 May 2020 20:22:04 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7945207D8; Tue, 26 May 2020 20:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590524522; bh=nqEQAKe1E02EN8Nj+D8tTjNZWIBlnWbZha/PR+697TY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W6NNzQlrklzzDSURv+i0A0/DJQCLA2gJcnFHYjDcxivIImAite7Y8Jqcsh2Lc9ust IE8ABMrPoL1vEEWDrMXExFBkqQBy7TluD4WiVrLvWgV60Mucrf5dmERtWu104Oglgf PSfaoBByOs8cF59IyvmtiHtAfDoVUmUFoJHoq3yU= Date: Tue, 26 May 2020 21:21:57 +0100 From: Will Deacon To: Lorenzo Pieralisi Subject: Re: arm64/acpi: NULL dereference reports from UBSAN at boot Message-ID: <20200526202157.GE2206@willie-the-truck> References: <20200521100952.GA5360@willie-the-truck> <20200521173738.GA29590@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200521173738.GA29590@e121166-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200526_132202_458096_EC5E88EB X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, rjw@rjwysocki.net, ndesaulniers@google.com, linux-kernel@vger.kernel.org, guohanjun@huawei.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Lorenzo, Hanjun, [+Nick] On Thu, May 21, 2020 at 06:37:38PM +0100, Lorenzo Pieralisi wrote: > On Thu, May 21, 2020 at 11:09:53AM +0100, Will Deacon wrote: > > Hi folks, > > > > I just tried booting the arm64 for-kernelci branch under QEMU (version > > 4.2.50 (v4.2.0-779-g4354edb6dcc7)) with UBSAN enabled, and I see a > > couple of NULL pointer dereferences reported at boot. I think they're > > both GIC related (log below). I don't see a panic with UBSAN disabled, > > so something's fishy here. > > May I ask you the QEMU command line please - just to make sure I can > replicate it. As it turns out, I'm only able to reproduce this when building with Clang, but I don't know whether that's because GCC is missing something of Clang is signalling a false positive. You also don't need all of those whacky fuzzing options enabled. Anyway, to reproduce: $ git checkout for-next/kernelci $ make ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- defconfig $ make ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- Image I throw that at QEMU using: qemu-system-aarch64 -M virt -machine virtualization=true \ -machine virt,gic-version=3 \ -cpu max,sve=off -smp 2 -m 4096 \ -drive if=pflash,format=raw,file=efi.img,readonly \ -drive if=pflash,format=raw,file=varstore.img \ -drive if=virtio,format=raw,file=disk.img \ -device virtio-scsi-pci,id=scsi0 \ -device virtio-rng-pci \ -device virtio-net-pci,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp::8222-:22 \ -nographic \ -kernel ~/work/linux/arch/arm64/boot/Image \ -append "earlycon root=/dev/vda2" I built QEMU a while ago according to: https://mirrors.edge.kernel.org/pub/linux/kernel/people/will/docs/qemu/qemu-arm64-howto.html and its version 4.2.50 (v4.2.0-779-g4354edb6dcc7). My clang is version 11.0.1. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel