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]
Date: Thu, 20 Jun 2024 16:42:59 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...hat.com>
Cc: rafael@...nel.org, bhelgaas@...gle.com, ojeda@...nel.org,
	alex.gaynor@...il.com, wedsonaf@...il.com, boqun.feng@...il.com,
	gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
	a.hindborg@...sung.com, aliceryhl@...gle.com, airlied@...il.com,
	fujita.tomonori@...il.com, lina@...hilina.net, pstanner@...hat.com,
	ajanulgu@...hat.com, lyude@...hat.com, robh@...nel.org,
	daniel.almeida@...labora.com, rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
	Wedson Almeida Filho <wedsonaf@...gle.com>
Subject: Re: [PATCH v2 06/10] rust: add `dev_*` print macros.

On Wed, Jun 19, 2024 at 01:39:52AM +0200, Danilo Krummrich wrote:
> From: Wedson Almeida Filho <wedsonaf@...gle.com>
> 
> Implement `dev_*` print macros for `device::Device`.
> 
> They behave like the macros with the same names in C, i.e., they print
> messages to the kernel ring buffer with the given level, prefixing the
> messages with corresponding device information.

Nice, but one issue:

> +    /// Prints a debug-level message (level 7) prefixed with device information.
> +    ///
> +    /// More details are available from [`dev_dbg`].
> +    ///
> +    /// [`dev_dbg`]: crate::dev_dbg
> +    pub fn pr_dbg(&self, args: fmt::Arguments<'_>) {
> +        if cfg!(debug_assertions) {

That should not be an issue here.  debug_assertions is something
independent of dev_dbg() calls.  You made this a Rust-only thing, that
doesn't tie properly into the existing dynamic printk functionality by
having yet-another-way to turn this on/off, right?

So just remove the check please.

And if you want to send this as a single patch after fixing this, I'll
be glad to add it to the tree now, as it's "obviously" correct :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ