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: <CANiq72=Hr5rg7tYta8aUoxt8hOPjR2ik5_-xMWZwacr63=-7KA@mail.gmail.com>
Date: Wed, 23 Jul 2025 02:48:20 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org, 
	x86@...nel.org, linux-riscv@...ts.infradead.org, 
	linux-arm-kernel@...ts.infradead.org, loongarch@...ts.linux.dev, 
	tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, 
	dave.hansen@...ux.intel.com, peterz@...radead.org, hpa@...or.com, 
	paul.walmsley@...ive.com, palmer@...belt.com, aou@...s.berkeley.edu, 
	catalin.marinas@....com, will@...nel.org, chenhuacai@...nel.org, 
	kernel@...0n.name, tangyouling@...ngson.cn, hejinyang@...ngson.cn, 
	yangtiezhu@...ngson.cn, ojeda@...nel.org, alex.gaynor@...il.com, 
	boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com, 
	benno.lossin@...ton.me, a.hindborg@...nel.org, aliceryhl@...gle.com, 
	tmgross@...ch.edu, dakr@...nel.org
Subject: Re: [PATCH v6 0/4] rust: Add bug/warn abstractions

On Fri, May 2, 2025 at 11:46 AM FUJITA Tomonori
<fujita.tomonori@...il.com> wrote:
>
> This patchset adds warn_on macro with the bug/warn abstraction that
> utilizes the kernel's BUG/WARN feature via assembly.

Ok, let's move forward with this.

I took a look at the first three patches and compared the expanded
output for the existing macros, to make sure we (hopefully) don't
break anything else.

It seems OK, I only noticed a removed newline. Was that intentional?
There was also a bad parameter name, but that was not hurting anything
since it was unused.

(For the x86 one could be closer removing a couple spaces, but it
should not matter and other x86 files format it that way, so I didn't
change it. I also noticed unexpected spaces used for aligning the
macro, but it turned out it was in the original already, so I left it
also unchanged.)

Then I found a few more bits on the last patch.

Tomo, could you please double-check you are OK with all the changes,
and please run the tests you did back then on `rust-next` again for
all arches, given it has been a while since you posted it (plus I did
a few changes on top, after all)? I would appreciate it, thanks in
advance!

To be clear, I didn't re-check every single thing/combination, but
hopefully what I caught helps. Since there are no users anyway (of the
last patch) right now, it should be fairly safe.

Applied to `rust-next` -- thanks everyone!

    [ Fixed typo in macro parameter name. - Miguel ]

    [ Remove ending newline in `ARCH_WARN_ASM` content to be closer to the
      original. - Miguel ]

    [ Avoid evaluating the condition twice (a good idea in general,
      but it also matches the C side). Simplify with `as_char_ptr()`
      to avoid a cast. Cast to `ffi` integer types for
      `warn_slowpath_fmt`. Avoid cast for `null()`. - Miguel ]

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ