lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Aug 2020 13:55:17 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Scott Branden <scott.branden@...adcom.com>
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 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...

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ