linux/drivers/media/usb/uvc
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
..
Kconfig
Makefile
uvc_ctrl.c media: uvcvideo: Prevent heap overflow when accessing mapped controls 2017-08-20 08:08:34 -04:00
uvc_debugfs.c [media] uvcvideo: Change result code of debugfs_init to void 2017-01-31 10:56:48 -02:00
uvc_driver.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
uvc_entity.c media: uvcvideo: Constify video_subdev structures 2017-08-20 08:10:24 -04:00
uvc_isight.c
uvc_queue.c media: uvcvideo: Fix .queue_setup() to check the number of planes 2017-08-20 08:09:00 -04:00
uvc_status.c
uvc_v4l2.c [media] uvcvideo: freeing an error pointer 2016-11-29 12:05:00 -02:00
uvc_video.c [media] uvcvideo: annotate a switch fall through 2017-05-19 09:06:07 -03:00
uvcvideo.h media: uvcvideo: Convert from using an atomic variable to a reference count 2017-08-20 08:09:32 -04:00