freebsd-skq/sys
andre 07a8df9321 In kern_sendfile() adjust byte accounting of the file sending loop to
ignore the size of any headers that were passed with the sendfile(2)
system call.  Otherwise the file sent will be truncated by the header
size if the nbytes parameter was provided.  The bug doesn't show up
when either nbytes is zero, meaning send the whole file, or no header
iovec is provided.

Resolve a potential error aliasing of errors from the VM and sf_buf
parts and the protocol send parts where an error of the latter over-
writes one of the former.

Update comments.

The byte accounting bug wasn't seen in earlier because none of the popular
sendfile(2) consumers, Apache, lighttpd and our ftpd(8) use it in modes
that trigger it.  The varnish HTTP proxy makes full use of it and exposed
the problem.

Bug found by:	phk
Tested by:	phk
2007-05-19 20:50:59 +00:00
..
amd64 Remove extern struct pcpu __pcpu[]; from the header file and 2007-05-19 05:03:59 +00:00
arm Use __mcount() instead of _mcount() to reduce diffs with NetBSD. 2007-05-19 16:20:37 +00:00
boot Tweak inlining parameters a little. Add warning to tell us if function 2007-05-19 05:07:47 +00:00
bsm Change $P4$ ID strings to P4 ID strings so that they are not auto-expanded 2007-04-17 12:27:08 +00:00
cam Zero scsi_readcapacity allocations so we can really 2007-05-18 21:58:07 +00:00
cddl Increase debug level - this message is not that important. 2007-05-09 22:32:49 +00:00
coda Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
compat - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
conf Disable -Werror for now. 2007-05-19 04:48:08 +00:00
contrib Increase debug level - this message is not that important. 2007-05-09 22:32:49 +00:00
crypto Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
ddb Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. 2007-01-17 15:05:52 +00:00
dev Fix randomly broken playback with Fortemedia FM801 XWave PCI soundcard. 2007-05-19 13:19:32 +00:00
fs Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
gdb
geom Fix a dereference in KASSERT. 2007-05-15 23:29:57 +00:00
gnu Change #include <machine/pcpu.h> to #include <sys/pcpu.h> 2007-04-01 12:48:10 +00:00
i4b Tell the user when the setup of the interrupt handler failed and return 2007-04-01 16:52:54 +00:00
i386 Include machine/pcb.hto turn extern struct pcb stoppcbs[]; construct 2007-05-19 05:01:43 +00:00
ia64 Fix GCC warning: va = va += PAGE_SIZE contains pointless operation 2007-05-19 18:25:14 +00:00
isa When trying to allocate a PnP BIOS memory resource, the code loops trying 2007-04-17 15:14:23 +00:00
kern In kern_sendfile() adjust byte accounting of the file sending loop to 2007-05-19 20:50:59 +00:00
libkern strchr() and strrchr() are already present in the kernel, but with less 2007-04-10 21:42:12 +00:00
modules Add the 'mfip' sub-driver for gaining SCSI-passthrough access to devices 2007-05-16 17:19:47 +00:00
net Compare the partner system priority when choosing the aggregator. 2007-05-19 09:37:04 +00:00
net80211 - Nuke unnecessary header. 2007-05-05 11:07:52 +00:00
netatalk Reduce network stack oddness: implement .pru_sockaddr and .pru_peeraddr 2007-05-11 10:20:51 +00:00
netatm Fix use after free bug: use temporary variable to hold next entry in linked 2007-04-03 12:45:10 +00:00
netgraph Fix build with NETGRAPH_MPPC_COMPRESSION but without NETGRAPH_MPPC_ENCRYPTION. 2007-05-18 15:28:01 +00:00
netinet Be more restrictive with segment validity checks in syncache_expand() 2007-05-18 21:42:25 +00:00
netinet6 - Disabled responding to NI queries from a global address by default as 2007-05-17 21:20:24 +00:00
netipsec Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
netipx Use ANSI C function declarations throughout netipx. 2007-05-11 10:38:34 +00:00
netkey
netnatm s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
netncp Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
netsmb Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client Rename some functions and variables from nfs_* to nfs4_* to avoid 2007-01-25 14:33:13 +00:00
nfsclient In nfs_down(), if rep can be NULL, which we test for, then we should 2007-05-18 19:34:54 +00:00
nfsserver Remove MAC Framework access control check entry points made redundant with 2007-04-22 15:31:22 +00:00
opencrypto Integrate the Camellia Block Cipher. For more information see RFC 4132 2007-05-09 19:37:02 +00:00
pc98 - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
pccard
pci tl(4) appears to support long frames. 2007-05-09 09:02:11 +00:00
powerpc - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
rpc Move rpc/types.h under sys/, as this is used by ZFS kernel module. 2007-04-10 22:10:16 +00:00
security Don't expose #ifdef NOTYET parts to userspace via audit_ioctl.h, just 2007-04-29 16:20:32 +00:00
sparc64 Include machine/pcb.hto turn extern struct pcb stoppcbs[]; construct 2007-05-19 05:01:43 +00:00
sun4v - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
sys Expose sx_xholder() as a public macro. It returns a pointer to the thread 2007-05-19 20:18:12 +00:00
tools Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
ufs Since renaming of vop_lock to _vop_lock, pre- and post-condition 2007-05-18 13:02:13 +00:00
vm - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating 2007-05-18 07:10:50 +00:00
Makefile o Add bsm and security to a list of cscope dirs. 2007-04-14 16:29:15 +00:00