linux_old1/arch
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
..
alpha net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
arc The "weak" attribute is commonly used for the default version of a 2014-10-23 15:04:27 -07:00
arm separate kernel- and userland-side msghdr 2014-11-19 16:22:59 -05:00
arm64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-13 17:54:08 -08:00
avr32 net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
blackfin Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
c6x irq_work: Introduce arch_irq_work_has_interrupt() 2014-09-13 18:38:07 +02:00
cris net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
frv net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
hexagon Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-13 15:48:00 +02:00
ia64 net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
m32r net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
m68k m68k: Wire up bpf 2014-10-27 11:02:19 +01:00
metag Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
microblaze microblaze: Wire up bpf syscall 2014-10-27 09:25:34 +01:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
mn10300 net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
openrisc Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
parisc net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
powerpc PPC: bpf_jit_comp: Unify BPF_MOD | BPF_X and BPF_DIV | BPF_X 2014-11-18 13:20:09 -05:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
score score: use Kbuild logic to include <asm-generic/sections.h> 2014-10-09 22:25:46 -04:00
sh sh: fix sh770x SCIF memory regions 2014-10-29 16:33:15 -07:00
sparc net: introduce SO_INCOMING_CPU 2014-11-11 13:00:06 -05:00
tile Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
um Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
unicore32 nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
x86 Revert "fast_hash: avoid indirect function calls" 2014-11-14 16:36:25 -05:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-11-14 01:01:12 -05:00
.gitignore
Kconfig seccomp: Document two-phase seccomp and arch-provided seccomp_data 2014-09-03 14:58:17 -07:00