freebsd-dev/sys
Alan Cox 2971897d51 Correct an error of omission in the implementation of the truncation
operation on POSIX shared memory objects and tmpfs.  Previously, neither of
these modules correctly handled the case in which the new size of the object
or file was not a multiple of the page size.  Specifically, they did not
handle partial page truncation of data stored on swap.  As a result, stale
data might later be returned to an application.

Interestingly, a data inconsistency was less likely to occur under tmpfs
than POSIX shared memory objects.  The reason being that a different mistake
by the tmpfs truncation operation helped avoid a data inconsistency.  If the
data was still resident in memory in a PG_CACHED page, then the tmpfs
truncation operation would reactivate that page, zero the truncated portion,
and leave the page pinned in memory.  More precisely, the benevolent error
was that the truncation operation didn't add the reactivated page to any of
the paging queues, effectively pinning the page.  This page would remain
pinned until the file was destroyed or the page was read or written.  With
this change, the page is now added to the inactive queue.

Discussed with:	jhb
Reviewed by:	kib (an earlier version)
MFC after:	3 weeks
2012-01-08 20:09:26 +00:00
..
amd64 Default to not performing the early-boot memory tests when we detect we 2011-12-31 13:24:53 +00:00
arm Add missing options so modules build/load correctly. 2012-01-05 20:18:01 +00:00
boot Document comconsole_port and comconsole_pcidev loader variables. 2012-01-07 11:16:23 +00:00
bsm
cam Add support for CDRIOCGETBLOCKSIZE and CDRIOCSETBLOCKSIZE IOCTLs to control 2012-01-03 17:04:09 +00:00
cddl - Allow to change vfs.zfs.arc_meta_limit at runtime. 2012-01-05 22:16:41 +00:00
compat In sys/compat/linux/linux_ioctl.c, work around a warning when a pointer 2012-01-03 18:49:39 +00:00
conf Make these two files conditionally build on UFS_ACL, as it doesn't 2012-01-08 00:55:22 +00:00
contrib Merge from OpenBSD: 2012-01-07 14:39:45 +00:00
crypto Update Copyright. 2011-10-27 14:15:26 +00:00
ddb Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
dev .. the AR5416 HAL code touches the MIMO parts in HAL_CHANNEL, 2012-01-07 20:23:05 +00:00
fs Correct an error of omission in the implementation of the truncation 2012-01-08 20:09:26 +00:00
gdb kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
geom GEOM_UNCOMPRESS module, can be used with uzip images and with new ulzma images. 2012-01-04 23:39:11 +00:00
gnu Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
i386 Fix the broken module build I introduced earlier. 2012-01-07 19:38:26 +00:00
ia64 Flip on IEEE80211_SUPPORT_MESH and AH_SUPPORT_AR5416, the 2012-01-05 17:28:05 +00:00
isa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
kern Correct an error of omission in the implementation of the truncation 2012-01-08 20:09:26 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Implement extensions on top of standards instead of the other way around. 2012-01-03 07:05:30 +00:00
mips Fix relocations for MIPS64: 2012-01-08 05:44:19 +00:00
modules Re-enable this bit of logic from before, which only sets a default 2012-01-05 06:22:09 +00:00
net Copy ifa->if_data to ifam->ifam_data. This was forgotten in r228571. 2012-01-08 17:11:53 +00:00
net80211 Correct comment for the IPv6 case to say "traffic class" not "TOS" 2012-01-07 23:41:38 +00:00
netatalk Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netgraph Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
netinet Make it possible to use alternative source hardware address 2012-01-08 17:25:15 +00:00
netinet6 Add an SCTP sysctl "blackhole", similar to the one for TCP. 2012-01-08 09:56:24 +00:00
netipsec Remove unused 'plen' variable. 2011-11-26 23:57:03 +00:00
netipx Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Some cleanup of BOOTP code. Initially I wanted to just change the ifioctl() 2011-12-13 07:02:48 +00:00
nfsclient jwd@ reported a problem via email where the old NFS client would 2011-12-21 02:45:51 +00:00
nfsserver Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0, 2011-12-15 02:26:53 +00:00
nlm Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
ofed Replace __signed by signed. 2011-12-13 13:38:03 +00:00
opencrypto Add the fo_chown and fo_chmod methods to struct fileops and use them 2011-08-16 20:07:47 +00:00
pc98 Flip these options on so the modules build correctly for now. 2012-01-06 08:51:20 +00:00
pci To save more power, switch to 10/100Mbps link when controller is 2011-11-23 23:29:18 +00:00
powerpc Fix build on powerpc64 too. The same as r229640. 2012-01-05 22:06:01 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
sparc64 Add "options CAPABILITY_MODE" and "options CAPABILITIES" to GENERIC kernel 2011-12-29 22:48:36 +00:00
sys Add __generic(), to be able to use a very simple _Generic(). 2012-01-05 10:43:03 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools Restore the comment that I removed by accident. 2011-11-09 13:26:59 +00:00
ufs Migrate ufs and ext2fs from skpc() to memcchr(). 2012-01-01 20:47:33 +00:00
vm Do not restart the scan in vm_object_page_clean() on the object 2012-01-04 16:04:20 +00:00
x86 Fix a few bugs in the SRAT parsing code: 2012-01-03 20:53:58 +00:00
xdr
xen s/timout/timeout 2011-12-15 06:29:13 +00:00
Makefile Improve the cscope target's handling of MD directories. Automatically 2012-01-03 17:31:27 +00:00