freebsd-nq/sys
Gleb Smirnoff 9165bf6297 In r248885 I have reduced size of fake uio resid that ng_ksocket(4) passes
to the soreceive(). This exposed a bug. When reading from a raw socket,
when our fake limit is depleted, we receive a truncated mbuf chain, with
m->m_pkthdr.len > m_length(m). The first problem is that MSG_TRUNC was not
handled. The second one is that we didn't reinit uio_resid in our endless
loop (neither flags), and if socket buffer contained several records, then
we quickly deplete our fake limit. The third bug, actually introduced in
r248885, is that MJUMPAGESIZE isn't enough to handle maximum packet that
ng_ksocket(4) can theoretically receive.

Changes:
- Reinit uio_resid and flags before every call to soreceive().
- Set maximum acceptable size of packet to IP_MAXPACKET. As for now the
  module doesn't support INET6.
- Properly handle MSG_TRUNC return from soreceive().

PR:			184601
Submitted & tested by:	Viktor Velichkin <avisom yandex.ru>
Sponsored by:		Nginx, Inc.
2013-12-21 14:41:32 +00:00
..
amd64 Re-arrange bits in the amd64/pmap 'pm_flags' field. 2013-12-20 05:50:22 +00:00
arm Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in 2013-12-20 00:56:23 +00:00
boot Bump the loader version to 3.2 after various dosfs fixes (in particular). 2013-12-19 05:28:43 +00:00
bsm Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
cam Widen lun_id_t to 64 bits. This is a follow-on to r257345 to let the kernel 2013-12-14 22:07:40 +00:00
cddl Fix a brain-o. I had misread the limit as a size, but it's a pointer. 2013-12-21 00:37:32 +00:00
compat Migrate the sendfile_sync structure into a public(ish) API in preparation 2013-12-01 03:53:21 +00:00
conf Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in 2013-12-20 00:56:23 +00:00
contrib Remove 'inline' from ar9300_init_pll(), it's too big to inline. 2013-11-08 16:28:00 +00:00
crypto fix broken style(9) in r258399 2013-11-23 00:28:18 +00:00
ddb
dev Support double-width characters in vt(9) 2013-12-21 13:58:55 +00:00
fs Do not allow O_EXEC opens for fifo, return EINVAL. 2013-12-17 17:28:02 +00:00
gdb rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST 2013-07-24 09:45:31 +00:00
geom Prevent users from deactivating the last component of a mirror. 2013-12-19 22:13:12 +00:00
gnu/fs/reiserfs
i386 Nuke symbols.raw 2013-12-17 07:47:27 +00:00
ia64 Allow pmap_remove_pages() to be called for physical maps not 2013-12-12 03:04:00 +00:00
isa
kern Extend libteken to support CJK fullwidth characters. 2013-12-20 21:31:50 +00:00
kgssapi Add support for host-based (Kerberos 5 service principal) initiator 2013-07-09 01:05:28 +00:00
libkern Fix typo 2013-11-29 20:14:26 +00:00
mips Add an FDT DTS and MDROOT kernel configuration for BERI on NetFPGA. 2013-12-12 18:08:31 +00:00
modules split netmap code according to functions: 2013-12-15 08:37:24 +00:00
net Simplify contiguous mask checking. 2013-12-17 22:16:27 +00:00
net80211 Make sure any waiters on the scan results get notified if the scan task 2013-11-29 22:24:57 +00:00
netatalk The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
netgraph In r248885 I have reduced size of fake uio resid that ng_ksocket(4) passes 2013-12-21 14:41:32 +00:00
netinet Disable the now unpredicably bogus check for whether we have 2013-12-20 07:41:03 +00:00
netinet6 Free mbuf in case of error. 2013-12-17 10:53:17 +00:00
netipsec Initialize prot variable. 2013-11-11 13:19:55 +00:00
netipx The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
netnatm Provide includes that are needed in these files, and before were read 2013-10-26 18:18:50 +00:00
netpfil Add net.inet.ip.fw.dyn_keep_states sysctl which 2013-12-18 20:17:05 +00:00
netsmb Catch up with sb_timeo type change in r255138. This fixes 2013-11-08 08:44:09 +00:00
nfs Remove several linear list traversals per request from RPC server code. 2013-12-20 17:39:07 +00:00
nfsclient For software builds, the NFS client does many small 2013-12-07 23:05:59 +00:00
nfsserver The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 2013-10-26 17:58:36 +00:00
nlm Intermittent crashes in the NLM (rpc.lockd) code during system 2013-09-06 23:14:31 +00:00
ofed Defer start/stop port to workqueues. 2013-12-15 07:07:13 +00:00
opencrypto Fix build with 'crypto' and 'zfs' in the same kernel. This was the path 2013-12-08 21:59:46 +00:00
pc98 Fix a typo. 2013-12-05 21:58:02 +00:00
pci Add preliminary support for RTL8168EP. 2013-10-29 05:37:05 +00:00
powerpc Add suspend/resume state saving for OpenPIC on PowerMac. It's likely this 2013-12-21 04:31:54 +00:00
rpc Fix build. 2013-12-20 19:44:29 +00:00
security There is no sysctl with the MIB { CTL_KERN, KERN_MAXID }. 2013-12-05 21:55:10 +00:00
sparc64 Simplify the ofw_bus_lookup_imap() API slightly: make it allocate maskbuf 2013-12-17 15:11:24 +00:00
sys Support double-width characters in vt(9) 2013-12-21 13:58:55 +00:00
teken Extend libteken to support CJK fullwidth characters. 2013-12-20 21:31:50 +00:00
tools dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINE 2013-11-26 08:46:27 +00:00
ufs We needlessly panic when trying to flush MKDIR_PARENT dependencies. 2013-12-01 07:34:21 +00:00
vm Eliminate a redundant parameter to vm_radix_replace(). 2013-12-08 20:07:02 +00:00
x86 Use fixed-width types for all fields in MP Table structures and pack 2013-12-11 21:19:04 +00:00
xdr
xen Remove redundant redeclaration of gdtset in sys/xen/xen-os.h, to silence 2013-10-18 17:06:13 +00:00
Makefile