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] [day] [month] [year] [list]
Message-ID: <CAJ-ks9k1=BLFCfjVrMqQ5u_ak6+g=HtQ6_TP4ZtazPhk0Z76YA@mail.gmail.com>
Date: Fri, 21 Nov 2025 07:16:49 -0500
From: Tamir Duberstein <tamird@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>, 
	Igor Korotin <igor.korotin.linux@...il.com>, Miguel Ojeda <ojeda@...nel.org>, 
	Greg KH <greg@...ah.com>, Danilo Krummrich <dakr@...nel.org>, 
	"Rafael J. Wysocki" <rafael@...nel.org>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, 
	Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the rust tree with the driver-core tree

On Thu, Nov 20, 2025 at 11:39 PM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> Hi all,
>
> On Thu, 20 Nov 2025 06:27:13 -0500 Tamir Duberstein <tamird@...il.com> wrote:
> >
> > On Thu, Nov 20, 2025 at 4:15 AM Miguel Ojeda <miguel.ojeda.sandonis@...il.com> wrote:
> > >
> > > On Thu, Nov 20, 2025 at 8:11 AM Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> > > >
> > > > I have applied the following (hack) merge resolution for today.
> > >
> > > Thanks a lot Stephen for taking the time to do that instead of dropping it.
> > >
> > > We should be able to do the same as Tamir did in commit 657403637f7d
> > > ("rust: acpi: use `core::ffi::CStr` method names"), i.e. move the
> > > build assert below to then be able to use `len()` instead:
> > >
> > > diff --git a/rust/kernel/i2c.rs b/rust/kernel/i2c.rs
> > > index aea1b44d189b..f67c355c988e 100644
> > > --- a/rust/kernel/i2c.rs
> > > +++ b/rust/kernel/i2c.rs
> > > @@ -43,11 +43,8 @@ impl DeviceId {
> > >      /// Create a new device id from an I2C 'id' string.
> > >      #[inline(always)]
> > >      pub const fn new(id: &'static CStr) -> Self {
> > > -        build_assert!(
> > > -            id.len_with_nul() <= Self::I2C_NAME_SIZE,
> > > -            "ID exceeds 20 bytes"
> > > -        );
> > > -        let src = id.as_bytes_with_nul();
> > > +        let src = id.to_bytes_with_nul();
> > > +        build_assert!(src.len() <= Self::I2C_NAME_SIZE, "ID exceeds 20 bytes");
> > >          let mut i2c: bindings::i2c_device_id = pin_init::zeroed();
> > >          let mut i = 0;
> > >          while i < src.len() {
> > > @@ -433,11 +430,8 @@ impl I2cBoardInfo {
> > >      /// Create a new [`I2cBoardInfo`] for a kernel driver.
> > >      #[inline(always)]
> > >      pub const fn new(type_: &'static CStr, addr: u16) -> Self {
> > > -        build_assert!(
> > > -            type_.len_with_nul() <= Self::I2C_TYPE_SIZE,
> > > -            "Type exceeds 20 bytes"
> > > -        );
> > > -        let src = type_.as_bytes_with_nul();
> > > +        let src = type_.to_bytes_with_nul();
> > > +        build_assert!(src.len() <= Self::I2C_TYPE_SIZE, "Type exceeds
> > > 20 bytes");
> > >          let mut i2c_board_info: bindings::i2c_board_info = pin_init::zeroed();
> > >          let mut i: usize = 0;
> > >          while i < src.len() {
> > >
> > > Igor/Tamir?
> >
> > Yep, looks correct to me!
>
> OK, I have used that from today.
>
> Could that fix just be applied to the driver-core tree now?  Or does it
> depend on changes in the rust tree?

I don't see why not. It does not depend on changes in the rust tree.
@Danilo Krummrich?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ