From: Chen Gang S <gang.chen@sunrus.com.cn>
To: David Laight <David.Laight@ACULAB.COM>,
'Marcel Holtmann' <marcel@holtmann.org>
Cc: Joe Perches <joe@perches.com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
"Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v3] net: bluetooth: hci_sock: Use 'const u32 *' instead of 'void *' for 2nd parameter of hci_test_bit()
Date: Tue, 10 Feb 2015 05:39:22 +0800 [thread overview]
Message-ID: <54D9290A.8070306@sunrus.com.cn> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CAE0B02@AcuExch.aculab.com>
On 2/10/15 00:57, David Laight wrote:
> From: Marcel Holtmann
>> Hi David,
>>
>>>> So at present, in kernel part, we can only say the original authors
>>>> intended to do like this. And only within kernel part, it can not cause
>>>> issue. I guess, original authors originally knew what we talk about.
>>>
>>> I've just searched for hci_u*filter it is all horrid.
>>> Look at the code for get/set_sockopt of HCI_FILTER.
>>> Someone seems to have done a complete 'bodge job' of fixing the user interface
>>> for apps (32bit and 64bit) on 64bit kernels.
>>
>> we are actually fully aware of that. Just keep in mind that this code is from 2.4.6 kernel and with
>> that most likely 14 years old by now. Unfortunately it ended up as userspace API.
>
> AFAICT the userspace API is always __u32[2] the long[2] is never exposed
> to userspace (certainly not through the socket option code).
>
> Quite why all the casts were added - instead of changing the type
> is probably hidden in the annals of the source repo.
> Some serious archaeology might be in order.
>
For me, I guess what you said above sounds reasonable. But excuse me,
I am not familiar with the related modules outside Linux kernel (at
present, it is out of my border).
I guess, I am not the suitable member to make the related fix patch for
this issue. Welcome any other members to send the fix patch for it.
And for me, if "hci_u*filter" is related with the modules outside kernel
(I guess, it should be), I recommend to put it to the related "uapi"
header.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2015-02-09 21:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 13:24 [PATCH v3] net: bluetooth: hci_sock: Use 'const u32 *' instead of 'void *' for 2nd parameter of hci_test_bit() Chen Gang S
2015-02-07 19:52 ` Joe Perches
2015-02-08 0:00 ` Chen Gang S
2015-02-08 0:00 ` Chen Gang S
2015-02-08 12:29 ` Chen Gang S
2015-02-08 12:29 ` Chen Gang S
2015-02-08 20:17 ` Marcel Holtmann
2015-02-09 3:46 ` Chen Gang S
2015-02-09 10:44 ` David Laight
2015-02-09 10:44 ` David Laight
2015-02-09 16:51 ` Marcel Holtmann
2015-02-09 16:57 ` David Laight
2015-02-09 16:57 ` David Laight
2015-02-09 21:39 ` Chen Gang S [this message]
2015-02-09 21:40 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54D9290A.8070306@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=joe@perches.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.