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 D84F739B for ; Wed, 30 Mar 2022 16:34:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87C4AC34113 for ; Wed, 30 Mar 2022 16:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648658077; bh=XxksR6VYfpVoCvd6RFZQQ4LAgDvEsQYSq1TNcOzLoUs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fu+2gLX21a8OwVa/+N7C35Y49yttDoosDiB88ncyF2EJRJq1Y1Lm1QmWZYUjYPDWB LI4c3qy/o8BDQwI3IMF0/BgekvEW6O+eYkafiwwEwNZGYFVZBiuPTILQfhbXRDS4ZX 5bmSFzBTHiBsFIQmMsqNijGUYmQx12q0ACpwfkKpK7l1tgtZrxPfTCrnxg023PGp23 BV1vVlOtAX/+ZXz7Xo7iJqqUkB55ywTr1Fw6gTFtSaQ76Uu5Se9yVcLTVl9+AaV8tU xuWb3/vi/i8li2xwKeGaIs7LcvMj3y579WIIl0FuBH6UmnJ82b9TeJQa1rgj8C0oVu 4q5yvWdb1fsIQ== Received: by mail-oi1-f169.google.com with SMTP id b188so22544495oia.13 for ; Wed, 30 Mar 2022 09:34:37 -0700 (PDT) X-Gm-Message-State: AOAM533kyT02TnCwnUY7dyZSx/7BVKGT3RMynQeV+VEPtlIFaW7QgBx4 cWND/KWlOw6dWDhmBgLNRPOLNLYQpyjAYRIJhLM= X-Google-Smtp-Source: ABdhPJwKJbONlsIybRQcq1GD0q/R2aFe3FxVy2bnvSOqPe2G9QX4krl3/ZC9ysACYk9ULdhpxmWojW5ClA/EpSLmp7o= X-Received: by 2002:aca:674c:0:b0:2d9:c460:707c with SMTP id b12-20020aca674c000000b002d9c460707cmr291303oiy.126.1648658076649; Wed, 30 Mar 2022 09:34:36 -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:34:25 +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: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. 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 F3788C433F5 for ; Wed, 30 Mar 2022 16:35:58 +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=BW6JPf2ANSBf00cjSRH5J40lOGPTkt2F9b6QJUnDFzM=; b=lUb3voNJsYUk2T YbIbnfrTYLHmbOq4tWdnCem6CbzAbJ0XF44jTd3h7sxV0e3QaxS0TLB23PBOvedsBEhnBiGZgMrFi 3T1cqv9LHkz4uy4wvynvqquHcU+bdJh2GVuny8wUmMNQg6t6AeIAmx3uIlHC6KRBB9Pa/oq/fbn3Z HYKT8VMi60jvd3P/p8YSLKWFww9o3OiEU9eOl0X75QkRgFNbMNyuE0FndgCRSKwUyNN7lwcZGX78I 7zOmt3WLRtuoRuEQKQRhkXG2uFGuowN2ZqhL5BQIiUO3JsKobQwuk8rxllCM0CkQDilv3Tr3kCxzn ZwQMj/Ouxa7KDpyJVbSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZbHO-00GqG9-Sr; Wed, 30 Mar 2022 16:34:43 +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 1nZbHK-00GqFi-Gj for linux-arm-kernel@lists.infradead.org; Wed, 30 Mar 2022 16:34:39 +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 183FF617D7 for ; Wed, 30 Mar 2022 16:34:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A3C2C340F2 for ; Wed, 30 Mar 2022 16:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648658077; bh=XxksR6VYfpVoCvd6RFZQQ4LAgDvEsQYSq1TNcOzLoUs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fu+2gLX21a8OwVa/+N7C35Y49yttDoosDiB88ncyF2EJRJq1Y1Lm1QmWZYUjYPDWB LI4c3qy/o8BDQwI3IMF0/BgekvEW6O+eYkafiwwEwNZGYFVZBiuPTILQfhbXRDS4ZX 5bmSFzBTHiBsFIQmMsqNijGUYmQx12q0ACpwfkKpK7l1tgtZrxPfTCrnxg023PGp23 BV1vVlOtAX/+ZXz7Xo7iJqqUkB55ywTr1Fw6gTFtSaQ76Uu5Se9yVcLTVl9+AaV8tU xuWb3/vi/i8li2xwKeGaIs7LcvMj3y579WIIl0FuBH6UmnJ82b9TeJQa1rgj8C0oVu 4q5yvWdb1fsIQ== Received: by mail-oi1-f179.google.com with SMTP id k10so22609997oia.0 for ; Wed, 30 Mar 2022 09:34:37 -0700 (PDT) X-Gm-Message-State: AOAM533ZIzJvUc35xbN7IbCCNd1ybpm+nSFHUuNLHGGhHy9KXF37TEYu HksHt6+x37oZYUtVhPuuNfZVlcrsJDIEtOpu8mY= X-Google-Smtp-Source: ABdhPJwKJbONlsIybRQcq1GD0q/R2aFe3FxVy2bnvSOqPe2G9QX4krl3/ZC9ysACYk9ULdhpxmWojW5ClA/EpSLmp7o= X-Received: by 2002:aca:674c:0:b0:2d9:c460:707c with SMTP id b12-20020aca674c000000b002d9c460707cmr291303oiy.126.1648658076649; Wed, 30 Mar 2022 09:34:36 -0700 (PDT) MIME-Version: 1.0 References: <2109354.irdbgypaU6@localhost.localdomain> In-Reply-To: From: Ard Biesheuvel Date: Wed, 30 Mar 2022 18:34:25 +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_093438_656011_88676D17 X-CRM114-Status: GOOD ( 22.00 ) 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: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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel