Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1569711pxa; Thu, 20 Aug 2020 14:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv9sSDcVSJVBCWX6N087RQJt3fogtKCDvbGUJG7EPQc2qHrMROnTV+y891DSCXtO51MDQm X-Received: by 2002:a17:906:b286:: with SMTP id q6mr679808ejz.99.1597960765838; Thu, 20 Aug 2020 14:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597960765; cv=none; d=google.com; s=arc-20160816; b=LsiqJ+bc8JsESbhOzKQ0c30Zot3P+bRj6yIHLVaojZLNLZgQrdQLOQdvvlIJ8OhjfY PNY8QoRgVqBcWHkZ6hV/n8b5SgDnQS9+Ysv+syUAcW8CSwEYKBSR02DE400iUpe8A3Jg 0r1+0PFp3JI0paIiJryYflcqYeO3sU3n6nJkuHXOYYwwgvMtfnskOgWvlo1FTmmfgbB+ TZDZHw2F0rNP2VB/l/zr+Tit2+TY95sLM0u9iIwI2dmwrXp2DXAvgFnZd1XMZqKLZHZo zijNqlQ7QtDRZcLPD9qmF70I7X9yHB+klcLnatfeP9td/sDwEcyvceTSut4RbHUAuyvh 0xgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=WMTxNX7lmAJ9yWThRRrmuIVMfN0DOjDQgr+kVPyIsqA=; b=yoiW5WwDMprdOHfy2+3OrPie3hr+c+aQRehiX0jtF6nsUOX5uBIROMMPg1rYImAj6/ WUdIhVAjmSC/Wdd33w68tOl2nvHwo7nb22krcMYGiHfk1yRjt4GE/vf8ufD5DSitBBfX FuAHYmxIV1N7tZFXyD5gpIpFG32YRO8iurjdOcajGvWmvqkA5cgwtADIrsZdiwefYhhf PoZDRcPaCHmIEw48MG2EVhJyPHJZaqkx2eSUyF7j98qw2TCqueXMwxiFrHzJfuO5wMXE 9yJMOsNSZjfso2+1OCavesTDSp3hypW/5ZJ9NBMeIToUlsEVy8ZbbskpIn7Kno0k4WHK RSdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GEpYBUwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v17si1959518ejd.324.2020.08.20.14.59.01; Thu, 20 Aug 2020 14:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=GEpYBUwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728674AbgHTVJn (ORCPT + 99 others); Thu, 20 Aug 2020 17:09:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728687AbgHTVJh (ORCPT ); Thu, 20 Aug 2020 17:09:37 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ACD7C061385 for ; Thu, 20 Aug 2020 14:09:37 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id h2so1619808plr.0 for ; Thu, 20 Aug 2020 14:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=WMTxNX7lmAJ9yWThRRrmuIVMfN0DOjDQgr+kVPyIsqA=; b=GEpYBUwpYQwB4ronXtys68da9XpQ0GxEFzaTdVfs1XfZ4NeHg+9Sr87dVZv+zwwYOK H03Uo4ID6IUAkVtXMm7Yhp9bfbti06TagAgg9E/LVdiLSo2o+B6+7rT0VRyyG8+fjzJP FUOcgfLxahqZNwrXA1mTd4Qyk34dUTRrNC0lM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=WMTxNX7lmAJ9yWThRRrmuIVMfN0DOjDQgr+kVPyIsqA=; b=oe6lvCk7i7DMrVeGFXWpepTukAV0ly0u/JY9iTC5DOMyIDnmW8/0uwBfsh9+O2mNYT lZ4tRPN1QqTuqcyEbLOR3b+pgBnIYAKmxKgkmO/FZu0w8mW/6LLXIr6o+GcHeTp9bMD6 5Q7tSyANrcDWOXDv1igsLL/c/9+efH65i+FML3wmyQ9keuIL9aKY5ONXIO4gNe2BKtzB G7U8KzzNJwkgKVL8jGPQd1YQzPP2R4FcxoobYvxKgXnUILP+guWTQE8n2j8xMGtTbxtc VpZsoMGqRGaF3p7j6t15NshFl3fati53ErAdZhyCdlm8iKR95m/xVVqPATFMD0UmVT4h n1IA== X-Gm-Message-State: AOAM531WBBZG+hCCS1jsHOv+WjIkiQezRxuc1Tfl5axGsaJmAFumIw1c 3+UFqvJFTIL7Q6kLvrI7GGjfMvgi4VOh+/R7 X-Received: by 2002:a17:902:7293:: with SMTP id d19mr180286pll.303.1597957776246; Thu, 20 Aug 2020 14:09:36 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id q5sm3463778pgv.1.2020.08.20.14.09.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 14:09:35 -0700 (PDT) Subject: Re: [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI To: Kees Cook Cc: Greg Kroah-Hartman , Arnd Bergmann , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com References: <20200806004631.8102-1-scott.branden@broadcom.com> <20200806004631.8102-2-scott.branden@broadcom.com> <20200818135313.GB495837@kroah.com> <8894c3c4-4d5c-cb94-bc90-a26833ebf268@broadcom.com> <20200818174451.GA749919@kroah.com> <4adbd70e-c49b-c2d4-84c7-5e910f05e449@broadcom.com> <20200819070044.GA1004396@kroah.com> <202008201353.F342E59EC@keescook> From: Scott Branden Message-ID: <97f8cc2f-02ec-4350-60fe-7f8b412ac7ee@broadcom.com> Date: Thu, 20 Aug 2020 14:09:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <202008201353.F342E59EC@keescook> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-CA Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) >>>>>>> >>>>>>> >>>>>>> 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....