* [PATCH net v2] rust: net::phy fix module autoloading
@ 2024-12-12 13:00 FUJITA Tomonori
2024-12-17 8:54 ` Paolo Abeni
2024-12-17 9:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 10+ messages in thread
From: FUJITA Tomonori @ 2024-12-12 13:00 UTC (permalink / raw)
To: netdev
Cc: davem, edumazet, kuba, pabeni, rust-for-linux, andrew, hkallweit1,
tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh, benno.lossin,
a.hindborg, ojeda, alex.gaynor
The alias symbol name was renamed. Adjust module_phy_driver macro to
create the proper symbol name to fix module autoloading.
Fixes: 054a9cd395a7 ("modpost: rename alias symbol for MODULE_DEVICE_TABLE()")
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
rust/kernel/net/phy.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/net/phy.rs b/rust/kernel/net/phy.rs
index b89c681d97c0..2fbfb6a94c11 100644
--- a/rust/kernel/net/phy.rs
+++ b/rust/kernel/net/phy.rs
@@ -860,7 +860,7 @@ const fn as_int(&self) -> u32 {
/// ];
/// #[cfg(MODULE)]
/// #[no_mangle]
-/// static __mod_mdio__phydev_device_table: [::kernel::bindings::mdio_device_id; 2] = _DEVICE_TABLE;
+/// static __mod_device_table__mdio__phydev: [::kernel::bindings::mdio_device_id; 2] = _DEVICE_TABLE;
/// ```
#[macro_export]
macro_rules! module_phy_driver {
@@ -883,7 +883,7 @@ macro_rules! module_phy_driver {
#[cfg(MODULE)]
#[no_mangle]
- static __mod_mdio__phydev_device_table: [$crate::bindings::mdio_device_id;
+ static __mod_device_table__mdio__phydev: [$crate::bindings::mdio_device_id;
$crate::module_phy_driver!(@count_devices $($dev),+) + 1] = _DEVICE_TABLE;
};
base-commit: 51a00be6a0994da2ba6b4ace3b7a0d9373b4b25e
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-12 13:00 [PATCH net v2] rust: net::phy fix module autoloading FUJITA Tomonori
@ 2024-12-17 8:54 ` Paolo Abeni
2024-12-17 14:54 ` Jakub Kicinski
2024-12-17 9:00 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 10+ messages in thread
From: Paolo Abeni @ 2024-12-17 8:54 UTC (permalink / raw)
To: FUJITA Tomonori, kuba
Cc: davem, edumazet, rust-for-linux, andrew, hkallweit1, tmgross,
aliceryhl, boqun.feng, gary, bjorn3_gh, benno.lossin, a.hindborg,
ojeda, alex.gaynor, netdev
On 12/12/24 14:00, FUJITA Tomonori wrote:
> The alias symbol name was renamed. Adjust module_phy_driver macro to
> create the proper symbol name to fix module autoloading.
>
> Fixes: 054a9cd395a7 ("modpost: rename alias symbol for MODULE_DEVICE_TABLE()")
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
You should have retained the acked-by tag that Miguel provided on V1. No
need to repost, just for future memory.
@Jakub: I still can't reproduce the nipa (rust) build failures locally.
/P
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-12 13:00 [PATCH net v2] rust: net::phy fix module autoloading FUJITA Tomonori
2024-12-17 8:54 ` Paolo Abeni
@ 2024-12-17 9:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-17 9:00 UTC (permalink / raw)
To: FUJITA Tomonori
Cc: netdev, davem, edumazet, kuba, pabeni, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 12 Dec 2024 22:00:15 +0900 you wrote:
> The alias symbol name was renamed. Adjust module_phy_driver macro to
> create the proper symbol name to fix module autoloading.
>
> Fixes: 054a9cd395a7 ("modpost: rename alias symbol for MODULE_DEVICE_TABLE()")
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
> ---
> rust/kernel/net/phy.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> [...]
Here is the summary with links:
- [net,v2] rust: net::phy fix module autoloading
https://git.kernel.org/netdev/net/c/94901b7a74d8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 8:54 ` Paolo Abeni
@ 2024-12-17 14:54 ` Jakub Kicinski
2024-12-17 15:11 ` Paolo Abeni
0 siblings, 1 reply; 10+ messages in thread
From: Jakub Kicinski @ 2024-12-17 14:54 UTC (permalink / raw)
To: Paolo Abeni
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On Tue, 17 Dec 2024 09:54:11 +0100 Paolo Abeni wrote:
> @Jakub: I still can't reproduce the nipa (rust) build failures locally.
I'll look into it. Just in case you already investigated the same thing
I would - have you tried the rust build script from NIPA or just to
build manually? The build VM is using Fedora 41, IIUC it should have
new enough Rust compiler but I may have messed something up trying
to install the latest compiler manually...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 14:54 ` Jakub Kicinski
@ 2024-12-17 15:11 ` Paolo Abeni
2024-12-17 15:44 ` Jakub Kicinski
0 siblings, 1 reply; 10+ messages in thread
From: Paolo Abeni @ 2024-12-17 15:11 UTC (permalink / raw)
To: Jakub Kicinski
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On 12/17/24 15:54, Jakub Kicinski wrote:
> On Tue, 17 Dec 2024 09:54:11 +0100 Paolo Abeni wrote:
>> @Jakub: I still can't reproduce the nipa (rust) build failures locally.
>
> I'll look into it. Just in case you already investigated the same thing
> I would - have you tried the rust build script from NIPA or just to
> build manually?
I tried both (I changed the build dir in the script to fit my setup). I
could not see the failure in any case - on top of RHEL 9.
/P
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 15:11 ` Paolo Abeni
@ 2024-12-17 15:44 ` Jakub Kicinski
2024-12-17 16:51 ` Jakub Kicinski
0 siblings, 1 reply; 10+ messages in thread
From: Jakub Kicinski @ 2024-12-17 15:44 UTC (permalink / raw)
To: Paolo Abeni
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On Tue, 17 Dec 2024 16:11:29 +0100 Paolo Abeni wrote:
> On 12/17/24 15:54, Jakub Kicinski wrote:
> > On Tue, 17 Dec 2024 09:54:11 +0100 Paolo Abeni wrote:
> >> @Jakub: I still can't reproduce the nipa (rust) build failures locally.
> >
> > I'll look into it. Just in case you already investigated the same thing
> > I would - have you tried the rust build script from NIPA or just to
> > build manually?
>
> I tried both (I changed the build dir in the script to fit my setup). I
> could not see the failure in any case - on top of RHEL 9.
I think I figured it out, you must have old clang. On Fedora 41
CFI_CLANG defaults to y and prevents RUST from getting enabled.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 15:44 ` Jakub Kicinski
@ 2024-12-17 16:51 ` Jakub Kicinski
2024-12-18 2:24 ` FUJITA Tomonori
2024-12-18 10:04 ` Paolo Abeni
0 siblings, 2 replies; 10+ messages in thread
From: Jakub Kicinski @ 2024-12-17 16:51 UTC (permalink / raw)
To: Paolo Abeni
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On Tue, 17 Dec 2024 07:44:00 -0800 Jakub Kicinski wrote:
> On Tue, 17 Dec 2024 16:11:29 +0100 Paolo Abeni wrote:
> > > I'll look into it. Just in case you already investigated the same thing
> > > I would - have you tried the rust build script from NIPA or just to
> > > build manually?
> >
> > I tried both (I changed the build dir in the script to fit my setup). I
> > could not see the failure in any case - on top of RHEL 9.
>
> I think I figured it out, you must have old clang. On Fedora 41
> CFI_CLANG defaults to y and prevents RUST from getting enabled.
Still hitting a problem in module signing.
Rust folks does this ring a bell?
make[4]: *** Deleting file 'certs/signing_key.pem'
GENKEY certs/signing_key.pem
....+.........+++++
-----
80728E46C07F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:342:
make[4]: *** [../certs/Makefile:53: certs/signing_key.pem] Error 1
make[4]: *** Waiting for unfinished jobs....
allmodconfig without Rust builds fine with both GCC and clang.
build flags: LLVM=1
config: https://paste.centos.org/view/0555e9dd
OS: Fedora 41
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 16:51 ` Jakub Kicinski
@ 2024-12-18 2:24 ` FUJITA Tomonori
2024-12-18 10:04 ` Paolo Abeni
1 sibling, 0 replies; 10+ messages in thread
From: FUJITA Tomonori @ 2024-12-18 2:24 UTC (permalink / raw)
To: kuba
Cc: pabeni, fujita.tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On Tue, 17 Dec 2024 08:51:24 -0800
Jakub Kicinski <kuba@kernel.org> wrote:
> On Tue, 17 Dec 2024 07:44:00 -0800 Jakub Kicinski wrote:
>> On Tue, 17 Dec 2024 16:11:29 +0100 Paolo Abeni wrote:
>> > > I'll look into it. Just in case you already investigated the same thing
>> > > I would - have you tried the rust build script from NIPA or just to
>> > > build manually?
>> >
>> > I tried both (I changed the build dir in the script to fit my setup). I
>> > could not see the failure in any case - on top of RHEL 9.
>>
>> I think I figured it out, you must have old clang. On Fedora 41
>> CFI_CLANG defaults to y and prevents RUST from getting enabled.
>
> Still hitting a problem in module signing.
> Rust folks does this ring a bell?
>
> make[4]: *** Deleting file 'certs/signing_key.pem'
> GENKEY certs/signing_key.pem
> ....+.........+++++
> -----
> 80728E46C07F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:342:
> make[4]: *** [../certs/Makefile:53: certs/signing_key.pem] Error 1
> make[4]: *** Waiting for unfinished jobs....
Generating a key (openssl command) failed?
> allmodconfig without Rust builds fine with both GCC and clang.
>
> build flags: LLVM=1
> config: https://paste.centos.org/view/0555e9dd
> OS: Fedora 41
CONFIG_MODULE_SIG_HASH is same on rust build and non rust build?
Looks like it's the only kernel config option that might change the
command behavior.
I can't reproduce the error with the config on Ubuntu 24.04.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-17 16:51 ` Jakub Kicinski
2024-12-18 2:24 ` FUJITA Tomonori
@ 2024-12-18 10:04 ` Paolo Abeni
2024-12-18 19:58 ` Jakub Kicinski
1 sibling, 1 reply; 10+ messages in thread
From: Paolo Abeni @ 2024-12-18 10:04 UTC (permalink / raw)
To: Jakub Kicinski
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On 12/17/24 17:51, Jakub Kicinski wrote:
> On Tue, 17 Dec 2024 07:44:00 -0800 Jakub Kicinski wrote:
>> On Tue, 17 Dec 2024 16:11:29 +0100 Paolo Abeni wrote:
>>>> I'll look into it. Just in case you already investigated the same thing
>>>> I would - have you tried the rust build script from NIPA or just to
>>>> build manually?
>>>
>>> I tried both (I changed the build dir in the script to fit my setup). I
>>> could not see the failure in any case - on top of RHEL 9.
>>
>> I think I figured it out, you must have old clang. On Fedora 41
>> CFI_CLANG defaults to y and prevents RUST from getting enabled.
>
> Still hitting a problem in module signing.
> Rust folks does this ring a bell?
>
> make[4]: *** Deleting file 'certs/signing_key.pem'
> GENKEY certs/signing_key.pem
> ....+.........+++++
> -----
> 80728E46C07F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:342:
> make[4]: *** [../certs/Makefile:53: certs/signing_key.pem] Error 1
> make[4]: *** Waiting for unfinished jobs....
>
> allmodconfig without Rust builds fine with both GCC and clang.
FTR, I got a similar error (even without RUST) when I had
CONFIG_MODULE_SIG_HASH="sha1"
I moved to
CONFIG_MODULE_SIG_HASH="sha256"
since a while, and that fixed the issue for me (also
CONFIG_MODULE_SIG_SHA256=y is needed).
/P
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net v2] rust: net::phy fix module autoloading
2024-12-18 10:04 ` Paolo Abeni
@ 2024-12-18 19:58 ` Jakub Kicinski
0 siblings, 0 replies; 10+ messages in thread
From: Jakub Kicinski @ 2024-12-18 19:58 UTC (permalink / raw)
To: Paolo Abeni
Cc: FUJITA Tomonori, davem, edumazet, rust-for-linux, andrew,
hkallweit1, tmgross, aliceryhl, boqun.feng, gary, bjorn3_gh,
benno.lossin, a.hindborg, ojeda, alex.gaynor, netdev
On Wed, 18 Dec 2024 11:04:25 +0100 Paolo Abeni wrote:
> >> I think I figured it out, you must have old clang. On Fedora 41
> >> CFI_CLANG defaults to y and prevents RUST from getting enabled.
> >
> > Still hitting a problem in module signing.
> > Rust folks does this ring a bell?
> >
> > make[4]: *** Deleting file 'certs/signing_key.pem'
> > GENKEY certs/signing_key.pem
> > ....+.........+++++
> > -----
> > 80728E46C07F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:342:
> > make[4]: *** [../certs/Makefile:53: certs/signing_key.pem] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> >
> > allmodconfig without Rust builds fine with both GCC and clang.
>
> FTR, I got a similar error (even without RUST) when I had
>
> CONFIG_MODULE_SIG_HASH="sha1"
>
> I moved to
>
> CONFIG_MODULE_SIG_HASH="sha256"
>
> since a while, and that fixed the issue for me (also
> CONFIG_MODULE_SIG_SHA256=y is needed).
Oh, some form of forced SHA1 deprecation in Fedora 41 possibly?
I switched to sha256 and that fixes the issue. We'll find out
if Rust is really fixed next time a Rust patch comes :)
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-12-18 19:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 13:00 [PATCH net v2] rust: net::phy fix module autoloading FUJITA Tomonori
2024-12-17 8:54 ` Paolo Abeni
2024-12-17 14:54 ` Jakub Kicinski
2024-12-17 15:11 ` Paolo Abeni
2024-12-17 15:44 ` Jakub Kicinski
2024-12-17 16:51 ` Jakub Kicinski
2024-12-18 2:24 ` FUJITA Tomonori
2024-12-18 10:04 ` Paolo Abeni
2024-12-18 19:58 ` Jakub Kicinski
2024-12-17 9:00 ` patchwork-bot+netdevbpf
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).