<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/net/bridge/br_sysfs_br.c, branch dev-4.4</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.4</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.4'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-10-13T11:50:17+00:00</updated>
<entry>
<title>bridge: fix gc_timer mod/del race condition</title>
<updated>2015-10-13T11:50:17+00:00</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2015-10-12T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=af3793921d49a772ec1079449219bad4baa0bc96'/>
<id>urn:sha1:af3793921d49a772ec1079449219bad4baa0bc96</id>
<content type='text'>
commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to
switchdev") introduced a timer race condition because the gc_timer can
get rearmed after it's supposedly stopped and flushed in br_dev_delete()
leading to a use of freed memory. So take rtnl to sync with bridge
destruction when setting ageing_timer.
Here's the trace reproduced with these two commands running in parallel:
while :; do echo 10000 &gt; /sys/class/net/br0/bridge/ageing_timer; done;
while :; do brctl addbr br0; ip l set br0 up; ip l set br0 down;
brctl delbr br0; done;

[  300.000029] BUG: unable to handle kernel paging request at
ffffffff811c59d3
[  300.000263] IP: [&lt;ffffffff810f168e&gt;] __internal_add_timer+0x2e/0xd0
[  300.000422] PGD 1a0f067 PUD 1a10063 PMD 10001e1
[  300.000639] Oops: 0003 [#1] SMP
[  300.000793] Modules linked in: bridge stp llc nfsd auth_rpcgss
oid_registry nfs_acl nfs lockd grace fscache sunrpc crct10dif_pclmul
crc32_pclmul crc32c_intel ghash_clmulni_intel ppdev aesni_intel
aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd
snd_hda_codec_generic qxl drm_kms_helper psmouse pcspkr ttm
snd_hda_intel 9pnet_virtio evdev serio_raw joydev snd_hda_codec 9pnet
virtio_balloon drm snd_hwdep virtio_console snd_hda_core pvpanic snd_pcm
i2c_piix4 snd_timer acpi_cpufreq parport_pc snd parport soundcore button
processor i2c_core ipv6 autofs4 hid_generic usbhid hid ext4 crc16
mbcache jbd2 sg sr_mod cdrom ata_generic virtio_blk virtio_net e1000
ehci_pci uhci_hcd ehci_hcd usbcore usb_common floppy ata_piix libata
virtio_pci virtio_ring virtio scsi_mod
[  300.004008] CPU: 1 PID: 1169 Comm: bash Not tainted 4.3.0-rc3+ #46
[  300.004008] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  300.004008] task: ffff880035be2200 ti: ffff88003795c000 task.ti:
ffff88003795c000
[  300.004008] RIP: 0010:[&lt;ffffffff810f168e&gt;]  [&lt;ffffffff810f168e&gt;]
__internal_add_timer+0x2e/0xd0
[  300.004008] RSP: 0018:ffff88003fd03e78  EFLAGS: 00010046
[  300.004008] RAX: ffff88003fd0ef60 RBX: 840fc78949c08548 RCX:
00000001ffffffff
[  300.004008] RDX: 0000000000000000 RSI: ffffffff811c59d3 RDI:
ffff88003fd0df00
[  300.004008] RBP: ffff88003fd03e78 R08: 00000000ffffffff R09:
0000000000000000
[  300.004008] R10: 0000000000000000 R11: 0000000000000000 R12:
ffff88003fd0df00
[  300.004008] R13: 0000000000000000 R14: 0000000000000001 R15:
ffffffff816032e0
[  300.004008] FS:  00007fcbdd609700(0000) GS:ffff88003fd00000(0000)
knlGS:0000000000000000
[  300.004008] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  300.004008] CR2: ffffffff811c59d3 CR3: 0000000037879000 CR4:
00000000000406e0
[  300.004008] Stack:
[  300.004008]  ffff88003fd03ea8 ffffffff810f1775 ffff88003c8cb958
ffff88003fd0df00
[  300.004008]  0000000000000000 0000000000000001 ffff88003fd03f18
ffffffff810f28c4
[  300.004008]  ffff88003fd0eb68 ffff88003fd0e968 ffff88003fd0e768
ffff88003fd0df68
[  300.004008] Call Trace:
[  300.004008]  &lt;IRQ&gt;
[  300.004008]  [&lt;ffffffff810f1775&gt;] cascade+0x45/0x70
[  300.004008]  [&lt;ffffffff810f28c4&gt;] run_timer_softirq+0x2f4/0x340
[  300.004008]  [&lt;ffffffff8107e380&gt;] __do_softirq+0xd0/0x440
[  300.004008]  [&lt;ffffffff8107e8a3&gt;] irq_exit+0xb3/0xc0
[  300.004008]  [&lt;ffffffff815c2032&gt;] smp_apic_timer_interrupt+0x42/0x50
[  300.004008]  [&lt;ffffffff815bfe37&gt;] apic_timer_interrupt+0x87/0x90
[  300.004008]  &lt;EOI&gt;
[  300.004008]  [&lt;ffffffff811fb80c&gt;] ? create_object+0x13c/0x2e0
[  300.004008]  [&lt;ffffffff8109b23e&gt;] ? __kernel_text_address+0x4e/0x70
[  300.004008]  [&lt;ffffffff8109b23e&gt;] ? __kernel_text_address+0x4e/0x70
[  300.004008]  [&lt;ffffffff8101e17f&gt;] print_context_stack+0x7f/0xf0
[  300.004008]  [&lt;ffffffff8101d55b&gt;] dump_trace+0x11b/0x300
[  300.004008]  [&lt;ffffffff8102970b&gt;] save_stack_trace+0x2b/0x50
[  300.004008]  [&lt;ffffffff811fb80c&gt;] create_object+0x13c/0x2e0
[  300.004008]  [&lt;ffffffff815b2e8e&gt;] kmemleak_alloc+0x4e/0xb0
[  300.004008]  [&lt;ffffffff811e475d&gt;] kmem_cache_alloc_trace+0x18d/0x2f0
[  300.004008]  [&lt;ffffffff8128b139&gt;] kernfs_fop_open+0xc9/0x380
[  300.004008]  [&lt;ffffffff8120214f&gt;] do_dentry_open+0x1ff/0x2f0
[  300.004008]  [&lt;ffffffff8128b070&gt;] ? kernfs_fop_release+0x70/0x70
[  300.004008]  [&lt;ffffffff812034f9&gt;] vfs_open+0x59/0x60
[  300.004008]  [&lt;ffffffff812130de&gt;] path_openat+0x1ce/0x1260
[  300.004008]  [&lt;ffffffff812154ae&gt;] do_filp_open+0x7e/0xe0
[  300.004008]  [&lt;ffffffff812251ff&gt;] ? __alloc_fd+0xaf/0x180
[  300.004008]  [&lt;ffffffff8120387b&gt;] do_sys_open+0x12b/0x210
[  300.004008]  [&lt;ffffffff8120397e&gt;] SyS_open+0x1e/0x20
[  300.004008]  [&lt;ffffffff815bf0b6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a
[  300.004008] Code: 66 90 48 8b 46 10 48 8b 4f 40 55 48 89 c2 48 89 e5
48 29 ca 48 81 fa ff 00 00 00 77 20 0f b6 c0 48 8d 44 c7 68 48 8b 10 48
85 d2 &lt;48&gt; 89 16 74 04 48 89 72 08 48 89 30 48 89 46 08 5d c3 48 81 fa
[  300.004008] RIP  [&lt;ffffffff810f168e&gt;] __internal_add_timer+0x2e/0xd0
[  300.004008]  RSP &lt;ffff88003fd03e78&gt;
[  300.004008] CR2: ffffffff811c59d3

Fixes: c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev")
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Acked-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: push bridge setting ageing_time down to switchdev</title>
<updated>2015-10-12T12:20:20+00:00</updated>
<author>
<name>Scott Feldman</name>
<email>sfeldma@gmail.com</email>
</author>
<published>2015-10-09T02:23:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c62987bbd8a1a1664f99e89e3959339350a6131e'/>
<id>urn:sha1:c62987bbd8a1a1664f99e89e3959339350a6131e</id>
<content type='text'>
Use SWITCHDEV_F_SKIP_EOPNOTSUPP to skip over ports in bridge that don't
support setting ageing_time (or setting bridge attrs in general).

If push fails, don't update ageing_time in bridge and return err to user.

If push succeeds, update ageing_time in bridge and run gc_timer now to
recalabrate when to run gc_timer next, based on new ageing_time.

Signed-off-by: Scott Feldman &lt;sfeldma@gmail.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: Add a default_pvid sysfs attribute</title>
<updated>2014-10-06T01:21:36+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevich@gmail.com</email>
</author>
<published>2014-10-03T15:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=96a20d9d7fff7068a2233b00379f0778a150bf86'/>
<id>urn:sha1:96a20d9d7fff7068a2233b00379f0778a150bf86</id>
<content type='text'>
This patch allows the user to set and retrieve default_pvid
value.  A new value can only be stored when vlan filtering
is disabled.

Signed-off-by: Vladislav Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: bridge: move br_netfilter out of the core</title>
<updated>2014-09-26T16:42:31+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-09-18T09:29:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=34666d467cbf1e2e3c7bb15a63eccfb582cdd71f'/>
<id>urn:sha1:34666d467cbf1e2e3c7bb15a63eccfb582cdd71f</id>
<content type='text'>
Jesper reported that br_netfilter always registers the hooks since
this is part of the bridge core. This harms performance for people that
don't need this.

This patch modularizes br_netfilter so it can be rmmod'ed, thus,
the hooks can be unregistered. I think the bridge netfilter should have
been a separated module since the beginning, Patrick agreed on that.

Note that this is breaking compatibility for users that expect that
bridge netfilter is going to be available after explicitly 'modprobe
bridge' or via automatic load through brctl.

However, the damage can be easily undone by modprobing br_netfilter.
The bridge core also spots a message to provide a clue to people that
didn't notice that this has been deprecated.

On top of that, the plan is that nftables will not rely on this software
layer, but integrate the connection tracking into the bridge layer to
enable stateful filtering and NAT, which is was bridge netfilter users
seem to require.

This patch still keeps the fake_dst_ops in the bridge core, since this
is required by when the bridge port is initialized. So we can safely
modprobe/rmmod br_netfilter anytime.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Acked-by: Florian Westphal &lt;fw@strlen.de&gt;
</content>
</entry>
<entry>
<title>bridge: Support 802.1ad vlan filtering</title>
<updated>2014-06-11T22:22:53+00:00</updated>
<author>
<name>Toshiaki Makita</name>
<email>makita.toshiaki@lab.ntt.co.jp</email>
</author>
<published>2014-06-10T11:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=204177f3f30c2dbd2db0aa62b5e9cf9029786450'/>
<id>urn:sha1:204177f3f30c2dbd2db0aa62b5e9cf9029786450</id>
<content type='text'>
This enables us to change the vlan protocol for vlan filtering.
We come to be able to filter frames on the basis of 802.1ad vlan tags
through a bridge.

This also changes br-&gt;group_addr if it has not been set by user.
This is needed for an 802.1ad bridge.
(See IEEE 802.1Q-2011 8.13.5.)

Furthermore, this sets br-&gt;group_fwd_mask_required so that an 802.1ad
bridge can forward the Nearest Customer Bridge group addresses except
for br-&gt;group_addr, which should be passed to higher layer.

To change the vlan protocol, write a protocol in sysfs:
# echo 0x88a8 &gt; /sys/class/net/br0/bridge/vlan_protocol

Signed-off-by: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: use DEVICE_ATTR_xx macros</title>
<updated>2014-01-06T21:40:46+00:00</updated>
<author>
<name>sfeldma@cumulusnetworks.com</name>
<email>sfeldma@cumulusnetworks.com</email>
</author>
<published>2014-01-06T19:00:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fbf2671bb8e9c3329c52dae34b06e975a061d0a0'/>
<id>urn:sha1:fbf2671bb8e9c3329c52dae34b06e975a061d0a0</id>
<content type='text'>
Use DEVICE_ATTR_RO/RW macros to simplify bridge sysfs attribute definitions.

Signed-off-by: Scott Feldman &lt;sfeldma@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: correct the comment for file br_sysfs_br.c</title>
<updated>2013-08-07T17:35:06+00:00</updated>
<author>
<name>Wang Sheng-Hui</name>
<email>shhuiw@gmail.com</email>
</author>
<published>2013-08-06T00:44:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=15401946f9b720efdd20bda3ae79725e9c586897'/>
<id>urn:sha1:15401946f9b720efdd20bda3ae79725e9c586897</id>
<content type='text'>
br_sysfs_if.c is for sysfs attributes of bridge ports, while br_sysfs_br.c
is for sysfs attributes of bridge itself. Correct the comment here.

Signed-off-by: Wang Sheng-Hui &lt;shhuiw@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: use the bridge IP addr as source addr for querier</title>
<updated>2013-05-22T21:54:37+00:00</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2013-05-21T21:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=1c8ad5bfa2be5025b0c81e3c2decd0574d453ab1'/>
<id>urn:sha1:1c8ad5bfa2be5025b0c81e3c2decd0574d453ab1</id>
<content type='text'>
Quote from Adam:
"If it is believed that the use of 0.0.0.0
as the IP address is what is causing strange behaviour on other devices
then is there a good reason that a bridge rather than a router shouldn't
be the active querier? If not then using the bridge IP address and
having the querier enabled by default may be a reasonable solution
(provided that our querier obeys the election rules and shuts up if it
sees a query from a lower IP address that isn't 0.0.0.0). Just because a
device is the elected querier for IGMP doesn't appear to mean it is
required to perform any other routing functions."

And introduce a new troggle for it, as suggested by Herbert.

Suggested-by: Adam Baker &lt;linux@baker-net.org.uk&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Adam Baker &lt;linux@baker-net.org.uk&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: Add vlan filtering infrastructure</title>
<updated>2013-02-14T00:41:46+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vyasevic@redhat.com</email>
</author>
<published>2013-02-13T12:00:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=243a2e63f5f47763b802e9dee8dbf1611a1c1322'/>
<id>urn:sha1:243a2e63f5f47763b802e9dee8dbf1611a1c1322</id>
<content type='text'>
Adds an optional infrustructure component to bridge that would allow
native vlan filtering in the bridge.  Each bridge port (as well
as the bridge device) now get a VLAN bitmap.  Each bit in the bitmap
is associated with a vlan id.  This way if the bit corresponding to
the vid is set in the bitmap that the packet with vid is allowed to
enter and exit the port.

Write access the bitmap is protected by RTNL and read access
protected by RCU.

Vlan functionality is disabled by default.

Signed-off-by: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Allow userns root to control the network bridge code.</title>
<updated>2012-11-19T01:33:00+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-11-16T03:03:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=cb99050305f0ffed0d0ee0d95f1d6645af4d3237'/>
<id>urn:sha1:cb99050305f0ffed0d0ee0d95f1d6645af4d3237</id>
<content type='text'>
Allow an unpriviled user who has created a user namespace, and then
created a network namespace to effectively use the new network
namespace, by reducing capable(CAP_NET_ADMIN) and
capable(CAP_NET_RAW) calls to be ns_capable(net-&gt;user_ns,
CAP_NET_ADMIN), or capable(net-&gt;user_ns, CAP_NET_RAW) calls.

Allow setting bridge paramters via sysfs.

Allow all of the bridge ioctls:
BRCTL_ADD_IF
BRCTL_DEL_IF
BRCTL_SET_BRDIGE_FORWARD_DELAY
BRCTL_SET_BRIDGE_HELLO_TIME
BRCTL_SET_BRIDGE_MAX_AGE
BRCTL_SET_BRIDGE_AGING_TIME
BRCTL_SET_BRIDGE_STP_STATE
BRCTL_SET_BRIDGE_PRIORITY
BRCTL_SET_PORT_PRIORITY
BRCTL_SET_PATH_COST
BRCTL_ADD_BRIDGE
BRCTL_DEL_BRDIGE

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
