linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Scott Branden <scott.branden@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI
Date: Thu, 20 Aug 2020 13:55:17 -0700	[thread overview]
Message-ID: <202008201353.F342E59EC@keescook> (raw)
In-Reply-To: <fdbb7404-03c3-22b1-d409-5b6d8745ff2b@broadcom.com>

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

  reply	other threads:[~2020-08-20 20:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06  0:46 [PATCH v2 0/3] Add Broadcom VK driver Scott Branden
2020-08-06  0:46 ` [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI Scott Branden
2020-08-18 13:53   ` Greg Kroah-Hartman
2020-08-18 17:23     ` Scott Branden
2020-08-18 17:44       ` Greg Kroah-Hartman
2020-08-19  0:35         ` Scott Branden
2020-08-19  7:00           ` Greg Kroah-Hartman
2020-08-20 16:37             ` Scott Branden
2020-08-20 20:55               ` Kees Cook [this message]
2020-08-20 20:57                 ` Florian Fainelli
2020-08-20 21:10                   ` Scott Branden
2020-08-20 21:09                 ` Scott Branden
2020-08-06  0:46 ` [PATCH v2 2/3] misc: bcm-vk: add Broadcom VK driver Scott Branden
2020-08-06  0:46 ` [PATCH v2 3/3] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver Scott Branden
2020-08-18 19:52 ` [PATCH v2 0/3] Add Broadcom VK driver Kees Cook
2020-08-19  5:53   ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2020-07-31 18:52 Scott Branden
2020-07-31 18:52 ` [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI Scott Branden

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=202008201353.F342E59EC@keescook \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott.branden@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).