Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp939834lqo; Wed, 8 May 2024 22:55:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUh7owSUyxDjkGr9jLq63Pe4M5xHDeyywNxMo0a3eA3CTnRDw82l7bkvI4Qmxzmwg6fhaFNm3oi46ICeMm8AXCDWrrf/0prONtUn6+D6A== X-Google-Smtp-Source: AGHT+IHl2bZz6zx4KsNj90aAfNpYMdg+3yHU3qr9qtGS8aWUzhPokKGTXN2NYTqj7fB2DOE+W3Qm X-Received: by 2002:a05:6358:3406:b0:18b:604a:99a9 with SMTP id e5c5f4694b2df-192d3158679mr507010955d.19.1715234102443; Wed, 08 May 2024 22:55:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715234102; cv=pass; d=google.com; s=arc-20160816; b=UkOA0ivmwnsRKzF7TRwRuIuiF6XZe+T/BrmXMC+44Omo6Jl9SD2rj5+4h/EK3IOzUv 9LuCKcIF3v/o22fdopii9AWPBp9D9Z0siLQlMwJpaczBSYUxRWL19p2CEOiBLOnmXHm7 ZAqr/2mYoSeb4A29Mk8jBiKqIkkC62oEEU+VqmIYvVm6MLSMo6eTSm9R6plX4UC5NmTu 9ElgTLFvK+G+tpOLg+gft9cJXj815zb1ARJbutPeS+i5iJGz4jzh24dAV7+HfAJvYoQr Y4VcQZI5hII8+FyE/wTHiXzFPwRM5Z3MK60IVVy6ujq3/2+U1dTYsKheTO6GXqwc/5dQ g6aw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=veqrih/6/WhpwYWHvweGIEPPuN0PZhWJ+ZLcnj+myFs=; fh=NrU0ZMuO/22HYLKISZayYwJdwicxxM1iM5UO0iyVOjo=; b=j6C16kSnW1Yj4fYMqUU0F6Z7KQ+O4xmnMyztXwHLHwSgbNxUAoXQjFoD2nV33l/nlj YlVACdiDQ773yNj9IH+QUSUOp/6ZbiaXxtXu/ZseTHAVfzSEwFt9djKSJSOsHgzRJByD HUdBil0UZSUKKaVQeH6AmIOLAHehwdydBCkQCuQ/PEPG8FlpZbkBSz0KAkVoraFC4Eft 4PulpEeyQCJTShCqW11VVn9+QPXUa7G+PQ/nZD0PpQ7wU/VBj7Tm0dmoE4sM3T4/CuLM xaEjWuo8lLwOuqUluBRqYEro1F+HpDP8cOxzcnSAe8zWzPLzCrBddEaOMUM743lyG0aA R4Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M5uTbjO7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-63411719338si729043a12.491.2024.05.08.22.55.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 22:55:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M5uTbjO7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-174171-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D024CB20E94 for ; Thu, 9 May 2024 05:51:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC3C11494BE; Thu, 9 May 2024 05:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M5uTbjO7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4CEE1A2C2A; Thu, 9 May 2024 05:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715233873; cv=none; b=UVWsx7zP5PFfdVclzEv6o+E4QaaslF7b4KspheZhbH20lv6TBK6oxZP5YSWIlLiuQ8jEfae3NyY44l1QXMj55ScxwWPAaiIJ0L+pHZMgtL4jtFeEPAeuWvjkVtAzYFqdaZr8AeXy9WcVR8qoVZZr5swE4txpgXxO1ks7hjfnLq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715233873; c=relaxed/simple; bh=JrahC9u3iZ2EEYCRi1f+9st8RuDxEJwQs/PRe7O4KYw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ko4mnI9o1RR0VrEtFIrUnIt0CpWhA0i3dqBn6A5627NKmUJoB1CVFSiRd6854m6lPYJaJpufn9GL+J+29/pBMRdAzafG5R1LC9FeHRxLLCly0YAbdS8WqmsclXdUJ9fu6SrXoovzr5CnwFBNbtxhWCyLJ4XQa0XhG/1FE6uxUTM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M5uTbjO7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86399C116B1; Thu, 9 May 2024 05:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715233873; bh=JrahC9u3iZ2EEYCRi1f+9st8RuDxEJwQs/PRe7O4KYw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=M5uTbjO7YOZrR6uyg9Ln6X3dHgEXn5rzLsp44/fz/cE0Da+km5F8Sb+XR3IbzwjSP GvUEHkNWvlg0RTFy5SVFO+220c2Xs69+7rjaie0iu6gJFz3qD1A08of+OeHt7THvEo ZvFeAterHuHXDbZrFXpmEy6MQsTbkouyKQz6LMG2teauAQwGhbYSdmOcNcjb7BVaVp OIfX5jnu3mhxQ53HUGjQFbZPRVNd0RbrxDTjBiin/Vo5glWlUPLR/yS6ijzjDUkKlu c/xlhNJQXBv2iLaEd4WkpfDX3n5qYqXCdf7jwjwp2Tdh+olMQZHMsi273EBKgm0eC5 Maf7OUf7KR42Q== Message-ID: <81241dde-da0a-4817-90f4-37741d652600@kernel.org> Date: Thu, 9 May 2024 07:51:04 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] soc: imx: secvio: Add secvio support To: Vabhav Sharma , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Franck LENORMAND , Dong Aisheng , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Peng Fan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Varun Sethi , Silvano Di Ninno , Pankaj Gupta , frank.li@nxp.com, daniel.baluta@nxp.com, Iuliana Prodan , Horia Geanta References: <20240509-secvio-v1-0-90fbe2baeda2@nxp.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl7p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NSr+CLMdnRBY fv0= In-Reply-To: <20240509-secvio-v1-0-90fbe2baeda2@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 09/05/2024 02:45, Vabhav Sharma wrote: > The tampers are security feature available on i.MX products and > managed by SNVS block.The tamper goal is to detect the variation > of hardware or physical parameters, which can indicate an attack. > > The SNVS, which provides secure non-volatile storage, allows to > detect some hardware attacks against the SoC.They are connected > to the security-violation ports, which send an alert when an > out-of-range value is detected. > > This detection is done by: > -Analog tampers: measure analogic values > - External clock frequency. > - Temperature. > - Voltage. > > - Digital tampers: > - External tamper > - Other detectors: > - Secure real-time counter rollover tamper. > - Monotonic counter rollover tamper. > - Power supply glitch tamper. > > The on-chip sensors for voltage, temperature, and clock frequency > indicate if tamper scenarios may be present. These sensors generate an > out-of-range signal that causes a security violation to clear the > authentication and storage keys and to block access to sensitive > information. > > Add linux module secvio driver to handle security violation interrupt. > > The "imx-secvio-sc" module is designed to report security violations > and tamper triggering to the user. > > The functionalities of the module are accessible via the "debugfs" > kernel.The folder containing the interface files for the module is > "/secvio/". > > Get status > Reading from the "info" file will return the status of security: > - Fuse related to security tampers. > - SNVS readable registers. > - DGO registers. > > Signed-off-by: Vabhav Sharma > --- > Vabhav Sharma (4): > dt-bindings: firmware: secvio: Add device tree bindings > firmware: imx: Add SC APIs required for secvio module > soc: imx: secvio: Add support for SNVS secvio and tamper via SCFW > arm64: dts: imx8q: Add node for Security Violation Please version your patches correctly and provide changelog. I wrote about b4 already, which solves this as well. What changed here? Best regards, Krzysztof