[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97f8cc2f-02ec-4350-60fe-7f8b412ac7ee@broadcom.com>
Date: Thu, 20 Aug 2020 14:09:34 -0700
From: Scott Branden <scott.branden@...adcom.com>
To: Kees Cook <keescook@...omium.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI
On 2020-08-20 1:55 p.m., Kees Cook wrote:
> On Thu, Aug 20, 2020 at 09:37:46AM -0700, Scott Branden wrote:
>> On 2020-08-19 12:00 a.m., Greg Kroah-Hartman wrote:
>>> On Tue, Aug 18, 2020 at 05:35:04PM -0700, Scott Branden wrote:
>>>> On 2020-08-18 10:44 a.m., Greg Kroah-Hartman wrote:
>>>>> On Tue, Aug 18, 2020 at 10:23:42AM -0700, Scott Branden wrote:
>>>>>>>> +#define VK_FWSTS_RELOCATION_ENTRY BIT(0)
>>>>>>> <snip>
>>>>>>>
>>>>>>> I thought BIT() was not allowed in uapi .h files, this really works
>>>>>>> properly???
>>>>>> I did some investigation and it looks like a few other header files in include/uapi also use the BIT() macro:
>>>>>> include/uapi/misc/uacce/uacce.h
>>>>>> include/uapi/linux/psci.h
>>>>>> include/uapi/linux/v4l2-subdev.h
>>>>> Does the header install test target now fail for these?
>>>> I do not understand the question above. make headers_install works.
>>>> But I guess the above headers would have similar issue with the BIT macro.
>>> Try enabling CONFIG_UAPI_HEADER_TEST and see what happens :)
>> I enabled CONFIG_UAPI_HEADER_TEST and then
>> built using "make" and "make headers_install".
>>
>> There didn't appear to be any issue with the BIT macro in the headers.
> FWIW, other subsystems have not been so lucky:
>
> https://git.kernel.org/linus/23b2c96fad21886c53f5e1a4ffedd45ddd2e85ba
>
> It may just be better to avoid BIT(), even if it works "by accident"(?)
> for some header combinations...
>
Yes, I was going to avoid the BIT macro but was just testing what Greg asked me too.
It would be nice if checkpatch reported the BIT macro shouldn't be used in the uapi headers....
Powered by blists - more mailing lists