From: Masahiro Yamada <masahiroy@kernel.org>
To: deller@kernel.org
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
linux-modules@vger.kernel.org, linux-arch@vger.kernel.org,
Luis Chamberlain <mcgrof@kernel.org>
Subject: Re: [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries
Date: Thu, 21 Dec 2023 19:22:11 +0900 [thread overview]
Message-ID: <CAK7LNAQ4C66NZpOwM6_pzdFbTx7LHfv40vJsNu3spPCEJKfOFw@mail.gmail.com> (raw)
In-Reply-To: <20231122221814.139916-2-deller@kernel.org>
On Thu, Nov 23, 2023 at 7:18 AM <deller@kernel.org> wrote:
>
> From: Helge Deller <deller@gmx.de>
>
> 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 <deller@gmx.de>
This is correct.
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Please add
Fixes: ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
> ---
> 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" \
> --
> 2.41.0
>
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2023-12-21 10:22 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 22:18 [PATCH 0/4] Section alignment issues? deller
2023-11-22 22:18 ` [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries deller
2023-12-21 10:22 ` Masahiro Yamada [this message]
2023-12-21 16:01 ` Masahiro Yamada
2023-12-22 6:07 ` Luis Chamberlain
2023-12-22 6:08 ` Luis Chamberlain
2023-12-22 7:01 ` Masahiro Yamada
2023-12-22 20:11 ` Luis Chamberlain
2023-12-23 14:35 ` Masahiro Yamada
2023-11-22 22:18 ` [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections deller
2023-12-22 5:59 ` Luis Chamberlain
2023-12-22 12:13 ` Helge Deller
2023-12-22 20:10 ` Luis Chamberlain
2023-12-30 7:33 ` Helge Deller
2024-01-22 16:10 ` Luis Chamberlain
2024-01-22 16:47 ` Helge Deller
2024-01-22 18:48 ` Luis Chamberlain
2023-11-22 22:18 ` [PATCH 3/4] vmlinux.lds.h: Fix alignment for __ksymtab*, __kcrctab_* and .pci_fixup sections deller
2023-12-21 13:07 ` Masahiro Yamada
2023-12-22 9:02 ` Helge Deller
2023-12-23 4:10 ` Masahiro Yamada
2023-11-22 22:18 ` [PATCH 4/4] modules: Add missing entry for __ex_table deller
2024-01-29 18:50 ` Luis Chamberlain
2023-12-19 21:26 ` [PATCH 0/4] Section alignment issues? Luis Chamberlain
2023-12-20 19:40 ` Luis Chamberlain
2023-12-22 9:13 ` Helge Deller
2023-12-21 13:40 ` Masahiro Yamada
2023-12-21 15:42 ` Masahiro Yamada
2023-12-22 8:23 ` Helge Deller
2023-12-23 1:32 ` Masahiro Yamada
2023-12-22 9:48 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK7LNAQ4C66NZpOwM6_pzdFbTx7LHfv40vJsNu3spPCEJKfOFw@mail.gmail.com \
--to=masahiroy@kernel.org \
--cc=arnd@arndb.de \
--cc=deller@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).