linux-stable/drivers/pinctrl/renesas
Geert Uytterhoeven 5238e1c2bd pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs
[ Upstream commit 3803584a4e ]

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:05:05 +02:00
..
Kconfig pinctrl: renesas: rzn1: Enable missing PINMUX 2023-10-19 23:08:54 +02:00
Makefile
core.c pinctrl: renesas: checker: Limit cfg reg enum checks to provided IDs 2024-04-13 13:05:05 +02:00
core.h
gpio.c
pfc-emev2.c
pfc-r8a73a4.c
pfc-r8a779a0.c
pfc-r8a779f0.c
pfc-r8a779g0.c pinctrl: renesas: r8a779g0: Add missing SCIF_CLK2 pin group/function 2024-03-26 18:20:45 -04:00
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: renesas: rza2: Add lock around pinctrl_generic{{add,remove}_group,{add,remove}_function} 2023-08-30 16:11:12 +02:00
pinctrl-rzg2l.c pinctrl: renesas: rzg2l: Make reverse order of enable() for disable() 2023-11-20 11:52:10 +01:00
pinctrl-rzn1.c
pinctrl-rzv2m.c pinctrl: renesas: rzv2m: Fix NULL pointer dereference in rzv2m_dt_subnode_to_map() 2023-08-30 16:11:12 +02:00
pinctrl.c
sh_pfc.h