From: Luis Chamberlain <mcgrof@kernel.org>
To: Matthew Maurer <mmaurer@google.com>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
"Lucas De Marchi" <lucas.de.marchi@gmail.com>,
"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>,
"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>,
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
Subject: Re: [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information
Date: Thu, 7 Nov 2024 14:38:13 -0800 [thread overview]
Message-ID: <Zy1BVXgnT72Jt_HE@bombadil.infradead.org> (raw)
In-Reply-To: <CAGSQo03+1WjUVj-iQ6zdOST6z=p+=OqS2Xk_c4ZUdHOsxa7g2w@mail.gmail.com>
On Wed, Nov 06, 2024 at 02:19:38PM -0800, Matthew Maurer wrote:
> >
> > > If booted against an old kernel, it will
> > > behave as though there is no modversions information.
> >
> > Huh? This I don't get. If you have the new libkmod and boot
> > an old kernel, that should just not break becauase well, long
> > symbols were not ever supported properly anyway, so no regression.
>
> Specifically, if you set NO_BASIC_MODVERSIONS, build a module, and
> then load said module with a kernel *before* EXTENDED_MODVERSIONS
> existed, it will see no modversion info on the module to check. This
> will be true regardless of symbol length.
Isn't that just the same as disabling modverisons?
If you select modversions, you get the options to choose:
- old modversions
- old modversions + extended modversions
- extended modversions only
> > I'm not quite sure I understood your last comment here though,
> > can you clarify what you meant?
> >
> > Anyway, so now that this is all cleared up, the next question I have
> > is, let's compare a NO_BASIC_MODVERSIONS world now, given that the
> > userspace requirements aren't large at all, what actual benefits does
> > using this new extended mod versions have? Why wouldn't a distro end
> > up preferring this for say a future release for all modules?
>
> I think a distro will end up preferring using this for all modules,
> but was intending to put both in for a transitional period until the
> new format was more accepted.
The only thing left I think to test is the impact at runtime, and the
only thing I can think of is first we use find_symbol() on resolve_symbol()
which it took me a while to review and realize that this just uses a
completely different ELF section, the the ksymtab sections which are split up
between the old and the gpl section. But after that we use check_version().
I suspect the major overhead here is in find_symbol() and that's in no way shape
or form affected by your changes, and I also suspect that since the
way you implemented for_each_modversion_info_ext() is just *one* search
there shouldn't be any penalty here at all. Given it took *me* a while
to review all this, I think it would be good for you to also expand your
cover letter to be crystal clear on these expectations to users and
developers and if anything expand on the Kconfig / and add documentation
if we don't document any of this.
I'd still like to see you guys test all this with the new TEST_KALLSYMS.
Luis
next prev parent reply other threads:[~2024-11-07 22:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 23:05 [PATCH v8 0/3] Extended MODVERSIONS Support Matthew Maurer
2024-10-30 23:05 ` [PATCH v8 1/3] modules: Support extended MODVERSIONS info Matthew Maurer
2024-10-31 1:22 ` Michael Ellerman
2024-10-31 4:36 ` Luis Chamberlain
2024-10-31 5:06 ` Matthew Maurer
2024-10-31 7:49 ` Luis Chamberlain
2024-11-07 19:40 ` Matthew Maurer
2024-10-30 23:05 ` [PATCH v8 2/3] modpost: Produce extended MODVERSIONS information Matthew Maurer
2024-10-31 11:37 ` Luis Chamberlain
2024-10-31 20:00 ` Matthew Maurer
2024-11-01 21:10 ` Luis Chamberlain
2024-11-06 0:26 ` Matthew Maurer
2024-11-06 2:16 ` Luis Chamberlain
2024-11-06 22:19 ` Matthew Maurer
2024-11-07 6:27 ` Lucas De Marchi
2024-11-07 19:37 ` Matthew Maurer
2024-11-07 22:38 ` Luis Chamberlain [this message]
2024-11-18 22:25 ` Luis Chamberlain
2024-11-19 0:09 ` Matthew Maurer
2024-11-19 1:33 ` Luis Chamberlain
2024-11-21 21:51 ` Matthew Maurer
2024-10-30 23:05 ` [PATCH v8 3/3] rust: Use gendwarfksyms + extended modversions for CONFIG_MODVERSIONS Matthew Maurer
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=Zy1BVXgnT72Jt_HE@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--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=lucas.de.marchi@gmail.com \
--cc=lucas.demarchi@intel.com \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mmaurer@google.com \
--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;
as well as URLs for NNTP newsgroup(s).