Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp324362imn; Thu, 28 Jul 2022 01:34:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1up+n5mkFezWFdsqMRaQhiqEeyErwoZGnpId20TZIFbOVlieMDzFhn5F2HDuqJ2SM/PF/uj X-Received: by 2002:a17:906:9b0a:b0:72e:e524:180a with SMTP id eo10-20020a1709069b0a00b0072ee524180amr20637235ejc.131.1658997286903; Thu, 28 Jul 2022 01:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658997286; cv=none; d=google.com; s=arc-20160816; b=nAeANQcLXZtiIwkFfkQUBl5jBOIKdxeqTS/lcQzbV6J81pwWR6L2a/p+tznrrndg60 jsPMK2ONdR5PgyZR3txMRbpYscu+FX0fgJjc80Gxm/qP8HCYAytKBut2NcnBxs30CW3e KxlIwU6LHRRATod6sD1Sj8qa9pe1Cn8MD2wL2dLlm4vFT3l9aIzipKn4CtjIxWSrsHIj U9LRzbrXufcKYoIU0rUeX4naXzQLqJb230CDI16aoZz6irGhywf2ZJqavIgV67dIp5JY FQUj1UicO303DXQBzH9/h/xuypzgq1iqEmRk2zsyUsAfNL+pS3lwxa/zMObcnk91AZne Rshw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=8q7DQdjLoDUe+5x9sg3wSvBUceLOZ06B9ksMwVyQsAQ=; b=yhem06tnA4GrfeSmuRAklQi4oKaGogz4Jcbb6PB3JoBondv3/yRnYAWTBIufmZ/bV8 Cuadj+XxOu2CU6aT9Erxu3XybEMP7RrJsDQYAqw2f+diy3FTduSTqk4H09RREWnn403p JIZPmAgaXLUYdPLrjZL7AVA69tVWpjFTLhrIbgdCmA3UIv4A3C2a/W7bvnSXT4OnPlxS 68DP1EGtqHkfGiepAz1INLocV2045RwxAQURAdTH6CsiDq/8NcLELc+RY6RUgQb/CLtB faKoqR17Y7PCS1hGox2K1+su6MVXrgCN/v1u5JjenZfiX5DiGQ+v07KwZrcpCid8x+9r yuuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a05640211ce00b0043c158735b6si373231edw.108.2022.07.28.01.34.20; Thu, 28 Jul 2022 01:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235164AbiG1IXk (ORCPT + 99 others); Thu, 28 Jul 2022 04:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235155AbiG1IXg (ORCPT ); Thu, 28 Jul 2022 04:23:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A80C06248D; Thu, 28 Jul 2022 01:23:35 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9A83106F; Thu, 28 Jul 2022 01:23:35 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DDF8F3F73B; Thu, 28 Jul 2022 01:23:32 -0700 (PDT) Date: Thu, 28 Jul 2022 09:23:30 +0100 From: Sudeep Holla To: Maximilian Luz Cc: Andy Gross , Bjorn Andersson , Sudeep Holla , Ard Biesheuvel , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Steev Klimaszewski , Shawn Guo , Cristian Marussi , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-efi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] dt-bindings: firmware: Add Qualcomm UEFI Secure Application client Message-ID: <20220728082330.w4ppmzvjaeywsglu@bogus> References: <20220723224949.1089973-1-luzmaximilian@gmail.com> <20220723224949.1089973-5-luzmaximilian@gmail.com> <20220726143005.wt4be7yo7sbd3xut@bogus> <829c8fee-cae5-597d-933d-784b4b57bd73@gmail.com> <20220726154138.74avqs6iqlzqpzjk@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 26, 2022 at 07:01:28PM +0200, Maximilian Luz wrote: > On 7/26/22 17:41, Sudeep Holla wrote: > > On Tue, Jul 26, 2022 at 05:15:41PM +0200, Maximilian Luz wrote: > > > > > > So ultimately I think it's better to add a DT entry for it. > > > > I disagree for the reason that once you discover more apps running on the > > secure side, you want to add more entries and update DT on the platform > > every time you discover some new firmware entity and you wish to interact > > with it from the non-secure side. > > Just as you'll have to add a driver to the kernel and update whatever is > probing the TrEE interface and add those strings to that interface. If > you then start doing SoC-specific lists, I think you'd be pretty much > re-implementing a DT in the kernel driver... > Yes at the cost of DT being dumping ground for all the SoC specific firmware crap. Firmware can be and must be discoverable, no point in dumping it in DT as it forces DT upgrade every time something changes in the firmware i.e. it can go out of sync quite quickly. > I don't quite understand why this is a problem. I think per device, > there's a reasonably limited set of apps that we would want to interact > with from the kernel. And for one single device, that set doesn't change > over time. So what's the difference to, say, an I2C device? > As I said we don't want DT to be dumping ground for all the not well designed firmware interface. The whole point of firmware being another piece of software that can be change unlike hardware makes it fragile to present any more that what you need in the DT. I see this as one of the example. Anyways I don't have the final say, I leave it to the DT maintainers. > > As along as get this application ID can handle any random name, I prefer > > to use that as the discover mechanism and not have this DT. > > Apart from the above, some apps must also be loaded from the system. And > those you can't detect: If an app isn't running, it doesn't have an ID > (uefisecapp and the tpm app are loaded by the firmware at boot). Those > are mostly vendor-specific things as far as I can tell, or HDCP stuff. > So you'd need to specify those as firmware somehow, and since (as far as > I can tell) those are signed specifically by/for that vendor and > potentially device (similar to the GPU zap shader or remoteproc > firmware), you'll need to use per-device paths. > Sounds to me like more can be pushed to user space as it gets loaded at runtime. > That means you either hard-code them in the driver and have a compatible > per model, do DMI matching, or something similar (again, essentially > baking DTs into the kernel driver...), or just store them in the DT > (like we already do for GPU/remoteprocs). While you could hard-code some > known loaded-by-firmware apps and use the DT for others, I think we > should keep everything in the same place. > Worst case I am fine with that as this needs to be one of and future platforms must get their act right in designing their f/w interface. -- Regards, Sudeep