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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250723.152042.1300024463910400.fujita.tomonori@gmail.com>
Date: Wed, 23 Jul 2025 15:20:42 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: miguel.ojeda.sandonis@...il.com
Cc: fujita.tomonori@...il.com, 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 Wed, 23 Jul 2025 02:48:20 +0200
Miguel Ojeda <miguel.ojeda.sandonis@...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.

Thanks a lot!

> It seems OK, I only noticed a removed newline. Was that intentional?

The patch for arm64? I tried to minimize changes to the original code
so not 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.)

Yeah, I followed the original code style.

> 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!

I've just tested rust-next. Looks like all arches (x86, riscv, and
arm64) works as expected.

> 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 ]
> 

All the changes look good.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ