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
..
2017-09-06 17:27:24 -07:00
2017-09-06 17:27:24 -07:00
2017-09-06 17:27:24 -07:00
2017-09-06 17:27:24 -07:00
2017-02-27 18:43:46 -08:00
2017-09-06 17:27:24 -07:00
2011-07-25 14:58:15 -07:00
2017-07-06 16:24:30 -07:00
2016-01-22 18:04:28 -05:00
2017-09-06 17:27:24 -07:00
2015-12-29 17:45:49 -08:00
2017-09-06 17:27:24 -07:00
2016-12-12 18:55:06 -08:00
2017-07-06 16:24:30 -07:00
2017-09-06 17:27:24 -07:00
2017-09-06 17:27:24 -07:00
2011-03-31 11:26:23 -03:00
2017-09-06 17:27:24 -07:00
2012-05-29 23:28:40 -04:00
2017-09-06 17:27:24 -07:00
2016-05-12 15:52:50 -07:00