lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df1827bd-628b-424f-80a6-63cea6bf7a39@samsung.com>
Date: Wed, 29 Oct 2025 12:07:43 +0100
From: Michal Wilczynski <m.wilczynski@...sung.com>
To: Uwe Kleine-König <ukleinek@...nel.org>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin
	<lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl
	<aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich
	<dakr@...nel.org>, Drew Fustini <fustini@...nel.org>, Guo Ren
	<guoren@...nel.org>, Fu Wei <wefu@...hat.com>, Stephen Rothwell
	<sfr@...b.auug.org.au>, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-pwm@...r.kernel.org,
	linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 0/4] Introduce import_ns support for Rust



On 10/29/25 11:04, Uwe Kleine-König wrote:
> Hello,
> 
> On Tue, Oct 28, 2025 at 01:22:31PM +0100, Michal Wilczynski wrote:
>> This series addresses build warnings reported by `modpost` for the Rust
>> PWM driver (`pwm_th1520`) in linux-next:
>>
>> WARNING: modpost: module pwm_th1520 uses symbol pwmchip_release from
>> namespace PWM, but does not import it.
>>
>> These warnings occur because Rust modules, like C modules, need to
>> declare their dependencies on C symbols exported to specific namespaces
>> (using `EXPORT_SYMBOL_NS` in C). This is done by embedding
>> "import_ns=<NAMESPACE>" tags into the module's `.modinfo` section, which
>> `modpost` verifies.  The C macro `MODULE_IMPORT_NS()` handles this, but
>> the Rust `module!` macro lacked equivalent functionality.
>>
>> This series introduces the necessary support:
>>
>> Patch 1 extends the core `module!` macro in `rust/macros/module.rs`
>> to parse an optional `imports_ns: [...]` field and generate the required
>> `import_ns` tags in the `.modinfo` section.
>>
>> Patch 2 adds a convenience macro `module_pwm_platform_driver!` to
>> `rust/kernel/pwm.rs`. This macro wraps the standard
>> `module_platform_driver!` and automatically adds `imports_ns: ["PWM"]`,
>> simplifying module declaration for PWM driver authors.
>>
>> Patch 3 updates the `pwm_th1520` driver to use the new helper macro,
>> fixing the build warnings.
> 
> Given that for now the pwm_th1520 driver is the only user, does it make
> sense to merge this series via my pwm tree? If it goes via a different
> tree, I'd like to have a tag to merge into my tree to hand over code
> which is free of warnings to Linus in the next merge window.

Hi,

I agree with you. Hopefully we can get an ack from the Rust maintainers
and the series can go through your tree.

> 
>> Patch 4 includes a minor clippy style fix for the `pwm_th1520` driver.
> 
> If you could mention the command that makes this warning visible, I'd be
> glad to add that to my repertoire of build checks.

I'm using the following command to compile the kernel:
$ make ARCH=riscv -j20 LLVM=1 CLIPPY=1

I guess you were missing the 'CLIPPY=1' part.

> 
> Thanks for addressing the issue
> Uwe

Best regards,
-- 
Michal Wilczynski <m.wilczynski@...sung.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ