Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2446126rdg; Mon, 16 Oct 2023 05:03:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtXQOhtMCnkJi+DfgsTpXu85P2s8X5rApoKlO9q3v4v06/QLE/tVf8A5qcPz3h+UweH8Mw X-Received: by 2002:a05:6a00:2404:b0:68a:45a1:c0ee with SMTP id z4-20020a056a00240400b0068a45a1c0eemr37986063pfh.15.1697457818682; Mon, 16 Oct 2023 05:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697457818; cv=none; d=google.com; s=arc-20160816; b=Y8RKYCNu3+FnUdylYUxOpIq3fi6eHmaJtZr1lpPMVUZMgauw1w5rx+DowPcjPpY/HI n8zLALNSq/Tfd9OPczHxaNoFrWBBxFlSub6b7Z4Fr31fQyHaMvpAoN2eog+Ogt/1sfWt DJJtDtvsQ5L6vroqUCn5yTHNIBvsEm+pJvjEuw4EYbwqUnaRRq27JHlSSmmeRGrwsbCh FSMFoNoDxdQKtAIpLIE9Wb8v8Z90wrgVPPejOayPqQ2UwdSgYh8Ru4z7Ld+8/pzdGxVG hVuEopPGtAex558CiNsY6h9T9ckMyRmtdtZJzuuWUrMYo7C+2aEGNHQbnrgl8yuGLoF+ kvXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=GEtT1vGNrN2L3qXSsS6BjSB5ruMmKsplVyDRLRyeo9Y=; fh=VX+qCZgcOL42z5bWi5HqzKBjMBdGjtxGfGqqCFIerBI=; b=H/JN/fhzNFAzpaYSnGbovEjUw7xZxhnpmEO0KA9AIve9tizbTpVC97aorpTUTy2kZp u7EWnqH1b7UBt0JMRzLEVl3d/5iZrjdM8t1aaG+9WLnYq4QMloYZFJ16T1lnQwQWkpDS yykS9WExoiIE+yDQxVBjDPPdNlE/cYAhoyuvJvct2qTv2PURMerpukr6PVXrWui2JPQ4 WyHMc10t/Aoe8bUaWe/H3PlDHXn6gy6CS+XKDMUwmAU8bPcYBHyvaywG/NCHD8Z1cyWv Y6oyVTr5IA791eMdgDfuvLe5ouFjQk2WA/u4xpY0uKL/VY/fv8DgI1xh8ZSki+tCJWs9 fUxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1J98O2Dj; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id b6-20020a056a00114600b00690f9e835d8si22544417pfm.132.2023.10.16.05.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 05:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1J98O2Dj; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AA11D802B81E; Mon, 16 Oct 2023 05:03:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbjJPMDd (ORCPT + 99 others); Mon, 16 Oct 2023 08:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjJPMDc (ORCPT ); Mon, 16 Oct 2023 08:03:32 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C840AE6; Mon, 16 Oct 2023 05:03:29 -0700 (PDT) Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 39G7h1Um007323; Mon, 16 Oct 2023 14:02:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:date:mime-version:from:subject:to:cc:references :in-reply-to:content-type:content-transfer-encoding; s= selector1; bh=GEtT1vGNrN2L3qXSsS6BjSB5ruMmKsplVyDRLRyeo9Y=; b=1J 98O2DjQg2zsjt4f510btLN/TCgkmPUp32hr+x1F3zVIG6OoZLfC3Cbyjc01lX9nZ VSS73Gn48GLdu2Pj2PdtzQCh6rQpYFXh63DE6xW8H+rsFN1zzvxxEYZ+i7yOrOVy 1ybut4hcc4ZKwAQt8fVMxknPbllcUus7znWDRJmPQvi1rHJqIrPWzqu6PICGgi4T lPhNG+AgOBhZOVBNR4OCi7G99qM+FbpiuaYRVCuRKuOTObDyKtkIfcpdvYv/o3Zu vwBRb1d9cJyQS7368vGtITam91qeWebiryaExexOXLeN9hsY/CpxbuHNjAGKdma9 ZC1Ob39vbFcYhfvYRXtg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3tr4hyn1db-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Oct 2023 14:02:47 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3AB9A10005B; Mon, 16 Oct 2023 14:02:45 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id A384A22F7D3; Mon, 16 Oct 2023 14:02:45 +0200 (CEST) Received: from [10.201.20.32] (10.201.20.32) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 16 Oct 2023 14:02:43 +0200 Message-ID: Date: Mon, 16 Oct 2023 14:02:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Gatien CHEVALLIER Subject: Re: [PATCH v6 10/11] ARM: dts: stm32: add ETZPC as a system bus for STM32MP15x boards To: Rob Herring CC: , , , , , , , , , , , , , , , , , , , , , , , , Frank Rowand , , , , , , , , , , , , , , , , , References: <20231010125719.784627-1-gatien.chevallier@foss.st.com> <20231010125719.784627-11-gatien.chevallier@foss.st.com> <20231010184212.GA1221641-robh@kernel.org> <8f1b6915-68be-a525-c5d5-37f0983c14de@foss.st.com> <20231012153012.GA698406-robh@kernel.org> Content-Language: en-US In-Reply-To: <20231012153012.GA698406-robh@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.201.20.32] X-ClientProxiedBy: EQNCAS1NODE3.st.com (10.75.129.80) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-16_05,2023-10-12_01,2023-05-22_02 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 05:03:34 -0700 (PDT) Hi Rob, On 10/12/23 17:30, Rob Herring wrote: > On Wed, Oct 11, 2023 at 10:49:58AM +0200, Gatien CHEVALLIER wrote: >> Hi Rob, >> >> On 10/10/23 20:42, Rob Herring wrote: >>> On Tue, Oct 10, 2023 at 02:57:18PM +0200, Gatien Chevallier wrote: >>>> ETZPC is a firewall controller. Put all peripherals filtered by the >>>> ETZPC as ETZPC subnodes and reference ETZPC as an >>>> access-control-provider. >>>> >>>> For more information on which peripheral is securable or supports MCU >>>> isolation, please read the STM32MP15 reference manual. >>>> >>>> Signed-off-by: Gatien Chevallier >>>> --- >>>> >>>> Changes in V6: >>>> - Renamed access-controller to access-controllers >>>> - Removal of access-control-provider property >>>> >>>> Changes in V5: >>>> - Renamed feature-domain* to access-control* >>>> >>>> arch/arm/boot/dts/st/stm32mp151.dtsi | 2756 +++++++++++++------------ >>>> arch/arm/boot/dts/st/stm32mp153.dtsi | 52 +- >>>> arch/arm/boot/dts/st/stm32mp15xc.dtsi | 19 +- >>>> 3 files changed, 1450 insertions(+), 1377 deletions(-) >>> >>> This is not reviewable. Change the indentation and any non-functional >>> change in one patch and then actual changes in another. >> >> Ok, I'll make it easier to read. >> >>> >>> This is also an ABI break. Though I'm not sure it's avoidable. All the >>> devices below the ETZPC node won't probe on existing kernel. A >>> simple-bus fallback for ETZPC node should solve that. >>> >> >> I had one issue when trying with a simple-bus fallback that was the >> drivers were probing even though the access rights aren't correct. >> Hence the removal of the simple-bus compatible in the STM32MP25 patch. > > But it worked before, right? So the difference is you have either added > new devices which need setup or your firmware changed how devices are > setup (or not setup). Certainly can't fix the latter case. You just need > to be explicit about what you are doing to users. > I should've specified it was during a test where I deliberately set incorrect rights on a peripheral and enabled its node to see if the firewall would allow the creation of the device. > >> Even though a node is tagged with the OF_POPULATED flag when checking >> the access rights with the firewall controller, it seems that when >> simple-bus is probing, there's no check of this flag. > > It shouldn't. Those flags are for creating the devices (or not) and > removing only devices of_platform_populate() created. > About the "simple-bus" being a fallback, I think I understood why I saw that the devices were created. All devices under a node whose compatible is "simple-bus" are created in of_platform_device_create_pdata(), called by of_platform_default_populate_init() at arch_initcall level. This before the firewall-controller has a chance to populate it's bus. Therefore, when I flag nodes when populating the firewall-bus, the devices are already created. The "simple-bus" mechanism is not a fallback here as it precedes the driver probe. Is there a safe way to safely remove/disable a device created this way? Devices that are under the firewall controller (simple-bus) node should not be probed before it as they're child of it. Best regards, Gatien >> of_platform_populate() checks and sets the OF_POPULATED_BUS flag. >> Maybe that is my error and the firewall bus populate should set >> OF_POPULATED_BUS instead of OF_POPULATED. Is that correct? > > Shrug. Off hand, I'd say probably not, but am not certain. > > Rob