Re: [PATCH v2 10/10] arm64: sysreg: Reject a bit position written with a leading zero
From: Mark Brown
Date: Fri Nov 27 2026 - 10:24:45 EST
On Fri, Nov 27, 2026 at 07:44:26AM +0000, Fuad Tabba wrote:
> parse_bitdef() reads a field's msb and lsb as decimal and checks the
> layout with them, but the generator copies the digits into GENMASK()
> unchanged, and C reads a leading zero as octal. "Field 63:010 A" is
> accepted as bits 63 to 10, with the next field starting at bit 9, while
> its mask is GENMASK(63, 010), bits 63 to 8, which overlaps that field.
>
> Require both ends of a bit range to be decimal numbers without a leading
> zero.
Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature