Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp462111pxa; Wed, 19 Aug 2020 06:26:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn0SYcz4Iebtozp+s5hpRSgoMyiH41Ko15JMHAXXixtt0YsxZJu6tK+K1niz2L7BCITWJM X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr24144614ejw.92.1597843611580; Wed, 19 Aug 2020 06:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597843611; cv=none; d=google.com; s=arc-20160816; b=0qMwD6fWGEXMoE/+C3M65Gyy0UAXSp4VEpl2IFkyRmtSIhpG7Q5AOtUo5Q8LHqr5bt 6/GI8Zod5XkB+SDFR6M5JBfvmZkTXYxk9NZLwD/3NzTQ6D8RCDityjHjNB+VIhtU2QUW LY6jmFE6CzDPCSgZRQph3CNWqIyiAIhKzQBnu1GZlXSAT0wGkpIVOAt0+sTcRxHdw4xg npF6V9HcvmtkPEoroeY68eXejJWmvPqtetjIwAn6sAojI/rlqDKdk38pyXRUZ+6TzEBr tQwM1v4bILl+VquaCFR527hPLkKaWiQ5KmwZ1653A/Q0Mzb6/oF/FD/61OPP42P212Xr CMkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ReADc5c9SpW1e3myIneavc8U0Kv2Jhd21P8Qt/xWKFk=; b=gcVDRtXI/eRgomiWI6l75do4tO30sbfdy2+BMbejJ5LKDGKnNqAUW1Rc5xC0MqG6Hc ccVwLcZGtdr6gd5lrwugpMw0fQODnUYO8tFaZHW7kljp91dUg7dPTJ4Khid+YeKjgzDq ZGBRAWD79wohtOMmfa39MFsFSUpdcSo1qtwj2s67kL14LCXz0RyUkugaRnYUjGwgR+XF ZCrlI0Z/qQIWqdGS5SGH2JGdRp545yRGUoqqKOGV0BDXQaljiEWfk2BofPcwR/9n7WxM GyA2GSi7muWem/X9QQZEYguyUROK2Tx9pgtx7yocXDSRLmIglMcnWDuG8xohmxXAbNCA ir5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EuDaDJ4F; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id od24si16048387ejb.630.2020.08.19.06.26.27; Wed, 19 Aug 2020 06:26:51 -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=@kernel.org header.s=default header.b=EuDaDJ4F; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728509AbgHSNXt (ORCPT + 99 others); Wed, 19 Aug 2020 09:23:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:36500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbgHSNXe (ORCPT ); Wed, 19 Aug 2020 09:23:34 -0400 Received: from dragon (unknown [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 170D9205CB; Wed, 19 Aug 2020 13:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597843413; bh=GUAK/3Erqnn4v6wmDx98GtQrAlIyBXmM7AhYh906syU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EuDaDJ4FYqnTEo41N6XrhzVujSM53sGEQYAhMSZjrC/NTp+E+XRXFxddwKP1wZ2Po UtW1kppzqKMmPWgTaTLRlKxTtvvsB2S9RknaW/qOE+t00MZ7UBbolUu+R+/VsJkOkL HZH9u8xjRg1IMeqtbAT+d+rr291T41+/20blr6BM= Date: Wed, 19 Aug 2020 21:23:19 +0800 From: Shawn Guo To: "Franck LENORMAND (OSS)" Cc: s.hauer@pengutronix.de, festevam@gmail.com, kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, aisheng.dong@nxp.com, abel.vesa@nxp.com, Anson.Huang@nxp.com, linux@rempel-privat.de, leonard.crestez@nxp.com, daniel.baluta@nxp.com, qiangqing.zhang@nxp.com, peng.fan@nxp.com Subject: Re: [PATCH v2 0/5] Add support of SECVIO from SNVS on iMX8q/x Message-ID: <20200819132317.GA7114@dragon> References: <1595344835-67746-1-git-send-email-franck.lenormand@oss.nxp.com> <1597737122.73802.3.camel@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1597737122.73802.3.camel@oss.nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 09:52:02AM +0200, Franck LENORMAND (OSS) wrote: > Hello, > > Peng was able to do a firt pass of review on my patchset which led to this > second version. I hope a maintainer will be able to take a look at this > patchset once rested after all the work they did for 5.9. @Peng, are you okay with this version? @Aisheng, have a review on this? Shawn > > On mar., 2020-07-21 at 17:20 +0200, franck.lenormand@oss.nxp.com wrote: > > From: Franck LENORMAND > > > > This patchset aims to add support for the SECurity VIOlation (SECVIO) of the > > SNVS. A secvio is a signal emitted by the SNVS when a hardware attack > > is detected. On imx8x and imx8q SoC, the SNVS is controlled by the > > SECO and it is possible to interact with it using the SCU using the SC APIs. > > > > For the driver to communicate with the SNVS via the SCU and the SECO, I had to: > > ?- Add support for exchange of big message with the SCU (needed for > > imx_scu_irq_get_status) > > ?- Add API to check linux can control the SECVIO (imx_sc_rm_is_resource_owned) > > ?- Add APIs for the driver to read the state of the SECVIO registers of the > > SNVS and DGO (imx_sc_seco_secvio_enable and imx_sc_seco_secvio_enable). > > > > To check the state of the SECVIO IRQ in the SCU, I added the > > imx_scu_irq_get_status API. > > > > The secvio driver is designed to receive the IRQ produced by the > > SNVS in case of hardware attack and notify the status to the > > audit framework which can be used by the user. > > > > The goal of the driver is to be self suficient but can be extended by the > > user to perform custom operations on values read (imx_sc_seco_secvio_enable) > > > > v2: > > ?- Removed (firmware: imx: scu-rm: Add Resource Management APIs) > > -> Code required is already present > > ?- Removed (firmware: imx: scu: Support reception of messages of any size) > > -> The imx-scu is already working in fast-ipc mode > > ?- (soc: imx8: Add the SC SECVIO driver): > > - Fixed the warnings reported by kernel test robot > > > > Franck LENORMAND (5): > > ? firmware: imx: scu-seco: Add SEcure Controller APIS > > ? firmware: imx: scu-irq: Add API to retrieve status of IRQ > > ? dt-bindings: firmware: imx-scu: Add SECVIO resource > > ? dt-bindings: arm: imx: Documentation of the SC secvio driver > > ? soc: imx8: Add the SC SECVIO driver > > > > ?.../bindings/arm/freescale/fsl,imx-sc-secvio.yaml??|??34 + > > ?drivers/firmware/imx/Makefile??????????????????????|???2 +- > > ?drivers/firmware/imx/imx-scu-irq.c?????????????????|??37 +- > > ?drivers/firmware/imx/imx-scu.c?????????????????????|???3 + > > ?drivers/firmware/imx/seco.c????????????????????????| 275 +++++++ > > ?drivers/soc/imx/Kconfig????????????????????????????|??10 + > > ?drivers/soc/imx/Makefile???????????????????????????|???1 + > > ?drivers/soc/imx/secvio/Kconfig?????????????????????|??10 + > > ?drivers/soc/imx/secvio/Makefile????????????????????|???3 + > > ?drivers/soc/imx/secvio/imx-secvio-audit.c??????????|??39 + > > ?drivers/soc/imx/secvio/imx-secvio-debugfs.c????????| 379 +++++++++ > > ?drivers/soc/imx/secvio/imx-secvio-sc-int.h?????????|??84 ++ > > ?drivers/soc/imx/secvio/imx-secvio-sc.c?????????????| 858 +++++++++++++++++++++ > > ?include/dt-bindings/firmware/imx/rsrc.h????????????|???3 +- > > ?include/linux/firmware/imx/ipc.h???????????????????|???1 + > > ?include/linux/firmware/imx/sci.h???????????????????|???5 + > > ?include/linux/firmware/imx/svc/seco.h??????????????|??73 ++ > > ?include/soc/imx/imx-secvio-sc.h????????????????????| 177 +++++ > > ?18 files changed, 1991 insertions(+), 3 deletions(-) > > ?create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,imx-sc- > > secvio.yaml > > ?create mode 100644 drivers/firmware/imx/seco.c > > ?create mode 100644 drivers/soc/imx/secvio/Kconfig > > ?create mode 100644 drivers/soc/imx/secvio/Makefile > > ?create mode 100644 drivers/soc/imx/secvio/imx-secvio-audit.c > > ?create mode 100644 drivers/soc/imx/secvio/imx-secvio-debugfs.c > > ?create mode 100644 drivers/soc/imx/secvio/imx-secvio-sc-int.h > > ?create mode 100644 drivers/soc/imx/secvio/imx-secvio-sc.c > > ?create mode 100644 include/linux/firmware/imx/svc/seco.h > > ?create mode 100644 include/soc/imx/imx-secvio-sc.h > > >