1
linux/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 ax25: missplaced sock_put(sk) 2010-08-26 15:18:27 -07:00
bluetooth Bluetooth: Disallow to change L2CAP_OPTIONS values when connected 2010-10-04 19:28:52 -03:00
bridge bridge: Clear INET control block of SKBs passed into ip_fragment(). 2010-09-01 19:17:34 -07:00
caif caif: fix two caif_connect() bugs 2010-10-05 20:35:53 -07:00
can can: add limit for nframes and clean up signed/unsigned variables 2010-08-11 16:12:35 -07:00
core net: clear heap allocations for privileged ethtool actions 2010-10-11 12:23:25 -07:00
dcb
dccp net: dccp: fix sign bug 2010-07-18 15:07:14 -07:00
decnet
dns_resolver DNS: If the DNS server returns an error, allow that to be cached [ver #2] 2010-08-11 17:11:28 +00:00
dsa phylib: available for any speed ethernet 2010-08-11 23:03:50 -07:00
econet
ethernet Net: ethernet: pe2.c: fix EXPORT_SYMBOL macro code style issue 2010-07-14 18:27:09 -07:00
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 irda: off by one 2010-09-07 13:57:22 -07:00
iucv
key
l2tp l2tp: test for ethernet header in l2tp_eth_dev_recv() 2010-08-26 13:29:38 -07:00
lapb
llc net/llc: storing negative error codes in unsigned short 2010-09-16 22:38:23 -07:00
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 netfilter: fix a race in nf_ct_ext_create() 2010-09-22 13:13:33 -07:00
netlabel
netlink netlink: Make NETLINK_USERSOCK work again. 2010-08-31 09:51:37 -07:00
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 rose: Fix signedness issues wrt. digi count. 2010-09-20 15:40:35 -07:00
rxrpc Add a dummy printk function for the maintenance of unused printks 2010-08-12 09:51:35 -07:00
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 UNIX: Do not loop forever at unix_autobind(). 2010-09-07 13:57:23 -07:00
wanrouter net: autoconvert trivial BKL users to private mutex 2010-07-12 20:21:47 -07:00
wimax
wireless wext: fix potential private ioctl memory content leak 2010-09-20 13:41:40 -04:00
x25
xfrm xfrm: Allow different selector family in temporary state 2010-09-20 11:11:38 -07:00
compat.c
Kconfig net: RPS needs to depend upon USE_GENERIC_SMP_HELPERS 2010-09-14 21:42:22 -07:00
Makefile DNS: Separate out CIFS DNS Resolver code 2010-08-05 17:17:51 +00:00
nonet.c
socket.c net: support time stamping in phy devices. 2010-07-18 19:15:26 -07:00
sysctl_net.c
TUNABLE