linux-stable/drivers/isdn
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
..
capi isdn: kcapi: make capi_version const 2017-08-07 14:55:36 -07:00
divert isdn: divert: fix sprintf buffer overflow warning 2017-07-14 09:03:11 -07:00
gigaset net: introduce __skb_put_[zero, data, u8] 2017-06-20 13:30:14 -04:00
hardware treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
hisax isdn: hisax: hfc_usb: constify usb_device_id 2017-08-08 21:38:27 -07:00
hysdn hysdn: fix to a race condition in put_log_buffer 2017-08-07 11:25:14 -07:00
i4l isdn/i4l: fetch the ppp_write buffer in one shot 2017-09-20 16:01:36 -07:00
isdnloop isdn: isdnloop: fix logic error in isdnloop_sendbuf 2017-09-07 20:03:54 -07:00
mISDN mISDN: Fix null pointer dereference at mISDN_FsmNew 2017-08-11 14:56:23 -07:00
Kconfig
Makefile isdn: i4l: move active-isdn drivers to staging 2016-03-05 15:00:38 -08:00