From: Matthew Maurer <mmaurer@google.com>
To: "Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Naveen N Rao" <naveen@kernel.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Luis Chamberlain" <mcgrof@kernel.org>,
"Petr Pavlu" <petr.pavlu@suse.com>,
"Sami Tolvanen" <samitolvanen@google.com>,
"Daniel Gomez" <da.gomez@samsung.com>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Matthew Maurer <mmaurer@google.com>
Subject: [PATCH v7 0/3] Extended MODVERSIONS Support
Date: Wed, 23 Oct 2024 02:31:27 +0000 [thread overview]
Message-ID: <20241023-extended-modversions-v7-0-339787b43373@google.com> (raw)
This patch series is intended for use alongside the Implement DWARF
modversions series [1] to enable RUST and MODVERSIONS at the same
time.
Elsewhere, we've seen a desire for long symbol name support for LTO
symbol names [2], and the previous series came up [3] as a possible
solution rather than hashing, which some have objected [4] to.
This series adds a MODVERSIONS format which uses a section per column.
This avoids userspace tools breaking if we need to make a similar change
to the format in the future - we would do so by adding a new section,
rather than editing the struct definition. In the new format, the name
section is formatted as a concatenated sequence of NUL-terminated
strings, which allows for arbitrary length names.
Emitting the extended format is guarded by CONFIG_EXTENDED_MODVERSIONS,
but the kernel always knows how to validate both the original and
extended formats.
Selecting RUST and MODVERSIONS is now possible if GENDWARFKSYMS is
selected, and will implicitly select EXTENDED_MODVERSIONS.
This series depends upon the module verification refactor patches [5]
that were split off of v5, and DWARF-based versions [1].
linuxppc-dev is requested to look at the ppc-specific munging,
as Luis would like some eyes on there [6].
[1] https://lore.kernel.org/lkml/20241008183823.36676-21-samitolvanen@google.com/
[2] https://lore.kernel.org/lkml/20240605032120.3179157-1-song@kernel.org/
[3] https://lore.kernel.org/lkml/ZoxbEEsK40ASi1cY@bombadil.infradead.org/
[4] https://lore.kernel.org/lkml/0b2697fd-7ab4-469f-83a6-ec9ebc701ba0@suse.com/
[5] https://lore.kernel.org/linux-modules/20241015231651.3851138-1-mmaurer@google.com/T/#t
[6] https://lore.kernel.org/lkml/ZxahDv5ZKdM__0sZ@bombadil.infradead.org/
Changes in v7:
- Fix modpost to detect EXTENDED_MODVERSIONS based on a flag
- Drop patches to fix export_report.pl
- Switch from conditional compilation in .mod.c to conditional emission
in modpost
- Factored extended modversion emission into its own function
- Allow RUST + MODVERSIONS if GENDWARFKSYMS is enabled by selecting
EXTENDED_MODVERSIONS
v6: https://lore.kernel.org/lkml/20241015231925.3854230-1-mmaurer@google.com/
- Splits verification refactor Luis requested out to a separate change
- Clarifies commits around export_report.pl repairs
- Add CONFIG_EXTENDED_MODVERSIONS to control whether extended
information is included in the module, per Luis's request.
v5: https://lore.kernel.org/all/20240925233854.90072-1-mmaurer@google.com/
- Addresses Sami's comments from v3 that I missed in v4 (missing early
return, extra parens)
v4: https://lore.kernel.org/asahi/20240924212024.540574-1-mmaurer@google.com/
- Fix incorrect dot munging in PPC
v3: https://lore.kernel.org/lkml/87le0w2hop.fsf@mail.lhotse/T/
- Split up the module verification refactor into smaller patches, per
Greg K-H's suggestion.
v2: https://lore.kernel.org/all/20231118025748.2778044-1-mmaurer@google.com/
- Add loading/verification refactor before modifying, per Luis's request
v1: https://lore.kernel.org/rust-for-linux/20231115185858.2110875-1-mmaurer@google.com/
Matthew Maurer (5):
export_report: Rehabilitate script
modules: Support extended MODVERSIONS info
export_report: Tolerate additional `.mod.c` content
modpost: Produce extended MODVERSIONS information
export_report: Use new version info format
arch/powerpc/kernel/module_64.c | 23 ++++++++-
kernel/module/Kconfig | 8 +++
kernel/module/internal.h | 11 ++++
kernel/module/main.c | 92 ++++++++++++++++++++++++++++++---
kernel/module/version.c | 45 ++++++++++++++++
scripts/export_report.pl | 17 +++---
scripts/mod/modpost.c | 41 +++++++++++++++
7 files changed, 220 insertions(+), 17 deletions(-)
--
2.47.0.rc1.288.g06298d1525-goog
---
Matthew Maurer (2):
modules: Support extended MODVERSIONS info
modpost: Produce extended MODVERSIONS information
Sami Tolvanen (1):
rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS
arch/powerpc/kernel/module_64.c | 24 ++++++++++-
init/Kconfig | 3 +-
kernel/module/Kconfig | 10 +++++
kernel/module/internal.h | 11 +++++
kernel/module/main.c | 92 +++++++++++++++++++++++++++++++++++++----
kernel/module/version.c | 45 ++++++++++++++++++++
rust/Makefile | 32 +++++++++++++-
scripts/Makefile.modpost | 1 +
scripts/mod/modpost.c | 65 +++++++++++++++++++++++++++--
9 files changed, 266 insertions(+), 17 deletions(-)
---
base-commit: 2295cf87ed5a6da4564034e4f8ebcce0a0a021ed
change-id: 20241022-extended-modversions-a7b44dfbfff1
prerequisite-message-id: <20241008183823.36676-21-samitolvanen@google.com>
prerequisite-patch-id: 08b46e0d1e37c262c08da6db4a87728d7b3047cc
prerequisite-patch-id: 97f307e05ec4b7a653f1ec68f825e8d5bd622b05
prerequisite-patch-id: a4519fb5eef33d692b918529ae094845f822b718
prerequisite-patch-id: e192e2a692c40d96cba919e3baae68c441ab25e4
prerequisite-patch-id: 58359b851618c2b6582e02e11ac54d7cd0375853
prerequisite-patch-id: 4d6a826429c519b581d01215e1d9c7373fdfd8c6
prerequisite-patch-id: 0dcd84187b222adf52696dbcab303d683d087dd2
prerequisite-patch-id: 0abe8634eb844a85e8dc51c1cd3970cf96cc494a
prerequisite-patch-id: c9b1a36f177f5bd25cc5a9236f4839e972c12333
prerequisite-patch-id: b7b61991d74f0a0a0b8f50f7eeb3c306261ee512
prerequisite-patch-id: f6c97ecaaa62cee387d7bb83e3dd6d5fda44cafd
prerequisite-patch-id: 6182973041c913f727b289228e7e3e19de09c999
prerequisite-patch-id: d688fb99eb5d6152fece6068c1b3a434c5750109
prerequisite-patch-id: f09e5d7c8bbba276b0e3a244a89b6bb18f692fa1
prerequisite-patch-id: 66ffe1d8df889b254a0f29992d9c0356676ed489
prerequisite-patch-id: a372f88626c3dda51eab6c6af132a76141ff20cc
prerequisite-patch-id: 57d2fe708769154a6494fb1fece56911dea00687
prerequisite-patch-id: 18ddc778b1a3b263db34e906eb74e9d15602ce68
prerequisite-patch-id: 8297655807a95e5a5522edaa0c082888c8a0286f
Best regards,
--
Matthew Maurer <mmaurer@google.com>
next reply other threads:[~2024-10-23 2:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 2:31 Matthew Maurer [this message]
2024-10-23 2:31 ` [PATCH v7 1/3] modules: Support extended MODVERSIONS info Matthew Maurer
2024-10-24 23:00 ` Sami Tolvanen
2024-10-25 11:14 ` Michael Ellerman
2024-10-25 15:17 ` Matthew Maurer
2024-10-30 5:35 ` Michael Ellerman
2024-10-23 2:31 ` [PATCH v7 2/3] modpost: Produce extended MODVERSIONS information Matthew Maurer
2024-10-24 23:01 ` Sami Tolvanen
2024-10-23 2:31 ` [PATCH v7 3/3] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS Matthew Maurer
2024-10-24 23:06 ` Sami Tolvanen
2024-10-24 23:07 ` [PATCH v7 0/3] Extended MODVERSIONS Support Sami Tolvanen
2024-10-25 4:53 ` Luis Chamberlain
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=20241023-extended-modversions-v7-0-339787b43373@google.com \
--to=mmaurer@google.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=christophe.leroy@csgroup.eu \
--cc=da.gomez@samsung.com \
--cc=gary@garyguo.net \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=naveen@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=npiggin@gmail.com \
--cc=ojeda@kernel.org \
--cc=petr.pavlu@suse.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=samitolvanen@google.com \
--cc=tmgross@umich.edu \
/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