rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Maurer <mmaurer@google.com>
To: gary@garyguo.net, masahiroy@kernel.org,
	Miguel Ojeda <ojeda@kernel.org>,
	 Alex Gaynor <alex.gaynor@gmail.com>,
	Wedson Almeida Filho <wedsonaf@gmail.com>
Cc: "Matthew Maurer" <mmaurer@google.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	rust-for-linux@vger.kernel.org
Subject: [PATCH 0/3] MODVERSIONS + RUST Redux
Date: Wed, 15 Nov 2023 18:50:08 +0000	[thread overview]
Message-ID: <20231115185858.2110875-1-mmaurer@google.com> (raw)

Support both MODVERSIONS and RUST by making symbol version information extensible. This works by having a separate section per field, and allowing iteration to work differently per field. The old module information remains available to allow existing kmod tools to continue to work on new modules if they are only looking for C information.

This also gives us the ability to attach additional information to symbol versioning (e.g. namespacing) should it become necessary in the future without breaking backwards compatibility - new sections will be added, but existing tools will still find all their information and keep the existing format.

PPC has a hack around removing leading dots in symvers. I have
replicated this hack for the new format, but without context for why
this was being done, I can't test that it works as expected.

This was inspired by Masahiro Yamada's suggestion[1] when discussing the previous attempt.
Link: https://lore.kernel.org/lkml/CAK7LNATsuszFR7JB5ZkqVS1W=hWr9=E7bTf+MvgJ+NXT3aZNwg@mail.gmail.com/

Matthew Maurer (3):
  export_report.pl: Rehabilitate script
  modpost: Extended modversion support
  export_report: Use new version info format

 arch/powerpc/kernel/module_64.c | 24 +++++++++-
 init/Kconfig                    |  1 -
 kernel/module/internal.h        | 16 ++++++-
 kernel/module/main.c            |  9 +++-
 kernel/module/version.c         | 77 +++++++++++++++++++++++++++++++++
 scripts/export_report.pl        | 17 +++++---
 scripts/mod/modpost.c           | 33 ++++++++++++--
 7 files changed, 161 insertions(+), 16 deletions(-)

-- 
2.43.0.rc0.421.g78406f8d94-goog


             reply	other threads:[~2023-11-15 18:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 18:50 Matthew Maurer [this message]
2023-11-15 18:50 ` [PATCH 2/3] modpost: Extended modversion support Matthew Maurer
2023-11-16 17:12   ` Luis Chamberlain
2023-11-15 21:05 ` [PATCH 0/3] MODVERSIONS + RUST Redux Trevor Gross
     [not found]   ` <CAGSQo01pE=V+NCdgp-1r_PAfn_48D4yXb91spHf8cZA0Z7GoLA@mail.gmail.com>
2023-11-15 21:24     ` Matthew Maurer
2023-11-15 21:54       ` Trevor Gross
2023-11-16  7:19         ` Ariel Miculas
2023-11-16 14:49       ` Laura Abbott

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=20231115185858.2110875-1-mmaurer@google.com \
    --to=mmaurer@google.com \
    --cc=a.hindborg@samsung.com \
    --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=gary@garyguo.net \
    --cc=masahiroy@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    /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).