Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp844313pxk; Thu, 1 Oct 2020 15:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzef+PSTxOUGW+9UG/PjYXOrS5RExJyUzOVnLWftYYojs/HneqAeDgydbjyItma7W8nujd X-Received: by 2002:a50:c309:: with SMTP id a9mr7513150edb.199.1601591762004; Thu, 01 Oct 2020 15:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601591761; cv=none; d=google.com; s=arc-20160816; b=uWB14c8kzXuzn8b8twmdDEOvQsfGCa8ABHQG0FiFO02olZjNRBjKf2+tAL6FiEW3CI e+w2KxE5nSZ8kh3MBAprd5DzfS349PsEE0c6VpSuIdPrsUJ+fL1rPP1kKRZcwxZPwH8c BXmUA+lKUAkXM9ujH61H2FO1maJKuTvI5hJyVbEAvn+wD5aTeltoI4mKg8YLxNDd5KBw nScPtZWxxKiwFRl3wBAxHioERyZQQa5XkdoXxyyQvD1N1enIMNd/zTrDj99qQMS64Sf3 gZk9wkMqGidpuA34hZ47kpecaCZLanYhbUfAh+QaVYNerHrMP1Z9Gj8bBGVgolwK17rT 6T1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=t1z2YcBLtrrYJdv6Xjv83rGz2AAb0KB7HcEsoMluSYA=; b=YVOJouoA2mWdf4iUGAVSRyLLFXsI9UtpdUdx5T/5qGSVTt6DTsxHxuEkUZJRdGjbHi JiL8sqQddbIZwN4OB56JR+RdkYnMp3boo72NAmM/1tS9+nJhJu2QrwaU0HJrSpitXGL4 Iag00LGuCK6QmwRS4VkN+FisdBUHWaZPnsephF9wIGokmTl/r4lLD36/CZLn6j2sAZ1n pa4o21t9uSBDM6lf80Toquq+VXdPE9T6555MwdbFBV178YWnjm2adEJBUN5gQ10JEXKr BLbq1gzf6rG5LKtyRUW0OADxbNTK+hqV49GYFwPt8I8fWQnrmZYOErnenfOiKVqVK917 yg9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="WsYVCKy/"; 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 jr15si4584411ejb.183.2020.10.01.15.35.38; Thu, 01 Oct 2020 15:36:01 -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="WsYVCKy/"; 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 S1733143AbgJAWef (ORCPT + 99 others); Thu, 1 Oct 2020 18:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728090AbgJAWef (ORCPT ); Thu, 1 Oct 2020 18:34:35 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB4FC0613D0 for ; Thu, 1 Oct 2020 15:34:35 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id w21so452691pfc.7 for ; Thu, 01 Oct 2020 15:34:35 -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; bh=t1z2YcBLtrrYJdv6Xjv83rGz2AAb0KB7HcEsoMluSYA=; b=WsYVCKy/Ixm5cyKnHnwOIMnathVD6CGJmu5SHPgvAy9PDreyMody66TjFk6tYiqIHT JVzEjg5w75QJxZqk/byAmF0OeSjDbjVMiOpPukwNouHneHQzGM+w3OJgeeh0HISo33lS ZjmKpRuSNB4n2vzLn1Os/u+T1jkN3Ff1zy1gQ= 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; bh=t1z2YcBLtrrYJdv6Xjv83rGz2AAb0KB7HcEsoMluSYA=; b=glye4ooOCTfFpMUaD6vFSCAmxHLAW0XgvPRnkbY/iV1WG3yEkB5i6hVDkUcw0xM5N9 zavvZXiVHJ2l2VM/i0OaBErNU3NCcpdNo7jfBeA/MMUfSujBhJdzT8o/V2il/o9zJQyV 1MM4ooibzhAJn/z3yUM0jf9kKtU54SYFA5WRtOdvttxq6Kw4+ppTS1xNCwcpoImEK5Hf 2uw5M08iLaE4dWY4YVXyyYDwtgkFlhFmsFmAlN/dFcM7pHXFWV8H75zBn2EvLV0xqoe8 f8fhzb4GTeqalrGvgqb1MUcBFkNV6THMB3PWSorWx8j9UoBSzIQP7PpYp11uGT1eaWyr N0gw== X-Gm-Message-State: AOAM531HvDSDrSMRQw23fsd4YTs65wsgePvHVU+GyWrIMxl22gDXYJjB zNkHxBCyZ11PoOONFhxKu0gkU+QaCWQi5+9T X-Received: by 2002:a63:4a19:: with SMTP id x25mr7727305pga.56.1601591674585; Thu, 01 Oct 2020 15:34:34 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id a185sm6638967pgc.46.2020.10.01.15.34.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Oct 2020 15:34:34 -0700 (PDT) Subject: Re: [PATCH v5 00/15] Add Broadcom VK driver To: Florian Fainelli , Arnd Bergmann , Greg Kroah-Hartman , Olof Johansson Cc: Kees Cook , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com References: <20201001012810.4172-1-scott.branden@broadcom.com> From: Scott Branden Message-ID: Date: Thu, 1 Oct 2020 15:34:27 -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: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000dd90e505b0a39ef0" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000dd90e505b0a39ef0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-CA On 2020-09-30 7:38 p.m., Florian Fainelli wrote: > > > On 9/30/2020 6:27 PM, Scott Branden wrote: >> This patch series drops previous patches in [1] >> that were incorporated by Kees Cook into patch series >> "Introduce partial kernel_read_file() support" [2]. >> >> Remaining patches are contained in this series to add Broadcom VK driver. >> (which depends on request_firmware_into_buf API addition in >> other patch series [2] being applied first). >> >> Please note this patch series will not compile without [2]. >> >> [1] https://lore.kernel.org/lkml/20200706232309.12010-1-scott.branden@broadcom.com/ >> [2] https://lore.kernel.org/lkml/20200729175845.1745471-1-keescook@chromium.org/ > > Disclaimer: I am well aware that it is the complete wild west right now as far as accelerators go and that every vendor (that I happen to work for, just not in the same group as Scott) is just seeking to get their drivers included upstream and hopefully for good reasons. > > From a cursory look however, it sounds like there could be a little better re-utilization of standards, standard framework and interfaces: > > - about 2/3 of your sysfs attributes should incline you to implement a HWMON device, not a complicated one, but anything that indicates current, power, temperature, alerts etc. should be considered yes, commented in the patch.  we'll look at it. > > - cannot the firmware loading be supported over remoteproc somehow? It doesn't follow remoteproc usage, Olof commented. > > - could not the TTY interface be using virtio or an existing UART? commented in the patch.  I don't see how that would work with existing solutions but open to a simple solution if such exists. > > - what is the format of the message over BAR2 that you expose in patch 13? proprietary log messages retrieve via user space app and run through post processing > > Is there a reference user-space implementation that you can link to this patch submission in case people are curious? Published and commented to Greg K-H about this yesterday. Here is the vk interface library, vkil, and associated unittest and card utilities. https://github.com/Broadcom/vkil/ > > Thanks --000000000000dd90e505b0a39ef0 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQRQYJKoZIhvcNAQcCoIIQNjCCEDICAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2aMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5xh9wjx9sScVpGR5wkTg1 fgJIXTlrGESmaqXIdPRd9YQ+Yx9xRIIIPu3Jp/bpbiZBKYDJSbr/2Xago7sb9nnfSyjTSnucUcIP ZVChn6hKneVGBI2DT9yyyD3PmCEJmEzA8Y96qT83JmVH2GaPSSbCw0C+Zj1s/zqtKUbwE5zh8uuZ p4vC019QbaIOb8cGlzgvTqGORwK0gwDYpOO6QQdg5d03WvIHwTunnJdoLrfvqUg2vOlpqJmqR+nH 9lHS+bEstsVJtZieU1Pa+3Lzf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