linux-stable/drivers/media
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
..
cec drivers/media/cec/cec-adap.c: fix build with gcc-4.4.4 2017-09-13 18:53:15 -07:00
common media: saa7146: constify videobuf_queue_ops structures 2017-08-26 14:29:51 -04:00
dvb-core media: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers 2017-09-05 08:25:07 -04:00
dvb-frontends media: mn88473: reset stream ID reg if no PLP given 2017-08-27 18:06:52 -04:00
firewire
i2c media: max2175: Propagate the real error on devm_clk_get() failure 2017-08-27 18:14:11 -04:00
mmc
pci treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
platform dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
radio media: radio: make video_device const 2017-08-27 08:47:20 -04:00
rc Update James Hogan's email address 2017-10-04 17:11:53 -07:00
spi
tuners media: tuners: make snd_pcm_hardware const 2017-08-20 08:05:25 -04:00
usb treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
v4l2-core media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay" 2017-09-05 07:30:34 -04:00
Kconfig media: rc-core: do not depend on MEDIA_SUPPORT 2017-08-20 09:39:36 -04:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c media: Make parameter of media_entity_remote_pad() const 2017-07-20 16:54:04 -04:00