linux/drivers/media/cec
Mauro Carvalho Chehab a3d71f256c media: cec-pin-error-inj: avoid a false-positive Spectre detection
The current logic makes Smatch to false-detect a Spectre variant 1
vulnerability. The problem is that it initializes an u32 indirectly
from user space input.

After trying to write a fixup, after a while I realized that, in
practice, this shouldn't be a problem, as an u32 is initialized
from u8, but it took some time to discover it.

So, do some code cleanup to make it clearer for both humans
and machines about the valid range for "op".

Fix this warning:
	drivers/media/cec/cec-pin-error-inj.c:170 cec_pin_error_inj_parse_line() warn: potential spectre issue 'pin->error_inj_args'

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-28 16:11:17 -04:00
..
cec-adap.c media: cec: improve CEC pin event handling 2018-03-22 08:16:52 -04:00
cec-api.c media: cec: add SPDX license info 2018-02-14 13:16:03 -05:00
cec-core.c media: rc: per-protocol repeat period and minimum keyup timer 2018-04-20 09:16:55 -04:00
cec-edid.c media: cec: add SPDX license info 2018-02-14 13:16:03 -05:00
cec-notifier.c media: cec: add SPDX license info 2018-02-14 13:16:03 -05:00
cec-pin-error-inj.c media: cec-pin-error-inj: avoid a false-positive Spectre detection 2018-05-28 16:11:17 -04:00
cec-pin-priv.h media: cec: improve CEC pin event handling 2018-03-22 08:16:52 -04:00
cec-pin.c media: cec: set ev rather than v with CEC_PIN_EVENT_FL_DROPPED bit 2018-04-20 08:37:35 -04:00
cec-priv.h media: cec: add SPDX license info 2018-02-14 13:16:03 -05:00
Kconfig media: cec-pin-error-inj: parse/show error injection 2018-03-22 08:00:59 -04:00
Makefile media: cec-pin-error-inj: parse/show error injection 2018-03-22 08:00:59 -04:00