From patchwork Wed Nov 22 22:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 168581 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:6f03:b0:164:83eb:24d7 with SMTP id r3csp1537148rwn; Wed, 22 Nov 2023 14:18:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHw8dtrz3NPdPXx58mFFGnvWyOdwtHll4UwXFX92Pmnk2hXnwMPZSvjjMJAUattrtTbwnpi X-Received: by 2002:a17:902:c94d:b0:1cc:5258:845c with SMTP id i13-20020a170902c94d00b001cc5258845cmr4074070pla.57.1700691526968; Wed, 22 Nov 2023 14:18:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700691526; cv=none; d=google.com; s=arc-20160816; b=v6+lOPS+89oftPQBypMqlGeDdiOXYpfNlv4ZSxDZ3I5lCsU8FY/TYB6oLUvLts/4dm Nz818GteLuziXOu6SEXg8PdswZBdNjtp2ipA1AqmgpySF1BtMt1Vc7F2YR4CNXokL4ke DH+l+15cu3YnM6/la2v7kudezsyvuzLfty4TVH+ZHaAQbAzM1/7GGs249oCs/0tEnQe1 rFsAAm93Yde9li78nHuZVjEFqXVyQoKVRY7op86m2zFAJktn4PIZyduA0twz0fQuX53T v1upSfSUbVjngSfx+g8/yXkTW/P3DsAnK2gVg38lH6/TXedpR0MeA3wQ29ZlOyFVf6+p wbhA== 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 :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=VITu87Pl3VKgeOzJVXV4EdGm4xnooqaitfGti+g61fk=; fh=p1Qf4H5TYe6x87oeu/ZwD97uWE3f/aSmdhLxEgeh+tk=; b=hVSTSmjUMKvowaUM5hRP/jZ2y5aJjmX1VU4wciry+AtFU/dMMNMyTmHrdnCFTAvjzo BUXmKxyFDoXQSKHzAnqqkR5lFczN4UFBslcTSmTYtxFefuOta9VWLY/CtaE2N7d7TkaR LvXWgkhEtP/BLurkwro0z87grAojhtLlpViw+vmzszy0zahkHAsRUZEY0zDecpozvp9j WuYjbko3gh+EDoE1n8EXC40YjlBMgRSM1kV3pKmM5ENfu4u4HnTqbgS1Zo0Lb6xwMRIf PG6kbeR6a95uDGmZAQyQ5o3zVFUtiQGkZ9EsbhRDDJelEfz5B/oXsalvn9rVsKMUGA2Y U07Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m2h70Ph0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id p9-20020a170902bd0900b001cc23d2bb92si285853pls.650.2023.11.22.14.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 14:18:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=m2h70Ph0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6CE7F825B4A9; Wed, 22 Nov 2023 14:18:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344678AbjKVWS3 (ORCPT + 99 others); Wed, 22 Nov 2023 17:18:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344659AbjKVWSY (ORCPT ); Wed, 22 Nov 2023 17:18:24 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA60BD49 for ; Wed, 22 Nov 2023 14:18:20 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08242C433CA; Wed, 22 Nov 2023 22:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700691500; bh=xbM7UwIkiSdSjSS3CBuDr633BLrw+vGBgZ7TQFhbsLY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m2h70Ph0oAZb/KX4nmAIJIgAmgEZEAHewd+1aGGUOhZc0ygMNSOWeUiEp1Yg2WYgy vN3jz96ggTWzf1Bzay6hfnIGbpcm6KWoXWDKgTCPKRFBnwnJo53wEurBHbmta/5y+F MtE0afBV1dJSy4Js5ujpLxMDxY+lmy3oDFmunIGryqALbZSCSERfm4NW6NBKDd/cZY Vrb7l60r4giYrU3WZ2eflFchwcLkYBTML9vieiuIqzr3zvsWKZRmMvmalsDisaSBhM S79EOfk01xMSaLSuK1QPOMEwM4smNWNix8Jo/Kdp4fF7Ulk7r0ZUUllRLeCLj4URPW hAYOhMY02eQkA== From: deller@kernel.org To: linux-kernel@vger.kernel.org, Masahiro Yamada , Arnd Bergmann , linux-modules@vger.kernel.org, linux-arch@vger.kernel.org, Luis Chamberlain Subject: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries Date: Wed, 22 Nov 2023 23:18:11 +0100 Message-ID: <20231122221814.139916-2-deller@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122221814.139916-1-deller@kernel.org> References: <20231122221814.139916-1-deller@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 14:18:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783304318623414526 X-GMAIL-MSGID: 1783304318623414526 From: Helge Deller An alignment of 4 bytes is wrong for 64-bit platforms which don't define CONFIG_HAVE_ARCH_PREL32_RELOCATIONS (which then store 64-bit pointers). Fix their alignment to 8 bytes. Signed-off-by: Helge Deller Acked-by: Masahiro Yamada --- include/linux/export-internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h index 69501e0ec239..cd253eb51d6c 100644 --- a/include/linux/export-internal.h +++ b/include/linux/export-internal.h @@ -16,10 +16,13 @@ * and eliminates the need for absolute relocations that require runtime * processing on relocatable kernels. */ +#define __KSYM_ALIGN ".balign 4" #define __KSYM_REF(sym) ".long " #sym "- ." #elif defined(CONFIG_64BIT) +#define __KSYM_ALIGN ".balign 8" #define __KSYM_REF(sym) ".quad " #sym #else +#define __KSYM_ALIGN ".balign 4" #define __KSYM_REF(sym) ".long " #sym #endif @@ -42,7 +45,7 @@ " .asciz \"" ns "\"" "\n" \ " .previous" "\n" \ " .section \"___ksymtab" sec "+" #name "\", \"a\"" "\n" \ - " .balign 4" "\n" \ + __KSYM_ALIGN "\n" \ "__ksymtab_" #name ":" "\n" \ __KSYM_REF(sym) "\n" \ __KSYM_REF(__kstrtab_ ##name) "\n" \