Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4482139rwb; Tue, 6 Sep 2022 08:07:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR517f6tIf2C4AwfUcAh2YA4XU/w+q/5ITtFQaUmDkowmK2KYfAxDYNL+a9JXH/YeCR44qXu X-Received: by 2002:a17:902:e5cd:b0:176:ad01:ab47 with SMTP id u13-20020a170902e5cd00b00176ad01ab47mr10375114plf.133.1662476871624; Tue, 06 Sep 2022 08:07:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476871; cv=none; d=google.com; s=arc-20160816; b=TeasNOLFc53zdA6hhwPJJMz4/Z9i84YMJwvZQMvAPGNQvd0qRdVaRBoTd1Xcl3R2g7 sBRU14d+EHbUNvAY03OapJp9WzfEBe2Z94gB85xYNZ+7a7oDHWv53DOkh200Z7YN8Pow ZMr5D3zwi28tz1MsfEQXz38n9Cwg2AJWkuj0PwReggftEQKTo3d42isvHrr1DFpK4w6E I4vrm/C8KxUiWtUCI3LuB/KsZWInCjiHmk91mzUydoSnyP4EqB3y56WpcAou+rCC5Ocd Ei3MQaF1xLT1LndKg3sSB7CwsND4SgLEZWZxjxn9kJbAtXV16WuipHjxnSm2IecqNlwx R6Kw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=juU1WVtte1CPCZspAAxMcTo3qw2MXKZCJk13DYGD8bM=; b=pcVUi12ulORGtxmwGl6YnZqdzUlLDJZQuyyDOaT39ycYnRF9qvqlEx5zuZ6Evu/hqm FMsL38yG1wGitCDwRASbH3GnQA2DfFSEMWj4ub8Od9z4OQ3WKM3eCs9dA0sF+ZTHIkIP rTTRq75zGVHSRjIFrUMo2HKVi7S4hDYL7jtFiInUZDlmDdeDUJn30mX/9Yz/11ncqik5 EnhnUuLDLdqlO7jNC4zwuxYOl9rrVphtnuGgy0yTHpH/tfRq+yI5JffaVRNIZV1cpzoC Vl1HDZzNquk+khXtxaryoVl44GoLGGVpSR8xcdTGdSupZdo7kV1zYEO/QFVXGx0EijTq TFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="FV/Wl7Mx"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a631f4a000000b0041b2f37c570si13753476pgm.752.2022.09.06.08.07.16; Tue, 06 Sep 2022 08:07:51 -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=@linuxfoundation.org header.s=korg header.b="FV/Wl7Mx"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241296AbiIFOD5 (ORCPT + 99 others); Tue, 6 Sep 2022 10:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240912AbiIFOBN (ORCPT ); Tue, 6 Sep 2022 10:01:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08987F0A7; Tue, 6 Sep 2022 06:44:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5F367B816A0; Tue, 6 Sep 2022 13:44:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6BEEC433D6; Tue, 6 Sep 2022 13:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471859; bh=2t5gG7chT0YaqazGsBisRir+uDym/eOwq0dvTSwEEQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FV/Wl7MxDYwCaZ4OXIchYok+2hFAxQw/V7Tc+5xNGK+qRVfu5gJpuRPj1c7JKmQK6 22E5RD/+/09pQQP6hrFlYEjxIY9v/dv++WIqLnR/AlxsRXJj3PJyDROWO7J8q/628L 61fxMN7hx3yAiTCHKHykA80LcuYW6hulzh56tN2E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Masahiro Yamada , Michael Ellerman Subject: [PATCH 5.19 062/155] powerpc: align syscall table for ppc32 Date: Tue, 6 Sep 2022 15:30:10 +0200 Message-Id: <20220906132832.060951221@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132829.417117002@linuxfoundation.org> References: <20220906132829.417117002@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 From: Masahiro Yamada commit c7acee3d2f128a38b68fb7af85dbbd91bfd0b4ad upstream. Christophe Leroy reported that commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS") broke mpc85xx_defconfig + CONFIG_RELOCATABLE=y. LD vmlinux SYSMAP System.map SORTTAB vmlinux CHKREL vmlinux WARNING: 451 bad relocations c0b312a9 R_PPC_UADDR32 .head.text-0x3ff9ed54 c0b312ad R_PPC_UADDR32 .head.text-0x3ffac224 c0b312b1 R_PPC_UADDR32 .head.text-0x3ffb09f4 c0b312b5 R_PPC_UADDR32 .head.text-0x3fe184dc c0b312b9 R_PPC_UADDR32 .head.text-0x3fe183a8 ... The compiler emits a bunch of R_PPC_UADDR32, which is not supported by arch/powerpc/kernel/reloc_32.S. The reason is there exists an unaligned symbol. $ powerpc-linux-gnu-nm -n vmlinux ... c0b31258 d spe_aligninfo c0b31298 d __func__.0 c0b312a9 D sys_call_table c0b319b8 d __func__.0 Commit 7b4537199a4a is not the root cause. Even before that, I can reproduce the same issue for mpc85xx_defconfig + CONFIG_RELOCATABLE=y + CONFIG_MODVERSIONS=n. It is just that nobody noticed because when CONFIG_MODVERSIONS is enabled, a __crc_* symbol inserted before sys_call_table was hiding the unalignment issue. Adding alignment to the syscall table for ppc32 fixes the issue. Cc: stable@vger.kernel.org Reported-by: Christophe Leroy Signed-off-by: Masahiro Yamada Tested-by: Christophe Leroy [mpe: Trim change log discussion, add Cc stable] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/lkml/38605f6a-a568-f884-f06f-ea4da5b214f0@csgroup.eu/ Link: https://lore.kernel.org/r/20220820165129.1147589-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/systbl.S | 1 + 1 file changed, 1 insertion(+) --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S @@ -18,6 +18,7 @@ .p2align 3 #define __SYSCALL(nr, entry) .8byte entry #else + .p2align 2 #define __SYSCALL(nr, entry) .long entry #endif