From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0721B258E for ; Wed, 30 Mar 2022 16:45:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7A2FC34115 for ; Wed, 30 Mar 2022 16:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648658730; bh=tehy4fHX+fMMENwFIm23z4gzb7EwaFuXoodcZ5+V27o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Td1kpocYHFTaB9eUIqD3NNf1L3jLMoGgepA24KfMV7j4b8W1lKrQh9bTu8sKWcfRX Uk/Xk4X8KmPdHSE17nexD4LqqoWJSYSda032DDneslxAZTE+MpBdk4O6Q+L8ZFuEkS x+zfq7Ga+lW0iU8BGxAkJT1ygpsYUevmiv4srHHFAhJc+V24AohL9m5UkpmB6i6Asi VcfXYM4QtApqgSi3vfj4Isx7NOWhHt8qmZXO3NSuEh8vp8YqQjc3yVLKT8yRPgIMYz DVxuNFsCUjh5Eaq1WwB484tj5l+XGhk1PKRWa1Z1Hmf2xmbRxx5+65GkfAqgJ8ghTx RuQj9tgYCz8Yw== Received: by mail-oi1-f180.google.com with SMTP id q129so22625440oif.4 for ; Wed, 30 Mar 2022 09:45:30 -0700 (PDT) X-Gm-Message-State: AOAM531p83mIDSS7v/Leu6xoPrD7+fY7RvnUH4PMR/sWGljE6bnOiB0L DQxiL2sETRdhwBxWAze1LSFP615JSZPSMykZrhw= X-Google-Smtp-Source: ABdhPJwBoN0uG1mMLGLZK9UjENjN3bUI1x0D1u1hskI6ccwVubYyNW6mi5ndVVDJ8ZEd1vVoEjyEOIJXmcjdMeR+Dj8= X-Received: by 2002:aca:674c:0:b0:2d9:c460:707c with SMTP id b12-20020aca674c000000b002d9c460707cmr321468oiy.126.1648658729844; Wed, 30 Mar 2022 09:45:29 -0700 (PDT) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <2109354.irdbgypaU6@localhost.localdomain> In-Reply-To: From: Ard Biesheuvel Date: Wed, 30 Mar 2022 18:45:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: CONFIG_THUMB2_KERNEL=y boot failure after Spectre BHB fixes To: "Russell King (Oracle)" Cc: Christian Eggers , Linux ARM , Catalin Marinas , Linux Kernel Mailing List , llvm@lists.linux.dev, Nathan Chancellor Content-Type: text/plain; charset="UTF-8" On Wed, 30 Mar 2022 at 18:37, Russell King (Oracle) wrote: > > On Wed, Mar 30, 2022 at 06:34:25PM +0200, Ard Biesheuvel wrote: > > On Wed, 30 Mar 2022 at 18:12, Russell King (Oracle) > > wrote: > > > > > > On Tue, Mar 22, 2022 at 06:49:17PM +0100, Christian Eggers wrote: > > > > Hi Nathan, hi Russel, > > > > > > > > I stumbled today over the same problem (no output on serial console > > > > with v5.15.28-rt36). During `git bisect`, I had also some commits > > > > where a few lines of output were visible. > > > > > > > > At commit 8d9d651ff227 ("ARM: use LOADADDR() to get load address of > > > > sections"), the system boots up to here: > > > > > > > > start_kernel() > > > > +--setup_arch() > > > > +--paging_init() > > > > +--devicemaps_init() > > > > +--eary_trap_init(vectors_base = 0xC7FFE000) > > > > +--copy_from_lma(vectors_base = 0xC7FFE000, __vectors_start=0x0, __vectors_end=0x20) > > > > +--__memcpy() > > > > > > > > copy_template.S:113 > > > > ldr8w r1, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f > > > > r1 = 0 > > > > > > > > > > > > With the final v5.15.28-rt36 I found out that the system boots fine > > > > after disabling CONFIG_HARDEN_BRANCH_HISTORY. > > > > > > > > Is there anything else I could analyze? My SoC system is a NXP i.MX6LL > > > > with a ARMv7 core. I have access to a JTAG debugger. > > > > > > I think this is already fixed in mainline. Commit: > > > > > > 6c7cb60bff7a ("ARM: fix Thumb2 regression") > > > > > > > It's still broken - I sent a couple of patches on Monday, among which > > one to fix the boot issue with loop8 on Thumb2. The problem is 'b . + > > 4', which produces a narrow encoding, and so it skips the subsequent > > subs instruction and loops forever. > > And what's the current status? Sorry, I've way too much email from the > last 2.5 weeks to find it myself. > https://lore.kernel.org/linux-arm-kernel/20220328134714.205342-1-ardb@kernel.org/ Nobody bothered to respond yet, I can drop the first two in the patch tracker if you like. 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5781BC433F5 for ; Wed, 30 Mar 2022 16:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nr6QLnHBJ8GFMGfQ+tGx9Z9FlxOmbeqEJO4aPpFJQQc=; b=trXCT/ipd42BZe uYkZqW3BlUe3qSPcgln4Bxsje7n+beLFPts+6s79kuDvtrA02qwwctBTuiVAk910A0EP3ethdiqK3 b35hQjsZmfupwywdT+K17ZaYRer5slNRU5TwfcjFFsEH8h93FHhiEGYyFftfUz5M82Cpr+dVXQVtw 7NZ22z1/Eft65Smb2J6z2H6dxsQd+a/WCrT1iRtbQCFqIgFZTbGjbV1Aebn5B3TnM2Mn0dwjxbUJA XnCFXa5bgwdZcqxFBzYuYJqJTUdeAlFnp8RVc/FSjxCnj5mHVXohzqIz0iMORsrUoznXVdV0SDe7C 8hjtDUwU6BD8eOJ3Izyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZbSC-00Grug-DM; Wed, 30 Mar 2022 16:45:52 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZbRr-00Gro1-9y for linux-arm-kernel@lists.infradead.org; Wed, 30 Mar 2022 16:45:32 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC90C617FF for ; Wed, 30 Mar 2022 16:45:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B014BC34113 for ; Wed, 30 Mar 2022 16:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648658730; bh=tehy4fHX+fMMENwFIm23z4gzb7EwaFuXoodcZ5+V27o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Td1kpocYHFTaB9eUIqD3NNf1L3jLMoGgepA24KfMV7j4b8W1lKrQh9bTu8sKWcfRX Uk/Xk4X8KmPdHSE17nexD4LqqoWJSYSda032DDneslxAZTE+MpBdk4O6Q+L8ZFuEkS x+zfq7Ga+lW0iU8BGxAkJT1ygpsYUevmiv4srHHFAhJc+V24AohL9m5UkpmB6i6Asi VcfXYM4QtApqgSi3vfj4Isx7NOWhHt8qmZXO3NSuEh8vp8YqQjc3yVLKT8yRPgIMYz DVxuNFsCUjh5Eaq1WwB484tj5l+XGhk1PKRWa1Z1Hmf2xmbRxx5+65GkfAqgJ8ghTx RuQj9tgYCz8Yw== Received: by mail-oi1-f171.google.com with SMTP id k10so22639774oia.0 for ; Wed, 30 Mar 2022 09:45:30 -0700 (PDT) X-Gm-Message-State: AOAM532gh8YdMrK4TdbNICZuGX5XiDNvVbxTtQW7ZzcZe1Rgia3eVJOe HnNIrY/wazDKDXi2e/FAB9JP3SaQUSeE6flMwTY= X-Google-Smtp-Source: ABdhPJwBoN0uG1mMLGLZK9UjENjN3bUI1x0D1u1hskI6ccwVubYyNW6mi5ndVVDJ8ZEd1vVoEjyEOIJXmcjdMeR+Dj8= X-Received: by 2002:aca:674c:0:b0:2d9:c460:707c with SMTP id b12-20020aca674c000000b002d9c460707cmr321468oiy.126.1648658729844; Wed, 30 Mar 2022 09:45:29 -0700 (PDT) MIME-Version: 1.0 References: <2109354.irdbgypaU6@localhost.localdomain> In-Reply-To: From: Ard Biesheuvel Date: Wed, 30 Mar 2022 18:45:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: CONFIG_THUMB2_KERNEL=y boot failure after Spectre BHB fixes To: "Russell King (Oracle)" Cc: Christian Eggers , Linux ARM , Catalin Marinas , Linux Kernel Mailing List , llvm@lists.linux.dev, Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220330_094531_447415_DB4DD9B8 X-CRM114-Status: GOOD ( 27.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 30 Mar 2022 at 18:37, Russell King (Oracle) wrote: > > On Wed, Mar 30, 2022 at 06:34:25PM +0200, Ard Biesheuvel wrote: > > On Wed, 30 Mar 2022 at 18:12, Russell King (Oracle) > > wrote: > > > > > > On Tue, Mar 22, 2022 at 06:49:17PM +0100, Christian Eggers wrote: > > > > Hi Nathan, hi Russel, > > > > > > > > I stumbled today over the same problem (no output on serial console > > > > with v5.15.28-rt36). During `git bisect`, I had also some commits > > > > where a few lines of output were visible. > > > > > > > > At commit 8d9d651ff227 ("ARM: use LOADADDR() to get load address of > > > > sections"), the system boots up to here: > > > > > > > > start_kernel() > > > > +--setup_arch() > > > > +--paging_init() > > > > +--devicemaps_init() > > > > +--eary_trap_init(vectors_base = 0xC7FFE000) > > > > +--copy_from_lma(vectors_base = 0xC7FFE000, __vectors_start=0x0, __vectors_end=0x20) > > > > +--__memcpy() > > > > > > > > copy_template.S:113 > > > > ldr8w r1, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f > > > > r1 = 0 > > > > > > > > > > > > With the final v5.15.28-rt36 I found out that the system boots fine > > > > after disabling CONFIG_HARDEN_BRANCH_HISTORY. > > > > > > > > Is there anything else I could analyze? My SoC system is a NXP i.MX6LL > > > > with a ARMv7 core. I have access to a JTAG debugger. > > > > > > I think this is already fixed in mainline. Commit: > > > > > > 6c7cb60bff7a ("ARM: fix Thumb2 regression") > > > > > > > It's still broken - I sent a couple of patches on Monday, among which > > one to fix the boot issue with loop8 on Thumb2. The problem is 'b . + > > 4', which produces a narrow encoding, and so it skips the subsequent > > subs instruction and loops forever. > > And what's the current status? Sorry, I've way too much email from the > last 2.5 weeks to find it myself. > https://lore.kernel.org/linux-arm-kernel/20220328134714.205342-1-ardb@kernel.org/ Nobody bothered to respond yet, I can drop the first two in the patch tracker if you like. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel