linux-stable/drivers/isdn/mISDN
Nathan Chancellor 1696ec8654 mISDN: Update parameter type of dsp_cmx_send()
When booting a kernel with CONFIG_MISDN_DSP=y and CONFIG_CFI_CLANG=y,
there is a failure when dsp_cmx_send() is called indirectly from
call_timer_fn():

  [    0.371412] CFI failure at call_timer_fn+0x2f/0x150 (target: dsp_cmx_send+0x0/0x530; expected type: 0x92ada1e9)

The function pointer prototype that call_timer_fn() expects is

  void (*fn)(struct timer_list *)

whereas dsp_cmx_send() has a parameter type of 'void *', which causes
the control flow integrity checks to fail because the parameter types do
not match.

Change dsp_cmx_send()'s parameter type to be 'struct timer_list' to
match the expected prototype. The argument is unused anyways, so this
has no functional change, aside from avoiding the CFI failure.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202308020936.58787e6c-oliver.sang@intel.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Fixes: e313ac12eb ("mISDN: Convert timers to use timer_setup()")
Link: https://lore.kernel.org/r/20230802-fix-dsp_cmx_send-cfi-failure-v1-1-2f2e79b0178d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-03 18:08:32 -07:00
..
clock.c
core.c mISDN: remove unneeded mISDN_class_release() 2023-03-30 09:54:49 +02:00
core.h
dsp.h mISDN: Update parameter type of dsp_cmx_send() 2023-08-03 18:08:32 -07:00
dsp_audio.c
dsp_biquad.h
dsp_blowfish.c
dsp_cmx.c mISDN: Update parameter type of dsp_cmx_send() 2023-08-03 18:08:32 -07:00
dsp_core.c mISDN: Update parameter type of dsp_cmx_send() 2023-08-03 18:08:32 -07:00
dsp_dtmf.c
dsp_ecdis.h
dsp_hwec.c
dsp_hwec.h
dsp_pipeline.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dsp_tones.c
fsm.c
fsm.h
hwchannel.c
Kconfig
l1oip.h mISDN: fix use-after-free bugs in l1oip timer handlers 2022-09-30 12:32:42 +01:00
l1oip_codec.c
l1oip_core.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
layer1.c
layer1.h
layer2.c
layer2.h
Makefile
socket.c net: remove noblock parameter from skb_recv_datagram() 2022-04-06 13:45:26 +01:00
stack.c
tei.c
timerdev.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00