<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/sysctl_net.c, branch v4.4-rc6</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>net: sysctl: fix a kmemleak warning</title>
<updated>2015-10-23T13:22:08+00:00</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2015-10-23T12:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ce9d9b8e5c2b7486edf76958bcdb5e6534a915b0'/>
<id>ce9d9b8e5c2b7486edf76958bcdb5e6534a915b0</id>
<content type='text'>
the returned buffer of register_sysctl() is stored into net_header
variable, but net_header is not used after, and compiler maybe
optimise the variable out, and lead kmemleak reported the below warning

	comm "swapper/0", pid 1, jiffies 4294937448 (age 267.270s)
	hex dump (first 32 bytes):
	90 38 8b 01 c0 ff ff ff 00 00 00 00 01 00 00 00 .8..............
	01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
	backtrace:
	[&lt;ffffffc00020f134&gt;] create_object+0x10c/0x2a0
	[&lt;ffffffc00070ff44&gt;] kmemleak_alloc+0x54/0xa0
	[&lt;ffffffc0001fe378&gt;] __kmalloc+0x1f8/0x4f8
	[&lt;ffffffc00028e984&gt;] __register_sysctl_table+0x64/0x5a0
	[&lt;ffffffc00028eef0&gt;] register_sysctl+0x30/0x40
	[&lt;ffffffc00099c304&gt;] net_sysctl_init+0x20/0x58
	[&lt;ffffffc000994dd8&gt;] sock_init+0x10/0xb0
	[&lt;ffffffc0000842e0&gt;] do_one_initcall+0x90/0x1b8
	[&lt;ffffffc000966bac&gt;] kernel_init_freeable+0x218/0x2f0
	[&lt;ffffffc00070ed6c&gt;] kernel_init+0x1c/0xe8
	[&lt;ffffffc000083bfc&gt;] ret_from_fork+0xc/0x50
	[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff &lt;&lt;end check kmemleak&gt;&gt;

Before fix, the objdump result on ARM64:
0000000000000000 &lt;net_sysctl_init&gt;:
   0:   a9be7bfd        stp     x29, x30, [sp,#-32]!
   4:   90000001        adrp    x1, 0 &lt;net_sysctl_init&gt;
   8:   90000000        adrp    x0, 0 &lt;net_sysctl_init&gt;
   c:   910003fd        mov     x29, sp
  10:   91000021        add     x1, x1, #0x0
  14:   91000000        add     x0, x0, #0x0
  18:   a90153f3        stp     x19, x20, [sp,#16]
  1c:   12800174        mov     w20, #0xfffffff4                // #-12
  20:   94000000        bl      0 &lt;register_sysctl&gt;
  24:   b4000120        cbz     x0, 48 &lt;net_sysctl_init+0x48&gt;
  28:   90000013        adrp    x19, 0 &lt;net_sysctl_init&gt;
  2c:   91000273        add     x19, x19, #0x0
  30:   9101a260        add     x0, x19, #0x68
  34:   94000000        bl      0 &lt;register_pernet_subsys&gt;
  38:   2a0003f4        mov     w20, w0
  3c:   35000060        cbnz    w0, 48 &lt;net_sysctl_init+0x48&gt;
  40:   aa1303e0        mov     x0, x19
  44:   94000000        bl      0 &lt;register_sysctl_root&gt;
  48:   2a1403e0        mov     w0, w20
  4c:   a94153f3        ldp     x19, x20, [sp,#16]
  50:   a8c27bfd        ldp     x29, x30, [sp],#32
  54:   d65f03c0        ret
After:
0000000000000000 &lt;net_sysctl_init&gt;:
   0:   a9bd7bfd        stp     x29, x30, [sp,#-48]!
   4:   90000000        adrp    x0, 0 &lt;net_sysctl_init&gt;
   8:   910003fd        mov     x29, sp
   c:   a90153f3        stp     x19, x20, [sp,#16]
  10:   90000013        adrp    x19, 0 &lt;net_sysctl_init&gt;
  14:   91000000        add     x0, x0, #0x0
  18:   91000273        add     x19, x19, #0x0
  1c:   f90013f5        str     x21, [sp,#32]
  20:   aa1303e1        mov     x1, x19
  24:   12800175        mov     w21, #0xfffffff4                // #-12
  28:   94000000        bl      0 &lt;register_sysctl&gt;
  2c:   f9002260        str     x0, [x19,#64]
  30:   b40001a0        cbz     x0, 64 &lt;net_sysctl_init+0x64&gt;
  34:   90000014        adrp    x20, 0 &lt;net_sysctl_init&gt;
  38:   91000294        add     x20, x20, #0x0
  3c:   9101a280        add     x0, x20, #0x68
  40:   94000000        bl      0 &lt;register_pernet_subsys&gt;
  44:   2a0003f5        mov     w21, w0
  48:   35000080        cbnz    w0, 58 &lt;net_sysctl_init+0x58&gt;
  4c:   aa1403e0        mov     x0, x20
  50:   94000000        bl      0 &lt;register_sysctl_root&gt;
  54:   14000004        b       64 &lt;net_sysctl_init+0x64&gt;
  58:   f9402260        ldr     x0, [x19,#64]
  5c:   94000000        bl      0 &lt;unregister_sysctl_table&gt;
  60:   f900227f        str     xzr, [x19,#64]
  64:   2a1503e0        mov     w0, w21
  68:   f94013f5        ldr     x21, [sp,#32]
  6c:   a94153f3        ldp     x19, x20, [sp,#16]
  70:   a8c37bfd        ldp     x29, x30, [sp],#48
  74:   d65f03c0        ret

Add the possible error handle to free the net_header to remove the
kmemleak warning

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the returned buffer of register_sysctl() is stored into net_header
variable, but net_header is not used after, and compiler maybe
optimise the variable out, and lead kmemleak reported the below warning

	comm "swapper/0", pid 1, jiffies 4294937448 (age 267.270s)
	hex dump (first 32 bytes):
	90 38 8b 01 c0 ff ff ff 00 00 00 00 01 00 00 00 .8..............
	01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
	backtrace:
	[&lt;ffffffc00020f134&gt;] create_object+0x10c/0x2a0
	[&lt;ffffffc00070ff44&gt;] kmemleak_alloc+0x54/0xa0
	[&lt;ffffffc0001fe378&gt;] __kmalloc+0x1f8/0x4f8
	[&lt;ffffffc00028e984&gt;] __register_sysctl_table+0x64/0x5a0
	[&lt;ffffffc00028eef0&gt;] register_sysctl+0x30/0x40
	[&lt;ffffffc00099c304&gt;] net_sysctl_init+0x20/0x58
	[&lt;ffffffc000994dd8&gt;] sock_init+0x10/0xb0
	[&lt;ffffffc0000842e0&gt;] do_one_initcall+0x90/0x1b8
	[&lt;ffffffc000966bac&gt;] kernel_init_freeable+0x218/0x2f0
	[&lt;ffffffc00070ed6c&gt;] kernel_init+0x1c/0xe8
	[&lt;ffffffc000083bfc&gt;] ret_from_fork+0xc/0x50
	[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff &lt;&lt;end check kmemleak&gt;&gt;

Before fix, the objdump result on ARM64:
0000000000000000 &lt;net_sysctl_init&gt;:
   0:   a9be7bfd        stp     x29, x30, [sp,#-32]!
   4:   90000001        adrp    x1, 0 &lt;net_sysctl_init&gt;
   8:   90000000        adrp    x0, 0 &lt;net_sysctl_init&gt;
   c:   910003fd        mov     x29, sp
  10:   91000021        add     x1, x1, #0x0
  14:   91000000        add     x0, x0, #0x0
  18:   a90153f3        stp     x19, x20, [sp,#16]
  1c:   12800174        mov     w20, #0xfffffff4                // #-12
  20:   94000000        bl      0 &lt;register_sysctl&gt;
  24:   b4000120        cbz     x0, 48 &lt;net_sysctl_init+0x48&gt;
  28:   90000013        adrp    x19, 0 &lt;net_sysctl_init&gt;
  2c:   91000273        add     x19, x19, #0x0
  30:   9101a260        add     x0, x19, #0x68
  34:   94000000        bl      0 &lt;register_pernet_subsys&gt;
  38:   2a0003f4        mov     w20, w0
  3c:   35000060        cbnz    w0, 48 &lt;net_sysctl_init+0x48&gt;
  40:   aa1303e0        mov     x0, x19
  44:   94000000        bl      0 &lt;register_sysctl_root&gt;
  48:   2a1403e0        mov     w0, w20
  4c:   a94153f3        ldp     x19, x20, [sp,#16]
  50:   a8c27bfd        ldp     x29, x30, [sp],#32
  54:   d65f03c0        ret
After:
0000000000000000 &lt;net_sysctl_init&gt;:
   0:   a9bd7bfd        stp     x29, x30, [sp,#-48]!
   4:   90000000        adrp    x0, 0 &lt;net_sysctl_init&gt;
   8:   910003fd        mov     x29, sp
   c:   a90153f3        stp     x19, x20, [sp,#16]
  10:   90000013        adrp    x19, 0 &lt;net_sysctl_init&gt;
  14:   91000000        add     x0, x0, #0x0
  18:   91000273        add     x19, x19, #0x0
  1c:   f90013f5        str     x21, [sp,#32]
  20:   aa1303e1        mov     x1, x19
  24:   12800175        mov     w21, #0xfffffff4                // #-12
  28:   94000000        bl      0 &lt;register_sysctl&gt;
  2c:   f9002260        str     x0, [x19,#64]
  30:   b40001a0        cbz     x0, 64 &lt;net_sysctl_init+0x64&gt;
  34:   90000014        adrp    x20, 0 &lt;net_sysctl_init&gt;
  38:   91000294        add     x20, x20, #0x0
  3c:   9101a280        add     x0, x20, #0x68
  40:   94000000        bl      0 &lt;register_pernet_subsys&gt;
  44:   2a0003f5        mov     w21, w0
  48:   35000080        cbnz    w0, 58 &lt;net_sysctl_init+0x58&gt;
  4c:   aa1403e0        mov     x0, x20
  50:   94000000        bl      0 &lt;register_sysctl_root&gt;
  54:   14000004        b       64 &lt;net_sysctl_init+0x64&gt;
  58:   f9402260        ldr     x0, [x19,#64]
  5c:   94000000        bl      0 &lt;unregister_sysctl_table&gt;
  60:   f900227f        str     xzr, [x19,#64]
  64:   2a1503e0        mov     w0, w21
  68:   f94013f5        ldr     x21, [sp,#32]
  6c:   a94153f3        ldp     x19, x20, [sp,#16]
  70:   a8c37bfd        ldp     x29, x30, [sp],#48
  74:   d65f03c0        ret

Add the possible error handle to free the net_header to remove the
kmemleak warning

Signed-off-by: Li RongQing &lt;roy.qing.li@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Update the sysctl permissions handler to test effective uid/gid</title>
<updated>2013-10-06T20:50:14+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2013-10-05T20:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2433c8f094a008895e66f25bd1773cdb01c91d01'/>
<id>2433c8f094a008895e66f25bd1773cdb01c91d01</id>
<content type='text'>
Modify the code to use current_euid(), and in_egroup_p, as in done
in fs/proc/proc_sysctl.c:test_perm()

Cc: stable@vger.kernel.org
Reviewed-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Reported-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modify the code to use current_euid(), and in_egroup_p, as in done
in fs/proc/proc_sysctl.c:test_perm()

Cc: stable@vger.kernel.org
Reviewed-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Reported-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>user_ns: get rid of duplicate code in net_ctl_permissions</title>
<updated>2012-11-19T01:32:45+00:00</updated>
<author>
<name>Zhao Hongjiang</name>
<email>zhaohongjiang@huawei.com</email>
</author>
<published>2012-11-16T03:03:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86937c05cb44654649a089744cd49ab0dc6873a8'/>
<id>86937c05cb44654649a089744cd49ab0dc6873a8</id>
<content type='text'>
Get rid of duplicate code in net_ctl_permissions and fix the comment.

Signed-off-by: Zhao Hongjiang &lt;zhaohongjiang@huawei.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Get rid of duplicate code in net_ctl_permissions and fix the comment.

Signed-off-by: Zhao Hongjiang &lt;zhaohongjiang@huawei.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Update the per network namespace sysctls to be available to the network namespace owner</title>
<updated>2012-11-19T01:32:45+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:03:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cff109768b2d9c03095848f4cd4b0754117262aa'/>
<id>cff109768b2d9c03095848f4cd4b0754117262aa</id>
<content type='text'>
- Allow anyone with CAP_NET_ADMIN rights in the user namespace of the
  the netowrk namespace to change sysctls.
- Allow anyone the uid of the user namespace root the same
  permissions over the network namespace sysctls as the global root.
- Allow anyone with gid of the user namespace root group the same
  permissions over the network namespace sysctl as the global root group.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Allow anyone with CAP_NET_ADMIN rights in the user namespace of the
  the netowrk namespace to change sysctls.
- Allow anyone the uid of the user namespace root the same
  permissions over the network namespace sysctls as the global root.
- Allow anyone with gid of the user namespace root group the same
  permissions over the network namespace sysctl as the global root group.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysctl: Pass useful parameters to sysctl permissions</title>
<updated>2012-11-19T01:30:55+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=73f7ef435934e952c1d70d83d69921ea5d1f6bd4'/>
<id>73f7ef435934e952c1d70d83d69921ea5d1f6bd4</id>
<content type='text'>
- Current is implicitly avaiable so passing current-&gt;nsproxy isn't useful.
- The ctl_table_header is needed to find how the sysctl table is connected
  to the rest of sysctl.
- ctl_table_root is avaiable in the ctl_table_header so no need to it.

With these changes it becomes possible to write a version of
net_sysctl_permission that takes into account the network namespace of
the sysctl table, an important feature in extending the user namespace.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Current is implicitly avaiable so passing current-&gt;nsproxy isn't useful.
- The ctl_table_header is needed to find how the sysctl table is connected
  to the rest of sysctl.
- ctl_table_root is avaiable in the ctl_table_header so no need to it.

With these changes it becomes possible to write a version of
net_sysctl_permission that takes into account the network namespace of
the sysctl table, an important feature in extending the user namespace.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: delete all instances of special processing for token ring</title>
<updated>2012-05-16T00:14:35+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2012-05-10T21:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=211ed865108e24697b44bee5daac502ee6bdd4a4'/>
<id>211ed865108e24697b44bee5daac502ee6bdd4a4</id>
<content type='text'>
We are going to delete the Token ring support.  This removes any
special processing in the core networking for token ring, (aside
from net/tr.c itself), leaving the drivers and remaining tokenring
support present but inert.

The mass removal of the drivers and net/tr.c will be in a separate
commit, so that the history of these files that we still care
about won't have the giant deletion tied into their history.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are going to delete the Token ring support.  This removes any
special processing in the core networking for token ring, (aside
from net/tr.c itself), leaving the drivers and remaining tokenring
support present but inert.

The mass removal of the drivers and net/tr.c will be in a separate
commit, so that the history of these files that we still care
about won't have the giant deletion tied into their history.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove register_net_sysctl_table</title>
<updated>2012-04-21T01:22:30+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-19T13:46:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5f568e5afe35721f2f692bccab243ba87cd8f87a'/>
<id>5f568e5afe35721f2f692bccab243ba87cd8f87a</id>
<content type='text'>
All of the users have been converted to use registera_net_sysctl so we
no longer need register_net_sysctl.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All of the users have been converted to use registera_net_sysctl so we
no longer need register_net_sysctl.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Kill register_sysctl_rotable</title>
<updated>2012-04-21T01:21:17+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-19T13:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4344475797a16ef948385780943f7a5cf09f0675'/>
<id>4344475797a16ef948385780943f7a5cf09f0675</id>
<content type='text'>
register_sysctl_rotable never caught on as an interesting way to
register sysctls.  My take on the situation is that what we want are
sysctls that we can only see in the initial network namespace.  What we
have implemented with register_sysctl_rotable are sysctls that we can
see in all of the network namespaces and can only change in the initial
network namespace.

That is a very silly way to go.  Just register the network sysctls
in the initial network namespace and we don't have any weird special
cases to deal with.

The sysctls affected are:
/proc/sys/net/ipv4/ipfrag_secret_interval
/proc/sys/net/ipv4/ipfrag_max_dist
/proc/sys/net/ipv6/ip6frag_secret_interval
/proc/sys/net/ipv6/mld_max_msf

I really don't expect anyone will miss them if they can't read them in a
child user namespace.

CC: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
register_sysctl_rotable never caught on as an interesting way to
register sysctls.  My take on the situation is that what we want are
sysctls that we can only see in the initial network namespace.  What we
have implemented with register_sysctl_rotable are sysctls that we can
see in all of the network namespaces and can only change in the initial
network namespace.

That is a very silly way to go.  Just register the network sysctls
in the initial network namespace and we don't have any weird special
cases to deal with.

The sysctls affected are:
/proc/sys/net/ipv4/ipfrag_secret_interval
/proc/sys/net/ipv4/ipfrag_max_dist
/proc/sys/net/ipv6/ip6frag_secret_interval
/proc/sys/net/ipv6/mld_max_msf

I really don't expect anyone will miss them if they can't read them in a
child user namespace.

CC: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net sysctl: Initialize the network sysctls sooner to avoid problems.</title>
<updated>2012-04-21T01:21:16+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-19T13:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2ca794e5e86c800d7f98c4ebb8bd325099c0afe8'/>
<id>2ca794e5e86c800d7f98c4ebb8bd325099c0afe8</id>
<content type='text'>
If the netfilter code is modified to use register_net_sysctl_table the
kernel fails to boot because the per net sysctl infrasturce is not setup
soon enough.  So to avoid races call net_sysctl_init from sock_init().

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the netfilter code is modified to use register_net_sysctl_table the
kernel fails to boot because the per net sysctl infrasturce is not setup
soon enough.  So to avoid races call net_sysctl_init from sock_init().

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net sysctl: Register an empty /proc/sys/net</title>
<updated>2012-04-21T01:21:16+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-19T13:19:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc8a36942a5c05896d373a8e98d5e6b14514b4bc'/>
<id>bc8a36942a5c05896d373a8e98d5e6b14514b4bc</id>
<content type='text'>
Implementation limitations of the sysctl core won't let /proc/sys/net
reside in a network namespace.  /proc/sys/net at least must be registered
as a normal sysctl.  So register /proc/sys/net early as an empty directory
to guarantee we don't violate this constraint and hit bugs in the sysctl
implementation.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implementation limitations of the sysctl core won't let /proc/sys/net
reside in a network namespace.  /proc/sys/net at least must be registered
as a normal sysctl.  So register /proc/sys/net early as an empty directory
to guarantee we don't violate this constraint and hit bugs in the sysctl
implementation.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
