strobe-rs icon indicating copy to clipboard operation
strobe-rs copied to clipboard

Update to bitflags v2, bump to 0.10.1

Open DJAndries opened this issue 9 months ago • 3 comments

DJAndries avatar Mar 11 '25 04:03 DJAndries

Thank you for the PR! Some points:

  1. Since this is a security-sensitive crate, I try not to do dep updates unless they come with a security fix or performance benefit. Do you know if either is the case for bitflags?
  2. This is a breaking change, since they changed their serialization format in 2.0. A change here would also have to pull in the linked legacy serialization crate.
  3. Nit: calling clear() is not the same thing as calling bits.zeroize(), since the latter does a volitile write. Basically attempts to make sure that the instruction is not ignored by an optimizing compiler/CPU.

rozbb avatar Mar 14 '25 19:03 rozbb

Thank you for the PR! Some points:

Thank you kindly for taking a look.

  1. Since this is a security-sensitive crate, I try not to do dep updates unless they come with a security fix or performance benefit. Do you know if either is the case for bitflags?

In our project, we're in the process of consolidating some of our dependencies and removing duplicate crate versions wherever possible. We're focusing on removing bitflags v1.

  1. This is a breaking change, since they changed their serialization format in 2.0. A change here would also have to pull in the linked legacy serialization crate.

Good point, I didn't consider that. Amended to include legacy serialization.

  1. Nit: calling clear() is not the same thing as calling bits.zeroize(), since the latter does a volitile write. Basically attempts to make sure that the instruction is not ignored by an optimizing compiler/CPU.

Right. Replaced with a volatile write, thanks.

DJAndries avatar Mar 14 '25 21:03 DJAndries

Will merge. Currently trying to fix the MSRV testing stuff here

rozbb avatar Mar 17 '25 18:03 rozbb

Superceded by #14 . Thank you!!

rozbb avatar Nov 20 '25 21:11 rozbb