linux_dsm_epyc7002/net
Al Viro 666547ff59 separate kernel- and userland-side msghdr
Kernel-side struct msghdr is (currently) using the same layout as
userland one, but it's not a one-to-one copy - even without considering
32bit compat issues, we have msg_iov, msg_name and msg_control copied
to kernel[1].  It's fairly localized, so we get away with a few functions
where that knowledge is needed (and we could shrink that set even
more).  Pretty much everything deals with the kernel-side variant and
the few places that want userland one just use a bunch of force-casts
to paper over the differences.

The thing is, kernel-side definition of struct msghdr is *not* exposed
in include/uapi - libc doesn't see it, etc.  So we can add struct user_msghdr,
with proper annotations and let the few places that ever deal with those
beasts use it for userland pointers.  Saner typechecking aside, that will
allow to change the layout of kernel-side msghdr - e.g. replace
msg_iov/msg_iovlen there with struct iov_iter, getting rid of the need
to modify the iovec as we copy data to/from it, etc.

We could introduce kernel_msghdr instead, but that would create much more
noise - the absolute majority of the instances would need to have the
type switched to kernel_msghdr and definition of struct msghdr in
include/linux/socket.h is not going to be seen by userland anyway.

This commit just introduces user_msghdr and switches the few places that
are dealing with userland-side msghdr to it.

[1] actually, it's even trickier than that - we copy msg_control for
sendmsg, but keep the userland address on recvmsg.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19 16:22:59 -05:00
..
6lowpan ieee802154: 6lowpan: rename process_data and lowpan_process_data 2014-10-27 15:51:16 +01:00
9p 9p/trans_virtio: enable VQs early 2014-10-15 10:25:04 +10:30
802 net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
8021q net: better IFF_XMIT_DST_RELEASE support 2014-10-07 13:22:11 -04:00
appletalk net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
atm net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
ax25 net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
batman-adv batman-adv: replace strnicmp with strncasecmp 2014-10-14 02:18:24 +02:00
bluetooth Merge tag 'master-2014-11-04' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2014-11-10 14:34:59 -05:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-06 22:01:18 -05:00
caif net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
can can: add hash based access to single EFF frame filters 2014-05-19 09:38:24 +02:00
ceph libceph: change from BUG to WARN for __remove_osd() asserts 2014-11-13 22:26:34 +03:00
core net: pktgen: Deletion of an unnecessary check before the function call "proc_remove" 2014-11-19 15:20:15 -05:00
dcb dcbnl : Fix misleading dcb_app->priority explanation 2014-07-30 17:21:05 -07:00
dccp dccp: spelling s/reseting/resetting 2014-11-18 15:26:32 -05:00
decnet neigh: remove dynamic neigh table registration support 2014-11-11 15:23:54 -05:00
dns_resolver Merge commit 'v3.16' into next 2014-10-01 00:44:04 +10:00
dsa net: dsa: replace count*size kzalloc by kcalloc 2014-11-16 14:41:39 -05:00
ethernet net: Add function for parsing the header length out of linear ethernet frames 2014-09-05 17:47:02 -07:00
hsr net/hsr: Remove left-over never-true conditional code. 2014-07-11 15:04:40 -07:00
ieee802154 Merge tag 'master-2014-11-04' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2014-11-10 14:34:59 -05:00
ipv4 tcp: make connect() mem charging friendly 2014-11-19 14:57:01 -05:00
ipv6 icmp: Remove some spurious dropped packet profile hits from the ICMP path 2014-11-18 15:28:28 -05:00
ipx net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
irda Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
iucv net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
key net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
l2tp net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
lapb lapb: move EXPORT_SYMBOL after functions. 2014-10-24 15:51:42 -04:00
llc net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
mac802154 mac802154: add basic support for monitor 2014-10-29 23:07:46 +01:00
mpls net: Remove MPLS GSO feature. 2014-11-05 23:52:33 -08:00
netfilter rhashtable: Drop gfp_flags arg in insert/remove functions 2014-11-13 15:18:40 -05:00
netlabel netlabel: kernel-doc warning fix 2014-10-09 01:40:05 -04:00
netlink netlink: Deletion of an unnecessary check before the function call "__module_get" 2014-11-19 15:27:40 -05:00
netrom net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
nfc net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
openvswitch openvswitch: use PTR_ERR_OR_ZERO 2014-11-16 14:41:39 -05:00
packet net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
phonet net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited 2014-11-11 14:10:31 -05:00
rds Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-10-18 09:31:37 -07:00
rfkill net: rfkill: kernel-doc warning fixes 2014-10-09 11:16:15 +02:00
rose net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
rxrpc net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
sched sched: fix act file names in header comment 2014-11-06 15:04:41 -05:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
sunrpc Merge branch 'for-3.18' of git://linux-nfs.org/~bfields/linux 2014-10-08 12:51:44 -04:00
tipc tipc: allow one link per bearer to neighboring nodes 2014-11-16 14:27:17 -05:00
unix net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
vmw_vsock net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
wimax wimax: convert printk to pr_foo() 2014-10-07 20:28:44 -04:00
wireless This relatively large batch of changes is comprised of the 2014-11-04 16:18:12 -05:00
x25 net: Add and use skb_copy_datagram_msg() helper. 2014-11-05 16:46:40 -05:00
xfrm net: skb_fclone_busy() needs to detect orphaned skb 2014-10-30 19:58:30 -04:00
compat.c separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
Kconfig bpf: split eBPF out of NET 2014-10-27 19:09:59 -04:00
Makefile 6lowpan: introduce new net/6lowpan directory 2014-07-12 01:53:30 +02:00
nonet.c
socket.c separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
sysctl_net.c