WSL2-Linux-Kernel/drivers/pinctrl/renesas
Geert Uytterhoeven 0b75d679e8 pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs
[ Upstream commit 3803584a4e9b65bb5b013f862f55c5055aa86c25 ]

If the number of provided enum IDs in a variable width config register
description does not match the expected number, the checker uses the
expected number for validating the individual enum IDs.

However, this may cause out-of-bounds accesses on the array holding the
enum IDs, leading to bogus enum_id conflict warnings.  Worse, if the bug
is an incorrect bit field description (e.g. accidentally using "12"
instead of "-12" for a reserved field), thousands of warnings may be
printed, overflowing the kernel log buffer.

Fix this by limiting the enum ID check to the number of provided enum
IDs.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/c7385f44f2faebb8856bcbb4e908d846fc1531fb.1705930809.git.geert+renesas@glider.be
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:01:44 +02:00
..
Kconfig
Makefile
core.c pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs 2024-04-13 13:01:44 +02:00
core.h
gpio.c
pfc-emev2.c
pfc-r8a73a4.c
pfc-r8a779a0.c
pfc-r8a7740.c
pfc-r8a7778.c
pfc-r8a7779.c
pfc-r8a7790.c
pfc-r8a7791.c
pfc-r8a7792.c
pfc-r8a7794.c
pfc-r8a7796.c
pfc-r8a77470.c
pfc-r8a77950.c
pfc-r8a77951.c
pfc-r8a77965.c
pfc-r8a77970.c
pfc-r8a77980.c
pfc-r8a77990.c
pfc-r8a77995.c
pfc-sh73a0.c
pfc-sh7203.c
pfc-sh7264.c
pfc-sh7269.c
pfc-sh7720.c
pfc-sh7722.c
pfc-sh7723.c
pfc-sh7724.c
pfc-sh7734.c
pfc-sh7757.c
pfc-sh7785.c
pfc-sh7786.c
pfc-shx3.c
pinctrl-rza1.c
pinctrl-rza2.c
pinctrl-rzg2l.c
pinctrl-rzn1.c
pinctrl.c
sh_pfc.h