<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/net/mpls, branch v4.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.1</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2015-06-11T23:47:16Z</updated>
<entry>
<title>mpls: handle device renames for per-device sysctls</title>
<updated>2015-06-11T23:47:16Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-06-11T18:58:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0fae3bf018d97b210051c8797a49d66d31071847'/>
<id>urn:sha1:0fae3bf018d97b210051c8797a49d66d31071847</id>
<content type='text'>
If a device is renamed and the original name is subsequently reused
for a new device, the following warning is generated:

sysctl duplicate entry: /net/mpls/conf/veth0//input
CPU: 3 PID: 1379 Comm: ip Not tainted 4.1.0-rc4+ #20
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
 0000000000000000 0000000000000000 ffffffff81566aaf 0000000000000000
 ffffffff81236279 ffff88002f7d7f00 0000000000000000 ffff88000db336d8
 ffff88000db33698 0000000000000005 ffff88002e046000 ffff8800168c9280
Call Trace:
 [&lt;ffffffff81566aaf&gt;] ? dump_stack+0x40/0x50
 [&lt;ffffffff81236279&gt;] ? __register_sysctl_table+0x289/0x5a0
 [&lt;ffffffffa051a24f&gt;] ? mpls_dev_notify+0x1ff/0x300 [mpls_router]
 [&lt;ffffffff8108db7f&gt;] ? notifier_call_chain+0x4f/0x70
 [&lt;ffffffff81470e72&gt;] ? register_netdevice+0x2b2/0x480
 [&lt;ffffffffa0524748&gt;] ? veth_newlink+0x178/0x2d3 [veth]
 [&lt;ffffffff8147f84c&gt;] ? rtnl_newlink+0x73c/0x8e0
 [&lt;ffffffff8147f27a&gt;] ? rtnl_newlink+0x16a/0x8e0
 [&lt;ffffffff81459ff2&gt;] ? __kmalloc_reserve.isra.30+0x32/0x90
 [&lt;ffffffff8147ccfd&gt;] ? rtnetlink_rcv_msg+0x8d/0x250
 [&lt;ffffffff8145b027&gt;] ? __alloc_skb+0x47/0x1f0
 [&lt;ffffffff8149badb&gt;] ? __netlink_lookup+0xab/0xe0
 [&lt;ffffffff8147cc70&gt;] ? rtnetlink_rcv+0x30/0x30
 [&lt;ffffffff8149e7a0&gt;] ? netlink_rcv_skb+0xb0/0xd0
 [&lt;ffffffff8147cc64&gt;] ? rtnetlink_rcv+0x24/0x30
 [&lt;ffffffff8149df17&gt;] ? netlink_unicast+0x107/0x1a0
 [&lt;ffffffff8149e4be&gt;] ? netlink_sendmsg+0x50e/0x630
 [&lt;ffffffff8145209c&gt;] ? sock_sendmsg+0x3c/0x50
 [&lt;ffffffff81452beb&gt;] ? ___sys_sendmsg+0x27b/0x290
 [&lt;ffffffff811bd258&gt;] ? mem_cgroup_try_charge+0x88/0x110
 [&lt;ffffffff811bd5b6&gt;] ? mem_cgroup_commit_charge+0x56/0xa0
 [&lt;ffffffff811d7700&gt;] ? do_filp_open+0x30/0xa0
 [&lt;ffffffff8145336e&gt;] ? __sys_sendmsg+0x3e/0x80
 [&lt;ffffffff8156c3f2&gt;] ? system_call_fastpath+0x16/0x75

Fix this by unregistering the previous sysctl table (registered for
the path containing the original device name) and re-registering the
table for the path containing the new device name.

Fixes: 37bde79979c3 ("mpls: Per-device enabling of packet input")
Reported-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: fix possible use after free of device</title>
<updated>2015-06-08T02:37:27Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-06-05T17:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=25cc8f0763c972911b1a65099cd10d9f8a45a7b0'/>
<id>urn:sha1:25cc8f0763c972911b1a65099cd10d9f8a45a7b0</id>
<content type='text'>
The mpls device is used in an RCU read context without a lock being
held. As the memory is freed without waiting for the RCU grace period
to elapse, the freed memory could still be in use.

Address this by using kfree_rcu to free the memory for the mpls device
after the RCU grace period has elapsed.

Fixes: 03c57747a702 ("mpls: Per-device MPLS state")
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Acked-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Change reserved label names to be consistent with netbsd</title>
<updated>2015-05-10T02:29:50Z</updated>
<author>
<name>Tom Herbert</name>
<email>tom@herbertland.com</email>
</author>
<published>2015-05-07T15:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=78f5b899195019f71f7593c604d75ca61658eae3'/>
<id>urn:sha1:78f5b899195019f71f7593c604d75ca61658eae3</id>
<content type='text'>
Since these are now visible to userspace it is nice to be consistent
with BSD (sys/netmpls/mpls.h in netBSD).

Signed-off-by: Tom Herbert &lt;tom@herbertland.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Move reserved label definitions</title>
<updated>2015-05-05T23:40:36Z</updated>
<author>
<name>Tom Herbert</name>
<email>tom@herbertland.com</email>
</author>
<published>2015-05-05T16:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c967a0873a7836c7a77bf611f1c7d3f47c554c45'/>
<id>urn:sha1:c967a0873a7836c7a77bf611f1c7d3f47c554c45</id>
<content type='text'>
Move to include/uapi/linux/mpls.h to be externally visibile.

Signed-off-by: Tom Herbert &lt;tom@herbertland.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Prevent use of implicit NULL label as outgoing label</title>
<updated>2015-04-22T18:24:54Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-04-22T10:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=5a9ab0176198d91dfc153f5e6c5fdc5afa613607'/>
<id>urn:sha1:5a9ab0176198d91dfc153f5e6c5fdc5afa613607</id>
<content type='text'>
The reserved implicit-NULL label isn't allowed to appear in the label
stack for packets, so make it an error for the control plane to
specify it as an outgoing label.

Suggested-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Per-device enabling of packet input</title>
<updated>2015-04-22T18:24:54Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-04-22T10:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=37bde79979c3862c79294c62ddcef7efc477e4bf'/>
<id>urn:sha1:37bde79979c3862c79294c62ddcef7efc477e4bf</id>
<content type='text'>
An MPLS network is a single trust domain where the edges must be in
control of what labels make their way into the core. The simplest way
of ensuring this is for the edge device to always impose the labels,
and not allow forward labeled traffic from untrusted neighbours. This
is achieved by allowing a per-device configuration of whether MPLS
traffic input from that interface should be processed or not.

To be secure by default, the default state is changed to MPLS being
disabled on all interfaces unless explicitly enabled and no global
option is provided to change the default. Whilst this differs from
other protocols (e.g. IPv6), network operators are used to explicitly
enabling MPLS forwarding on interfaces, and with the number of links
to the MPLS core typically fairly low this doesn't present too much of
a burden on operators.

Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Per-device MPLS state</title>
<updated>2015-04-22T18:24:54Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-04-22T10:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=03c57747a7020a28a200e7e920fb48ecdc9b0fb8'/>
<id>urn:sha1:03c57747a7020a28a200e7e920fb48ecdc9b0fb8</id>
<content type='text'>
Add per-device MPLS state to supported interfaces. Use the presence of
this state in mpls_route_add to determine that this is a supported
interface.

Use the presence of mpls_dev to drop packets that arrived on an
unsupported interface - previously they were allowed through.

Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: In mpls_egress verify the packet length.</title>
<updated>2015-03-13T03:05:04Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-03-12T23:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=76fecd8275be6de76513430e7526825944ab932f'/>
<id>urn:sha1:76fecd8275be6de76513430e7526825944ab932f</id>
<content type='text'>
Reobert Shearman noticed that mpls_egress is failing to verify that
the bytes to be examined are in fact present in the packet before
mpls_egress reads those bytes.

As suggested by David Miller reduce this to a single pskb_may_pull
call so that we don't do unnecessary work in the fast path.

Reported-by: Robert Shearman &lt;rshearma@brocade.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>
</entry>
<entry>
<title>mpls: Allow mpls_gso and mpls_router to be built as modules</title>
<updated>2015-03-11T20:38:54Z</updated>
<author>
<name>Robert Shearman</name>
<email>rshearma@brocade.com</email>
</author>
<published>2015-03-10T16:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8a08919f43d9955d5afc5d6b416964401e3c58d8'/>
<id>urn:sha1:8a08919f43d9955d5afc5d6b416964401e3c58d8</id>
<content type='text'>
CONFIG_MPLS=m doesn't result in a kernel module being built because it
applies to the net/mpls directory, rather than to .o files.

So revert the MPLS menuitem to being a boolean and make MPLS_GSO and
MPLS_ROUTING tristates to allow mpls_gso and mpls_router modules to be
produced as desired.

Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Robert Shearman &lt;rshearma@brocade.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mpls: Spelling: s/conceved/conceived/, s/as/a/</title>
<updated>2015-03-09T19:51:59Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2015-03-09T11:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=26c459a8072f2bb0680081205376e1371c114b12'/>
<id>urn:sha1:26c459a8072f2bb0680081205376e1371c114b12</id>
<content type='text'>
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
