2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 07:34:06 +08:00
linux-next/drivers/media/usb
Kees Cook e4dca7b7aa treewide: Fix function prototypes for module_param_call()
Several function prototypes for the set/get functions defined by
module_param_call() have a slightly wrong argument types. This fixes
those in an effort to clean up the calls when running under type-enforced
compiler instrumentation for CFI. This is the result of running the
following semantic patch:

@match_module_param_call_function@
declarer name module_param_call;
identifier _name, _set_func, _get_func;
expression _arg, _mode;
@@

 module_param_call(_name, _set_func, _get_func, _arg, _mode);

@fix_set_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._set_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _set_func(
-_val_type _val
+const char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

@fix_get_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._get_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _get_func(
-_val_type _val
+char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

Two additional by-hand changes are included for places where the above
Coccinelle script didn't notice them:

	drivers/platform/x86/thinkpad_acpi.c
	fs/lockd/svc.c

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
2017-10-31 15:30:37 +01:00
..
airspy media: usb: make video_device const 2017-08-27 08:45:32 -04:00
as102 media: usb: constify usb_device_id 2017-08-20 08:04:51 -04:00
au0828 media: au0828: fix RC_CORE dependency 2017-08-27 08:35:35 -04:00
b2c2 media: usb: constify usb_device_id 2017-08-20 08:04:51 -04:00
cpia2 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
cx231xx media: cx231xx: fix use-after-free when unregistering the i2c_client for the dvb demod 2017-08-27 06:33:47 -04:00
dvb-usb media: dw2102: make dvb_usb_device_description structures const 2017-08-27 18:08:55 -04:00
dvb-usb-v2 media: mxl111sf: Fix potential null pointer dereference 2017-08-27 06:58:19 -04:00
em28xx media: em28xx: calculate left volume level correctly 2017-08-26 14:31:49 -04:00
go7007 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
gspca media: : usb: add const to v4l2_file_operations structures 2017-07-20 16:45:25 -04:00
hackrf media: usb: make video_device const 2017-08-27 08:45:32 -04:00
hdpvr media: usb: make i2c_adapter const 2017-08-26 08:41:58 -04:00
msi2500 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
pulse8-cec media: usb: pulse8-cec: constify serio_device_id 2017-08-20 08:27:13 -04:00
pvrusb2 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
pwc media: usb: make video_device const 2017-08-27 08:45:32 -04:00
rainshadow-cec media: usb: rainshadow-cec: constify serio_device_id 2017-08-20 08:27:29 -04:00
s2255 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
siano [media] siano: make it work again with CONFIG_VMAP_STACK 2017-02-14 18:13:49 -02:00
stk1160 media: usb: make video_device const 2017-08-27 08:45:32 -04:00
stkwebcam media: usb: make video_device const 2017-08-27 08:45:32 -04:00
tm6000 media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
ttusb-budget media: usb: constify usb_device_id 2017-08-20 08:04:51 -04:00
ttusb-dec media: usb: constify usb_device_id 2017-08-20 08:04:51 -04:00
usbtv media: usbtv: make v4l2_file_operations const 2017-08-27 08:46:05 -04:00
usbvision media: usbvision: Improve a size determination in usbvision_alloc() 2017-08-27 08:48:47 -04:00
uvc treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
zr364xx media: usb: make video_device const 2017-08-27 08:45:32 -04:00
Kconfig [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00
Makefile [media] rainshadow-cec: new RainShadow Tech HDMI CEC driver 2017-04-10 12:42:10 -03:00