[PATCH v2 10/10] arm64: sysreg: Reject a bit position written with a leading zero

Mark Brown broonie at kernel.org
Fri Nov 27 07:24:34 PST 2026


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 at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261127/ad0ac670/attachment-0001.sig>


More information about the linux-arm-kernel mailing list