linux-stable/net
Linus Torvalds 799c10559d De-pessimize rds_page_copy_user
Don't try to "optimize" rds_page_copy_user() by using kmap_atomic() and
the unsafe atomic user mode accessor functions.  It's actually slower
than the straightforward code on any reasonable modern CPU.

Back when the code was written (although probably not by the time it was
actually merged, though), 32-bit x86 may have been the dominant
architecture.  And there kmap_atomic() can be a lot faster than kmap()
(unless you have very good locality, in which case the virtual address
caching by kmap() can overcome all the downsides).

But these days, x86-64 may not be more populous, but it's getting there
(and if you care about performance, it's definitely already there -
you'd have upgraded your CPU's already in the last few years).  And on
x86-64, the non-kmap_atomic() version is faster, simply because the code
is simpler and doesn't have the "re-try page fault" case.

People with old hardware are not likely to care about RDS anyway, and
the optimization for the 32-bit case is simply buggy, since it doesn't
verify the user addresses properly.

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-15 11:09:28 -07:00
..
9p Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-28 12:01:26 -07:00
802
8021q vlan: dont drop packets from unknown vlans in promiscuous mode 2010-09-30 18:04:21 -07:00
appletalk
atm ATM: mpc, fix use after free 2010-10-11 11:05:42 -07:00
ax25
bluetooth Bluetooth: Disallow to change L2CAP_OPTIONS values when connected 2010-10-04 19:28:52 -03:00
bridge
caif caif: fix two caif_connect() bugs 2010-10-05 20:35:53 -07:00
can
core net: clear heap allocations for privileged ethtool actions 2010-10-11 12:23:25 -07:00
dcb
dccp
decnet
dns_resolver
dsa
econet
ethernet
ieee802154
ipv4 ipv4: correct IGMP behavior on v3 query during v2-compatibility mode 2010-10-03 21:58:47 -07:00
ipv6 net: Fix IPv6 PMTU disc. w/ asymmetric routes 2010-10-03 14:49:00 -07:00
ipx
irda
iucv
key
l2tp
lapb
llc
mac80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2010-10-08 10:36:51 -07:00
netfilter
netlabel
netlink
netrom
packet
phonet Phonet: Correct header retrieval after pskb_may_pull 2010-09-29 19:41:04 -07:00
rds De-pessimize rds_page_copy_user 2010-10-15 11:09:28 -07:00
rfkill
rose
rxrpc
sched cls_u32: signedness bug 2010-10-05 00:40:39 -07:00
sctp sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac() 2010-10-03 21:58:49 -07:00
sunrpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2010-09-28 12:01:26 -07:00
tipc
unix
wanrouter
wimax
wireless
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE