Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp873760rwe; Fri, 26 Aug 2022 17:05:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ghpOx9FG1WrvPpmlPiBNMqecVNwoPRzX/wCqpPV5zsXwPfYBkXk+UxLQC+cX1GSrNjNeW X-Received: by 2002:a17:902:c40a:b0:172:f3bf:de6d with SMTP id k10-20020a170902c40a00b00172f3bfde6dmr5580786plk.165.1661558748539; Fri, 26 Aug 2022 17:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661558748; cv=none; d=google.com; s=arc-20160816; b=sgXI4TxwuI6UVc2Z0WAQQLaqLVOl/hI4HmeLrKCqeAT3tD9JB7AouXbllolZi3ERhw CX1N986eYDB7McIwuPtN/21dqr+fgZk80u5yR/js/HEbsybc+Hx7U/mLcImQx39dKaYF SAdg9rxaotlJRPWPAvZzX4dvQIU+MW/GbjaxHeYRLwZ8f8YZiHjD+fc4Kr1h8O+rVcaB XOGD1orwWaEFdNDLoiEtzPbCRBdwT0YDNgBuAdVKmbvARViZLwsVxTmNZUF2piOKaZ+r L3MfI8pIcLlqBTOvjhbri5tpfdkD3a6BRzxRlmTSP4uYlQplUopmFMsWZhSq2USKNfhs cZVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r2+e5ejc1x1u+6imERj2KnHVP4K7yHuldaAzCfJ59pE=; b=fbaJUb0WpLiT4JiVvYpXoameQNCJ7E8wv+10ii3Ip2XigF+CSwnqJdwNxQ4CpNI1ZW FsJaMhcsWoWdKmLE6ikHBfMQqUN1LoX8Pdr3BOYJQveYJq372+6nbytYzlnwstbmMONx G0IAr9dD54QMBItwImAE1AojRHvoB+P/qteoFCqbRVCl4mWJ8BPlfVv5NhIzX82eZx44 p8dkXlau87uv3IUaIdw9oLTCJteJTGHi4ZCwXzIlP7d+wG/NOVRSxDFPeTlABdKzoBjU egtHA9tySRE/HAc93Akk0hYpZS7zhGVgh0LTadVXPqwauJ8A49Xa/wI/d2cVihslXnTG DeWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XwnTUgcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a056a00130300b0052b206007bcsi3230887pfu.237.2022.08.26.17.05.35; Fri, 26 Aug 2022 17:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XwnTUgcI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232233AbiHZXz4 (ORCPT + 99 others); Fri, 26 Aug 2022 19:55:56 -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-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ + . = ALIGN(4); .nospec_call_table : { __nospec_call_start = . ; *(.s390_indirect*) -- 2.37.2