<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/net/bluetooth, branch dev-4.7</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.7</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-10-07T13:21:21+00:00</updated>
<entry>
<title>Bluetooth: split sk_filter in l2cap_sock_recv_cb</title>
<updated>2016-10-07T13:21:21+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2016-07-27T18:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=641cd3a7d43ee707b7ae86e313b25e7e567596e7'/>
<id>urn:sha1:641cd3a7d43ee707b7ae86e313b25e7e567596e7</id>
<content type='text'>
commit dbb50887c8f619fc5c3489783ebc3122bc134a31 upstream.

During an audit for sk_filter(), we found that rx_busy_skb handling
in l2cap_sock_recv_cb() and l2cap_sock_recvmsg() looks not quite as
intended.

The assumption from commit e328140fdacb ("Bluetooth: Use event-driven
approach for handling ERTM receive buffer") is that errors returned
from sock_queue_rcv_skb() are due to receive buffer shortage. However,
nothing should prevent doing a setsockopt() with SO_ATTACH_FILTER on
the socket, that could drop some of the incoming skbs when handled in
sock_queue_rcv_skb().

In that case sock_queue_rcv_skb() will return with -EPERM, propagated
from sk_filter() and if in L2CAP_MODE_ERTM mode, wrong assumption was
that we failed due to receive buffer being full. From that point onwards,
due to the to-be-dropped skb being held in rx_busy_skb, we cannot make
any forward progress as rx_busy_skb is never cleared from l2cap_sock_recvmsg(),
due to the filter drop verdict over and over coming from sk_filter().
Meanwhile, in l2cap_sock_recv_cb() all new incoming skbs are being
dropped due to rx_busy_skb being occupied.

Instead, just use __sock_queue_rcv_skb() where an error really tells that
there's a receive buffer issue. Split the sk_filter() and enable it for
non-segmented modes at queuing time since at this point in time the skb has
already been through the ERTM state machine and it has been acked, so dropping
is not allowed. Instead, for ERTM and streaming mode, call sk_filter() in
l2cap_data_rcv() so the packet can be dropped before the state machine sees it.

Fixes: e328140fdacb ("Bluetooth: Use event-driven approach for handling ERTM receive buffer")
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU</title>
<updated>2016-08-20T16:10:54+00:00</updated>
<author>
<name>Amadeusz Sławiński</name>
<email>amadeusz.slawinski@tieto.com</email>
</author>
<published>2016-07-14T08:50:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=34fc69f9aa9893b98b129d6a7ac12a667a430bd4'/>
<id>urn:sha1:34fc69f9aa9893b98b129d6a7ac12a667a430bd4</id>
<content type='text'>
commit 23bc6ab0a0912146fd674a0becc758c3162baabc upstream.

When we retrieve imtu value from userspace we should use 16 bit pointer
cast instead of 32 as it's defined that way in headers. Fixes setsockopt
calls on big-endian platforms.

Signed-off-by: Amadeusz Sławiński &lt;amadeusz.slawinski@tieto.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: fix power_on vs close race</title>
<updated>2016-05-13T14:50:23+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-05-13T08:38:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=bf389cabb3b8079c23f9762e62b05f291e2d5e99'/>
<id>urn:sha1:bf389cabb3b8079c23f9762e62b05f291e2d5e99</id>
<content type='text'>
With all the latest fixes applied, I am still able to reproduce this
(and other) warning(s):
WARNING: CPU: 1 PID: 19684 at ../kernel/workqueue.c:4092 destroy_workqueue+0x70a/0x770()
...
Call Trace:
 [&lt;ffffffff819fee81&gt;] ? dump_stack+0xb3/0x112
 [&lt;ffffffff8117377e&gt;] ? warn_slowpath_common+0xde/0x140
 [&lt;ffffffff811ce68a&gt;] ? destroy_workqueue+0x70a/0x770
 [&lt;ffffffff811739ae&gt;] ? warn_slowpath_null+0x2e/0x40
 [&lt;ffffffff811ce68a&gt;] ? destroy_workqueue+0x70a/0x770
 [&lt;ffffffffa0c944c9&gt;] ? hci_unregister_dev+0x2a9/0x720 [bluetooth]
 [&lt;ffffffffa0b301db&gt;] ? vhci_release+0x7b/0xf0 [hci_vhci]
 [&lt;ffffffffa0b30160&gt;] ? vhci_flush+0x50/0x50 [hci_vhci]
 [&lt;ffffffff8117cd73&gt;] ? do_exit+0x863/0x2b90

This is due to race present in the hci_unregister_dev path.
hdev-&gt;power_on work races with hci_dev_do_close. One tries to open,
the other tries to close, leading to warning like the above. (Another
example is a warning in kobject_get or kobject_put depending on who
wins the race.)

Fix this by switching those two racers to ensure hdev-&gt;power_on never
triggers while hci_dev_do_close is in progress.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>treewide: replace dev-&gt;trans_start update with helper</title>
<updated>2016-05-04T18:16:49+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-05-03T14:33:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=860e9538a9482bb84589f7d0718a7e6d0a944d58'/>
<id>urn:sha1:860e9538a9482bb84589f7d0718a7e6d0a944d58</id>
<content type='text'>
Replace all trans_start updates with netif_trans_update helper.
change was done via spatch:

struct net_device *d;
@@
- d-&gt;trans_start = jiffies
+ netif_trans_update(d)

Compile tested only.

Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: MPT-FusionLinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Mugunthan V N &lt;mugunthanvnm@ti.com&gt;
Acked-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next</title>
<updated>2016-04-26T17:15:56+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-04-26T17:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c0b04793076167c8d8aade4c31fe06a4cc45b626'/>
<id>urn:sha1:c0b04793076167c8d8aade4c31fe06a4cc45b626</id>
<content type='text'>
Johan Hedberg says:

====================
pull request: bluetooth-next 2016-04-26

Here's another set of Bluetooth &amp; 802.15.4 patches for the 4.7 kernel:

 - Cleanups &amp; refactoring of ieee802154 &amp; 6lowpan code
 - Security related additions to ieee802154 and mrf24j40 driver
 - Memory corruption fix to Bluetooth 6lowpan code
 - Race condition fix in vhci driver
 - Enhancements to the atusb 802.15.4 driver

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: 6lowpan: Fix memory corruption of ipv6 destination address</title>
<updated>2016-04-25T23:08:25+00:00</updated>
<author>
<name>Glenn Ruben Bakke</name>
<email>glennrubenbakke@nordicsemi.no</email>
</author>
<published>2016-04-22T16:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=55441070ca1cbd47ce1ad2959bbf4b47aed9b83b'/>
<id>urn:sha1:55441070ca1cbd47ce1ad2959bbf4b47aed9b83b</id>
<content type='text'>
The memcpy of ipv6 header destination address to the skb control block
(sbk-&gt;cb) in header_create() results in currupted memory when bt_xmit()
is issued. The skb-&gt;cb is "released" in the return of header_create()
making room for lower layer to minipulate the skb-&gt;cb.

The value retrieved in bt_xmit is not persistent across header creation
and sending, and the lower layer will overwrite portions of skb-&gt;cb,
making the copied destination address wrong.

The memory corruption will lead to non-working multicast as the first 4
bytes of the copied destination address is replaced by a value that
resolves into a non-multicast prefix.

This fix removes the dependency on the skb control block between header
creation and send, by moving the destination address memcpy to the send
function path (setup_create, which is called from bt_xmit).

Signed-off-by: Glenn Ruben Bakke &lt;glenn.ruben.bakke@nordicsemi.no&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: stable@vger.kernel.org # 4.5+
</content>
</entry>
<entry>
<title>sock: tigthen lockdep checks for sock_owned_by_user</title>
<updated>2016-04-14T02:37:20+00:00</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2016-04-08T13:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fafc4e1ea1a4c1eb13a30c9426fb799f5efacbc3'/>
<id>urn:sha1:fafc4e1ea1a4c1eb13a30c9426fb799f5efacbc3</id>
<content type='text'>
sock_owned_by_user should not be used without socket lock held. It seems
to be a common practice to check .owned before lock reclassification, so
provide a little help to abstract this check away.

Cc: linux-cifs@vger.kernel.org
Cc: linux-bluetooth@vger.kernel.org
Cc: linux-nfs@vger.kernel.org
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>6lowpan: change naming for lowpan private data</title>
<updated>2016-04-13T08:41:09+00:00</updated>
<author>
<name>Alexander Aring</name>
<email>aar@pengutronix.de</email>
</author>
<published>2016-04-11T09:04:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=2e4d60cbcfc2d16a2a2efaae3fe08f2e457d59a1'/>
<id>urn:sha1:2e4d60cbcfc2d16a2a2efaae3fe08f2e457d59a1</id>
<content type='text'>
This patch changes the naming for interface private data for lowpan
intefaces. The current private data scheme is:

-------------------------------------------------
|    6LoWPAN Generic   |    LinkLayer 6LoWPAN   |
-------------------------------------------------

the current naming schemes are:

- 6LoWPAN Generic:
  - lowpan_priv
- LinkLayer 6LoWPAN:
  - BTLE
    - lowpan_dev
  - 802.15.4:
    - lowpan_dev_info

the new naming scheme with this patch will be:

- 6LoWPAN Generic:
  - lowpan_dev
- LinkLayer 6LoWPAN:
  - BTLE
    - lowpan_btle_dev
  - 802.15.4:
    - lowpan_802154_dev

Signed-off-by: Alexander Aring &lt;aar@pengutronix.de&gt;
Reviewed-by: Stefan Schmidt&lt;stefan@osg.samsung.com&gt;
Acked-by: Jukka Rissanen &lt;jukka.rissanen@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Allow setting BT_SECURITY_FIPS with setsockopt</title>
<updated>2016-04-08T17:10:57+00:00</updated>
<author>
<name>Patrik Flykt</name>
<email>patrik.flykt@linux.intel.com</email>
</author>
<published>2016-03-24T14:04:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a164cee111085f9ee77f6038f006658249073523'/>
<id>urn:sha1:a164cee111085f9ee77f6038f006658249073523</id>
<content type='text'>
Update the security level check to allow setting BT_SECURITY_FIPS for
an L2CAP socket.

Signed-off-by: Patrik Flykt &lt;patrik.flykt@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Ignore unknown advertising packet types</title>
<updated>2016-04-08T16:51:44+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2016-04-07T18:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=56b40fbf61a247e23b50e426971148b2e50262e0'/>
<id>urn:sha1:56b40fbf61a247e23b50e426971148b2e50262e0</id>
<content type='text'>
In case of buggy controllers send advertising packet types that we
don't know of we should simply ignore them instead of trying to react
to them in some (potentially wrong) way.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
