Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1569916pxa; Thu, 20 Aug 2020 14:59:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJq1a5juJXd/x61ZRWI+wyrS4JnecHspnqAA37rW1KZoY+7dgJ1Ksd/sq6ZJOWdqCR05Ny X-Received: by 2002:a05:6402:896:: with SMTP id e22mr684501edy.210.1597960788845; Thu, 20 Aug 2020 14:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597960788; cv=none; d=google.com; s=arc-20160816; b=XHMT/jaGWyYv7drmyUIM5qG60YqzqaU0q5emUIPJMHhsY4G/Z3nFDz9+TN1fR25xjx UiJDo7RlRTTsEjEh2XNr44P3xd+NaMguYyJRItZdkg0OJjjgdp/SBcKZgSvk8RMfMESp 1/XiaugzkjhTol125T0wgANzf6rGnaHA95VNOeIwjATtgT/W03LWZKrt+X9yPyWF6mgF ig/QWTVTTg4ibHNRVuawEm9CrJ6yYaFjeNJDm5ocP38l/7j5GjEEvO379ut/O4J1SuE1 cgCKXBTgWJAFhgE8V9REheSYWbz6eOq+j/9q9HfAjr2rQuojnZkdf2J3I0wsJ6q5fSyl WgRw== 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=H7cC+z7RQpq0L5vf2H813jv/FwgSYGxlIxzFYi1mC7U=; b=x/Q3cdC898Cho6AP9nqKaLG0+hZyE+ezC4eTowgSgYHEJ/NpY3Ab4+QagkcoALFF7a c5LMF9Z8PAWsKh7v2bCjSe1TYqqxwaRUMqGX7UWG2GahiQcUbEgKdcBCfY6Cp5A6EeSq yhUwRC0omehBFy2YVMMBedK13J4TzcdR9wlmHffmIw7Z1xLhGp0mr2o7vQub8JvpvqHd OhmslBvoWSRTLqxWDMdfdkq7k4pKbv82ESGTo0yY9PdrSm6ekSM0MJly0za4hJFG8HiW Raammfn95XH27eD6j+nk8Y4n0/92320NzrdNtGF32maTXMin5BA2yNQuYWzE1P7/2kwq K78A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=EUF9uV3G; 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 mf20si2058458ejb.505.2020.08.20.14.59.24; Thu, 20 Aug 2020 14:59:48 -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=EUF9uV3G; 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 S1728667AbgHTVK0 (ORCPT + 99 others); Thu, 20 Aug 2020 17:10:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbgHTVKZ (ORCPT ); Thu, 20 Aug 2020 17:10:25 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E8E3C061385 for ; Thu, 20 Aug 2020 14:10:25 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id d19so1722238pgl.10 for ; Thu, 20 Aug 2020 14:10:25 -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=H7cC+z7RQpq0L5vf2H813jv/FwgSYGxlIxzFYi1mC7U=; b=EUF9uV3GRF3iffTeTaQLIg2GlCcopbN/jMxcjN6JP47piXndTpnv1f6QVVtGBtKfwd AaGvLdfDRx+PSRh8mCf41rol0PpJbxmEo1J3gCEGTUupXOvt/2F9xir4J9/OwY2eVnFc hmaTLAhMsb9n191FVkycXsD6Uuvb8r9bm1CLg= 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=H7cC+z7RQpq0L5vf2H813jv/FwgSYGxlIxzFYi1mC7U=; b=dbhbmOP/KS0t/SaTNFlm+sTJKaav2lJjripsqxeZLjSC19QhxGxFRSc7OaW6Yq876/ nhGv4aGPRL/FSt3tYO1TrSZhTVoSi571K6Xv8AaLrdjU8qJ0R473Z08cWf0J6X/iaQFs H9qLaZKimgz2JuZOeujFh3e8MxoypfGnG98CX+Y31zVi2sa1v6937DxyqIWC7ZMZTj5n icfHINm5ezj16ZtqDDeJdysSeqeghNKVwURDeiVl9BfCwmKqCCAIeG0ILQodPzGNLqnt NLnbEYV1VIdxIdHqPFwFxA4pSVV3afyk/8eLdoLIlo50p2/UECaCfXfI4aFmGY15GH9I atxA== X-Gm-Message-State: AOAM533+Clo247Q7Mw/StlMaPmJbFiWmlykVhIAlrz1lBwIMa7JY6tUO ywww7V0pjdkwJhvU5SC2nhPMVA== X-Received: by 2002:aa7:854f:: with SMTP id y15mr462505pfn.298.1597957824548; Thu, 20 Aug 2020 14:10:24 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id q5sm3565280pfg.89.2020.08.20.14.10.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 14:10:24 -0700 (PDT) Subject: Re: [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI To: Florian Fainelli , 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: Date: Thu, 20 Aug 2020 14:10:22 -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: 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:57 p.m., Florian Fainelli wrote: > On 8/20/20 1:55 PM, 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... > Since we ship a copy of unifdef.c in tree, we could certainly teach it > to undo the BIT() definition and replace it with an appropriate constant > definition. That sounds appealing given the rest of the code wants us to use the BIT macro.