Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761329AbbBIVcU (ORCPT ); Mon, 9 Feb 2015 16:32:20 -0500 Received: from mail113-250.mail.alibaba.com ([205.204.113.250]:54353 "EHLO us-alimail-mta1.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760926AbbBIVcT (ORCPT ); Mon, 9 Feb 2015 16:32:19 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1523764|-1;FP=0|0|0|0|0|-1|-1|-1;HT=r41g03007;MF=gang.chen@sunrus.com.cn;PH=DS;RN=10;RT=10;SR=0; Message-ID: <54D9290A.8070306@sunrus.com.cn> Date: Tue, 10 Feb 2015 05:39:22 +0800 From: Chen Gang S User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Laight , "'Marcel Holtmann'" CC: Joe Perches , Sergei Shtylyov , "Gustavo F. Padovan" , Johan Hedberg , "David S. Miller" , "linux-bluetooth@vger.kernel.org" , "linux-kernel@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() References: <54D61229.9010904@sunrus.com.cn> <1423338774.2933.9.camel@perches.com> <54D6A729.1070905@sunrus.com.cn> <54D75698.7010808@sunrus.com.cn> <54D82D7D.3000308@sunrus.com.cn> <063D6719AE5E284EB5DD2968C1650D6D1CAE0823@AcuExch.aculab.com> <063D6719AE5E284EB5DD2968C1650D6D1CAE0B02@AcuExch.aculab.com> In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CAE0B02@AcuExch.aculab.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1864 Lines: 46 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/