<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/net/bluetooth/l2cap.c, branch v2.6.23</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.23</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v2.6.23'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2007-07-31T09:28:09+00:00</updated>
<entry>
<title>[BLUETOOTH] l2cap: don't mangle cmd.len</title>
<updated>2007-07-31T09:28:09+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-07-29T07:18:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d83852822cb58f0beaa2d06b7c1e9e005e0c4f94'/>
<id>urn:sha1:d83852822cb58f0beaa2d06b7c1e9e005e0c4f94</id>
<content type='text'>
Since nobody uses it after we convert it to host-endian,
no need to do that at all.  At that point l2cap is endian-clean.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[BLUETOOTH]: pass (host-endian) cmd length as explicit argument to l2cap_conf_req()</title>
<updated>2007-07-31T09:28:08+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-07-29T07:17:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=88219a0f65ae14ba744fa424604c965b6f1c1a8d'/>
<id>urn:sha1:88219a0f65ae14ba744fa424604c965b6f1c1a8d</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[BLUETOOTH] l2cap: endianness annotations</title>
<updated>2007-07-31T09:28:07+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-07-29T07:16:36+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8e036fc3143646dc304356fa50314681d654363f'/>
<id>urn:sha1:8e036fc3143646dc304356fa50314681d654363f</id>
<content type='text'>
no code changes, just documenting existing types

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[BLUETOOTH]: Fix endianness bug in l2cap_sock_listen()</title>
<updated>2007-07-31T09:28:06+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2007-07-29T07:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6dc0c2082b8acf30c9239fbbcc051eebdaf7ecff'/>
<id>urn:sha1:6dc0c2082b8acf30c9239fbbcc051eebdaf7ecff</id>
<content type='text'>
We loop through psm values, calling __l2cap_get_sock_by_addr(psm, ...)
until we get NULL; then we set -&gt;psm of our socket to htobs(psm).
IOW, we find unused psm value and put it into our socket.  So far, so
good, but...  __l2cap_get_sock_by_addr() compares its argument with
-&gt;psm of sockets.  IOW, the entire thing works correctly only on
little-endian.  On big-endian we'll get "no socket with such psm"
on the first iteration, since we won't find a socket with -&gt;psm == 0x1001.
We will happily conclude that 0x1001 is unused and slap htobs(0x1001)
(i.e. 0x110) into -&gt;psm of our socket.  Of course, the next time around
the same thing will repeat and we'll just get a fsckload of sockets
with the same -&gt;psm assigned.

Fix: pass htobs(psm) to __l2cap_get_sock_by_addr() there.  All other
callers are already passing little-endian values and all places that
store something in -&gt;psm are storing little-endian.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Fix L2CAP configuration parameter handling</title>
<updated>2007-05-24T12:27:19+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2007-05-24T12:27:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5dee9e7c4c869fcffccc3d432b755793dfa71376'/>
<id>urn:sha1:5dee9e7c4c869fcffccc3d432b755793dfa71376</id>
<content type='text'>
The L2CAP configuration parameter handling was missing the support
for rejecting unknown options. The capability to reject unknown
options is mandatory since the Bluetooth 1.2 specification. This
patch implements its and also simplifies the parameter parsing.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Fix L2CAP and HCI setsockopt() information leaks</title>
<updated>2007-05-04T22:35:59+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2007-05-04T22:35:59+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0878b6667f28772aa7d6b735abff53efc7bf6d91'/>
<id>urn:sha1:0878b6667f28772aa7d6b735abff53efc7bf6d91</id>
<content type='text'>
The L2CAP and HCI setsockopt() implementations have a small information
leak that makes it possible to leak kernel stack memory to userspace.

If the optlen parameter is 0, no data will be copied by copy_from_user(),
but the uninitialized stack buffer will be read and stored later. A call
to getsockopt() can now retrieve the leaked information.

To fix this problem the stack buffer given to copy_from_user() must be
initialized with the current settings.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}</title>
<updated>2007-04-26T05:28:23+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2007-03-27T21:55:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d626f62b11e00c16e81e4308ab93d3f13551812a'/>
<id>urn:sha1:d626f62b11e00c16e81e4308ab93d3f13551812a</id>
<content type='text'>
To clearly state the intent of copying from linear sk_buffs, _offset being a
overly long variant but interesting for the sake of saving some bytes.

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>[NET] BLUETOOTH: Use cpu_to_le{16,32}() where appropriate.</title>
<updated>2007-04-26T05:23:54+00:00</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2007-03-26T03:12:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=aca3192cc60d2bf193c2252e45563c32e3117289'/>
<id>urn:sha1:aca3192cc60d2bf193c2252e45563c32e3117289</id>
<content type='text'>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET] BLUETOOTH: Fix whitespace errors.</title>
<updated>2007-02-11T07:19:20+00:00</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
<email>yoshfuji@linux-ipv6.org</email>
</author>
<published>2007-02-09T14:24:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8e87d14255acffeee36873de226dc25c11b5f46d'/>
<id>urn:sha1:8e87d14255acffeee36873de226dc25c11b5f46d</id>
<content type='text'>
Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[Bluetooth] Restrict well known PSM to privileged users</title>
<updated>2007-01-22T21:00:45+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2007-01-22T21:00:45+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=847641d7db15ac3f18b3d4aa05479812abdf397a'/>
<id>urn:sha1:847641d7db15ac3f18b3d4aa05479812abdf397a</id>
<content type='text'>
The PSM values below 0x1001 of L2CAP are reserved for well known
services. Restrict the possibility to bind them to privileged
users.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
