android_kernel_sony_sdm845/net
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
..
6lowpan
9p 9p/trans_virtio: discard zero-length reply 2018-02-22 15:43:50 +01:00
802
8021q 8021q: fix a memory leak for VLAN 0 device 2018-01-17 09:38:52 +01:00
appletalk
atm
ax25 ax25: Fix segfault after sock connection timeout 2017-02-04 09:47:09 +01:00
batman-adv batman-adv: Check for alloc errors when preparing TT local data 2016-12-02 10:46:59 +01:00
bluetooth This is the 4.9.77 stable release 2018-01-17 10:29:45 +01:00
bridge This is the 4.9.74 stable release 2018-01-02 20:45:15 +01:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:40:14 +02:00
can can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once 2018-01-31 12:55:50 +01:00
ceph libceph: don't WARN() if user tries to add invalid key 2017-11-30 08:39:03 +00:00
core This is the 4.9.84 stable release 2018-02-26 09:18:03 +01:00
dcb net: dcb: set error code on failures 2016-12-03 23:54:25 -05:00
dccp dccp: CVE-2017-8824: use-after-free in DCCP code 2018-02-17 13:21:13 +01:00
decnet dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock 2018-02-25 11:05:44 +01:00
dns_resolver This is the 4.9.59 stable release 2017-10-30 09:27:09 +01:00
dsa net: dsa: select NET_SWITCHDEV 2017-11-15 15:53:17 +01:00
ethernet net: introduce device min_header_len 2017-02-18 15:11:43 +01:00
hsr net/hsr: Remove unused but set variable 2016-10-18 10:28:18 -04:00
ieee802154 Revert "net: fix percpu memory leaks" 2017-09-20 08:19:55 +02:00
ipv4 This is the 4.9.85 stable release 2018-02-28 16:31:38 +01:00
ipv6 This is the 4.9.85 stable release 2018-02-28 16:31:38 +01:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 15:44:41 +02:00
irda irda: do not leak initialized list.dev to userspace 2017-08-30 10:21:42 +02:00
iucv net/af_iucv: don't use paged skbs for TX on HiperSockets 2017-01-19 20:18:04 +01:00
kcm kcm: Only allow TCP sockets to be attached to a KCM mux 2018-02-25 11:05:40 +01:00
key af_key: fix buffer overread in parse_exthdrs() 2018-01-23 19:57:05 +01:00
l2tp This is the 4.9.71 stable release 2017-12-20 10:51:15 +01:00
l3mdev
lapb
llc net/llc: avoid BUG_ON() in skb_orphan() 2017-02-26 11:10:50 +01:00
mac80211 cfg80211: fix cfg80211_beacon_dup 2018-02-28 10:18:30 +01:00
mac802154
mpls net: mpls: Fix nexthop alive tracking on down events 2017-12-20 10:07:25 +01:00
ncsi net/ncsi: Improve HNCDSC AEN handler 2016-10-20 11:23:08 -04:00
netfilter BACKPORT: treewide: Fix function prototypes for module_param_call() 2018-02-28 15:09:58 -08:00
netlabel
netlink netlink: Add netns check on taps 2018-01-02 20:35:10 +01:00
netrom
nfc This is the 4.9.66 stable release 2017-11-30 16:24:14 +00:00
openvswitch openvswitch: fix the incorrect flow action alloc size 2018-02-03 17:05:37 +01:00
packet net/packet: fix a race in packet_bind() and packet_notifier() 2017-12-16 16:25:45 +01:00
phonet
qrtr net: qrtr: Mark 'buf' as little endian 2017-12-09 22:01:51 +01:00
rds rds: tcp: atomically purge entries from rds_tcp_conn_list during netns delete 2018-02-25 11:05:43 +01:00
rfkill ANDROID: rfkill: fix unused function warning 2017-05-12 14:41:44 +02:00
rose
rxrpc rxrpc: Ignore BUSY packets on old calls 2017-12-20 10:07:25 +01:00
sched net_sched: red: Avoid illegal values 2018-02-25 11:05:48 +01:00
sctp sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune 2018-02-25 11:05:47 +01:00
strparser strparser: destroy workqueue on module exit 2017-03-22 12:43:33 +01:00
sunrpc BACKPORT: treewide: Fix function prototypes for module_param_call() 2018-02-28 15:09:58 -08:00
switchdev switchdev: Execute bridge ndos only for bridge ports 2016-10-19 10:58:04 -04:00
tipc tipc: fix a memory leak in tipc_nl_node_get_link() 2018-01-31 12:55:55 +01:00
unix net/unix: don't show information about sockets from other namespaces 2017-11-18 11:22:22 +01:00
vmw_vsock vsock: cancel packets when failing to connect 2017-12-25 14:23:38 +01:00
wimax
wireless This is the 4.9.84 stable release 2018-02-26 09:18:03 +01:00
x25
xfrm This is the 4.9.84 stable release 2018-02-26 09:18:03 +01:00
compat.c audit: log 32-bit socketcalls 2017-10-08 10:26:06 +02:00
Kconfig add support for clang Control Flow Integrity (CFI) 2018-02-28 15:09:58 -08:00
Makefile
socket.c This is the 4.9.79 stable release 2018-01-31 14:13:00 +01:00
sysctl_net.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2016-10-06 09:52:23 -07:00