android_kernel_sony_sdm845/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kees Cook 24da2c84bd BACKPORT: 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>

Bug: 67506682
Change-Id: I2c9c0ee8ed28065e63270a52c155e5e7d2791295
(cherry picked from commit e4dca7b7aa08b22893c45485d222b5807c1375ae)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2018-02-28 15:09:58 -08:00
..
acpi ACPICA: Linuxize: Restore and fix Intel compiler build 2017-02-26 11:10:52 +01:00
asm-generic add support for clang Control Flow Integrity (CFI) 2018-02-28 15:09:58 -08:00
clocksource
crypto This is the 4.9.84 stable release 2018-02-26 09:18:03 +01:00
drm This is the 4.9.33 stable release 2017-06-27 10:43:04 +02:00
dt-bindings ARM: dts: Fix omap3 off mode pull defines 2017-11-21 09:23:22 +01:00
keys f2fs: catch up to v4.14-rc1 2017-10-13 11:27:08 +00:00
kvm
linux UPSTREAM: module: Prepare to convert all module_param_call() prototypes 2018-02-28 15:09:58 -08:00
math-emu
media
memory
misc
net BACKPORT: treewide: Fix function prototypes for module_param_call() 2018-02-28 15:09:58 -08:00
pcmcia
ras
rdma IB/core: Fix calculation of maximum RoCE MTU 2017-12-20 10:07:32 +01:00
rxrpc
scsi scsi: sg: disable SET_FORCE_LOW_DMA 2018-01-23 19:57:04 +01:00
soc ARM: at91: define LPDDR types 2017-03-12 06:41:41 +01:00
sound ALSA: seq: Avoid invalid lockdep class warning 2017-11-15 15:53:18 +01:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:38:54 +01:00
trace This is the 4.9.84 stable release 2018-02-26 09:18:03 +01:00
uapi BACKPORT: tee: add register user memory 2018-02-21 15:40:42 +00:00
video fbdev changes for 4.9 2016-10-12 11:01:37 -07:00
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:44:05 +02:00
Kbuild