<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netlink, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/netlink?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/netlink?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-09-28T17:29:50Z</updated>
<entry>
<title>af_unix: dont send SCM_CREDENTIALS by default</title>
<updated>2011-09-28T17:29:50Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-09-19T05:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16e5726269611b71c930054ffe9b858c1cea88eb'/>
<id>urn:sha1:16e5726269611b71c930054ffe9b858c1cea88eb</id>
<content type='text'>
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.

This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventually from another cpu. This triggers false sharing.

# Events: 154K cycles
#
# Overhead  Command       Shared Object        Symbol
# ........  .......  ..................  .........................
#
    10.40%  hackbench  [kernel.kallsyms]   [k] put_pid
     8.60%  hackbench  [kernel.kallsyms]   [k] unix_stream_recvmsg
     7.87%  hackbench  [kernel.kallsyms]   [k] unix_stream_sendmsg
     6.11%  hackbench  [kernel.kallsyms]   [k] do_raw_spin_lock
     4.95%  hackbench  [kernel.kallsyms]   [k] unix_scm_to_skb
     4.87%  hackbench  [kernel.kallsyms]   [k] pid_nr_ns
     4.34%  hackbench  [kernel.kallsyms]   [k] cred_to_ucred
     2.39%  hackbench  [kernel.kallsyms]   [k] unix_destruct_scm
     2.24%  hackbench  [kernel.kallsyms]   [k] sub_preempt_count
     1.75%  hackbench  [kernel.kallsyms]   [k] fget_light
     1.51%  hackbench  [kernel.kallsyms]   [k]
__mutex_lock_interruptible_slowpath
     1.42%  hackbench  [kernel.kallsyms]   [k] sock_alloc_send_pskb

This patch includes SCM_CREDENTIALS information in a af_unix message/skb
only if requested by the sender, [man 7 unix for details how to include
ancillary data using sendmsg() system call]

Note: This might break buggy applications that expected SCM_CREDENTIAL
from an unaware write() system call, and receiver not using SO_PASSCRED
socket option.

If SOCK_PASSCRED is set on source or destination socket, we still
include credentials for mere write() syscalls.

Performance boost in hackbench : more than 50% gain on a 16 thread
machine (2 quad-core cpus, 2 threads per core)

hackbench 20 thread 2000

4.228 sec instead of 9.102 sec

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: cleanup some rcu_dereference_raw</title>
<updated>2011-08-12T09:55:28Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-08-11T19:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=33d480ce6d43326e2541fd79b3548858a174ec3c'/>
<id>urn:sha1:33d480ce6d43326e2541fd79b3548858a174ec3c</id>
<content type='text'>
RCU api had been completed and rcu_access_pointer() or
rcu_dereference_protected() are better than generic
rcu_dereference_raw()

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem</title>
<updated>2011-06-24T19:25:51Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2011-06-24T19:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36099365c7cc64e5184b66b6eb094950a13f540c'/>
<id>urn:sha1:36099365c7cc64e5184b66b6eb094950a13f540c</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/rtlwifi/pci.c
	include/linux/netlink.h
</content>
</entry>
<entry>
<title>netlink: advertise incomplete dumps</title>
<updated>2011-06-22T20:09:45Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2011-06-20T11:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=670dc2833d144375eac36ad74111495a825a9288'/>
<id>urn:sha1:670dc2833d144375eac36ad74111495a825a9288</id>
<content type='text'>
Consider the following situation:
 * a dump that would show 8 entries, four in the first
   round, and four in the second
 * between the first and second rounds, 6 entries are
   removed
 * now the second round will not show any entry, and
   even if there is a sequence/generation counter the
   application will not know

To solve this problem, add a new flag NLM_F_DUMP_INTR
to the netlink header that indicates the dump wasn't
consistent, this flag can also be set on the MSG_DONE
message that terminates the dump, and as such above
situation can be detected.

To achieve this, add a sequence counter to the netlink
callback struct. Of course, netlink code still needs
to use this new functionality. The correct way to do
that is to always set cb-&gt;seq when a dumpit callback
is invoked and call nl_dump_check_consistent() for
each new message. The core code will also call this
function for the final MSG_DONE message.

To make it usable with generic netlink, a new function
genlmsg_nlhdr() is needed to obtain the netlink header
from the genetlink user header.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>rtnetlink: unlock on error path in netlink_dump()</title>
<updated>2011-06-17T03:51:35Z</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-06-15T03:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c63d6ea3060d9e10773e869b1112e3a0efbcf820'/>
<id>urn:sha1:c63d6ea3060d9e10773e869b1112e3a0efbcf820</id>
<content type='text'>
In c7ac8679bec939 "rtnetlink: Compute and store minimum ifinfo dump
size", we moved the allocation under the lock so we need to unlock
on error path.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@conan.davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: Compute and store minimum ifinfo dump size</title>
<updated>2011-06-10T03:38:07Z</updated>
<author>
<name>Greg Rose</name>
<email>gregory.v.rose@intel.com</email>
</author>
<published>2011-06-10T01:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7ac8679bec9397afe8918f788cbcef88c38da54'/>
<id>urn:sha1:c7ac8679bec9397afe8918f788cbcef88c38da54</id>
<content type='text'>
The message size allocated for rtnl ifinfo dumps was limited to
a single page.  This is not enough for additional interface info
available with devices that support SR-IOV and caused a bug in
which VF info would not be displayed if more than approximately
40 VFs were created per interface.

Implement a new function pointer for the rtnl_register service that will
calculate the amount of data required for the ifinfo dump and allocate
enough data to satisfy the request.

Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
</content>
</entry>
<entry>
<title>net: convert %p usage to %pK</title>
<updated>2011-05-24T05:13:12Z</updated>
<author>
<name>Dan Rosenberg</name>
<email>drosenberg@vsecurity.com</email>
</author>
<published>2011-05-23T12:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=71338aa7d050c86d8765cd36e46be514fb0ebbce'/>
<id>urn:sha1:71338aa7d050c86d8765cd36e46be514fb0ebbce</id>
<content type='text'>
The %pK format specifier is designed to hide exposed kernel pointers,
specifically via /proc interfaces.  Exposing these pointers provides an
easy target for kernel write vulnerabilities, since they reveal the
locations of writable structures containing easily triggerable function
pointers.  The behavior of %pK depends on the kptr_restrict sysctl.

If kptr_restrict is set to 0, no deviation from the standard %p behavior
occurs.  If kptr_restrict is set to 1, the default, if the current user
(intended to be a reader via seq_printf(), etc.) does not have CAP_SYSLOG
(currently in the LSM tree), kernel pointers using %pK are printed as 0's.
 If kptr_restrict is set to 2, kernel pointers using %pK are printed as
0's regardless of privileges.  Replacing with 0's was chosen over the
default "(null)", which cannot be parsed by userland %p, which expects
"(nil)".

The supporting code for kptr_restrict and %pK are currently in the -mm
tree.  This patch converts users of %p in net/ to %pK.  Cases of printing
pointers to the syslog are not covered, since this would eliminate useful
information for postmortem debugging and the reading of the syslog is
already optionally protected by the dmesg_restrict sysctl.

Signed-off-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Thomas Graf &lt;tgraf@infradead.org&gt;
Cc: Eugene Teo &lt;eugeneteo@kernel.org&gt;
Cc: Kees Cook &lt;kees.cook@canonical.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Eric Paris &lt;eparis@parisplace.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net,rcu: convert call_rcu(listeners_free_rcu) to kfree_rcu()</title>
<updated>2011-05-08T05:50:51Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2011-03-15T10:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=37b6b935e96e837ccc60812c03e9f92e7dce2e61'/>
<id>urn:sha1:37b6b935e96e837ccc60812c03e9f92e7dce2e61</id>
<content type='text'>
The rcu callback listeners_free_rcu() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(listeners_free_rcu).

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-03-04T05:27:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-03-04T05:27:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0a0e9ae1bd788bc19adc4d4ae08c98b233697402'/>
<id>urn:sha1:0a0e9ae1bd788bc19adc4d4ae08c98b233697402</id>
<content type='text'>
Conflicts:
	drivers/net/bnx2x/bnx2x.h
</content>
</entry>
<entry>
<title>netlink: kill eff_cap from struct netlink_skb_parms</title>
<updated>2011-03-03T21:32:07Z</updated>
<author>
<name>Patrick McHardy</name>
<email>kaber@trash.net</email>
</author>
<published>2011-03-03T21:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=01a16b21d6adf992aa863186c3c4e561a57c1714'/>
<id>urn:sha1:01a16b21d6adf992aa863186c3c4e561a57c1714</id>
<content type='text'>
Netlink message processing in the kernel is synchronous these days,
capabilities can be checked directly in security_netlink_recv() from
the current process.

Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
[chrisw: update to include pohmelfs and uvesafb]
Signed-off-by: Chris Wright &lt;chrisw@sous-sol.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
