From nobody Tue Apr 7 13:31:45 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CF0FECAAD5 for ; Fri, 26 Aug 2022 23:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234581AbiHZXz6 (ORCPT ); Fri, 26 Aug 2022 19:55:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbiHZXzy (ORCPT ); Fri, 26 Aug 2022 19:55:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD8F861DBF; Fri, 26 Aug 2022 16:55:53 -0700 (PDT) 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 7A97961BD6; Fri, 26 Aug 2022 23:55:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90E78C433C1; Fri, 26 Aug 2022 23:55:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661558152; bh=XX57P/MTCtZkCrNzIPCjYslur0UOJAp7ux5igGP8TC4=; h=From:To:Cc:Subject:Date:From; b=XwnTUgcIQqZkwTiSuIUBpv3lK+bfamIVSO7W0LE2Q5sC/NxHrveipp8qyjIO41qqw 2gnPzXoZS3W5D3rhQVewyEPsxizT9v0z2bAZy0dp8i99b3tq2IB2yFFKyrP5CQL0tx D2o3b0PujQW3kjaDmAIUo77FZ8XR1MTtGudex+QAMRQDOQiAnBmTjtIXRmkl90qsHB Q2DB+4ZA9MGqFlrOhY54HGgJ00hQk1tPT9MuKjn68GAlwwHgtJhRTKTTvcZcGBA2kQ UrUeiuejGZsFKE/rz4oubkUrs7oJ5NBPfk3o57PkggPKsV4D13IZBW0FJXyW2VvJuH T/wEyw3QxzNBA== From: Josh Poimboeuf To: Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org Cc: Christian Borntraeger , Sven Schnelle , linux-kernel@vger.kernel.org, Sumanth Korikkar Subject: [PATCH RFC] s390: Fix nospec table alignments Date: Fri, 26 Aug 2022 16:55:44 -0700 Message-Id: <8719bf1ce4a72ebdeb575200290094e9ce047bcc.1661557333.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add proper alignment for .nospec_call_table and .nospec_return_table in vmlinux. Fixes: f19fbd5ed642 ("s390: introduce execute-trampolines for branches") Signed-off-by: Josh Poimboeuf --- This is RFC because I don't know anything about s390 behavior for unaligned data accesses, but this seemed to fix an issue for me. While working on another s390 issue, I was getting intermittent boot failures in __nospec_revert() when it tried to access 'instr[0]'. I noticed the __nospec_call_start address ended in 'ff'. This patch seemed to fix it. I have no idea why it was (only sometimes) failing in the first place. The intermittent part of it is probably at least partially explained by CONFIG_RANDOMIZE_BASE. Except now I can no longer recreate it :-/ Regardless, this patch seems correct. I just can't explain what I saw. Any ideas? arch/s390/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index 2e526f11b91e..5ea3830af0cc 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -131,6 +131,7 @@ SECTIONS /* * Table with the patch locations to undo expolines */ + . =3D ALIGN(4); .nospec_call_table : { __nospec_call_start =3D . ; *(.s390_indirect*) --=20 2.37.2