From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E91BA606A32F for ; Fri, 4 Dec 2026 05:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=gDn8+7XS; dkim=pass (2048-bit key) header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.a=rsa-sha256 header.s=2022a header.b=OnK+oHLs DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Date:Cc:To:From :Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=kgrPtAfZFAOm0Lp+lESJ3JRZzUbzXB7l96G5QC0RBHI=; b=gDn8+7XSIwox4rN4N3oc68F5Xs vAc08Dt8zdX/izO4OVls+hN0PWwIrXVs4JdGUz/CmTTpAyBRUWxv+4XIr9Ay3w4yKVSNgdzkL10AL Tfse57GSedS7upHhlmFLJBGXdUbwP8avEg6I+iwo754Eso+e72xJvfv1nUwTxnih+HJBwUYhtWcfS fa1nE9Scos7ZNBy9/HFwZV0lC4xNSB3Ms58myvuDYIxOTkX1iKc8wCYHM2m45UCAgobzugCKcgcGu ALgZ9nd3w1wvoAL05JVvEUIeVL1ebEP/cgc3gY65jp/k9R4yENrTAF98wu/sY6x8o93IDymZMlkJd 6PvUaEBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZM6A-0000000GiiK-1xfd; Fri, 04 Dec 2026 05:44:46 +0000 Received: from pi.codeconstruct.com.au ([203.29.241.158] helo=codeconstruct.com.au) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZM60-0000000Gihg-0Pfp for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 05:44:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeconstruct.com.au; s=2022a; t=1796363069; bh=kgrPtAfZFAOm0Lp+lESJ3JRZzUbzXB7l96G5QC0RBHI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=OnK+oHLss6FQ65t6ABSIZfXLNeBdNXxJTcQvtIrvupvVqQhTn4Zdi/nPG3XkiyRSn bjfuD8L1wxYBYZkPz9HyZBulA+722v05Q+hJo4NTnI3jatVddXt1UlQKUVGIp8Jt6X vo+cUZSvjr+H439ZYYZn8Y4VsRSj9Eoy0PZJsCQGCxuwOnurdwljV05Ux0XoNMKIkg 1r5zda6gMzrxuJfFQNNqbfg3TbLMKn8sFpxqGpPsBKi/4wjzAcgz3TYN5kNN9RfAZ3 wmPi+MLHiOY8kiT5pg1uyL7gwmCu1p6zegOfGFtiWEmMYgmsMAjOll8eCoX5DB0vQB tYZaE6qbJxJVw== Received: from [192.168.68.117] (unknown [180.150.112.139]) by mail.codeconstruct.com.au (Postfix) with ESMTPSA id 104AB60016; Fri, 4 Dec 2026 13:44:27 +0800 (AWST) Message-ID: Subject: Re: [PATCH v4 2/2] nvmem: aspeed: Add read-only AST2600 OTP support From: Andrew Jeffery To: Prasanth Cc: Srinivas Kandagatla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Ryan Chen , Billy Tsai , Neal Liu , Tan Siewert , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Fri, 04 Dec 2026 16:14:26 +1030 In-Reply-To: References: <20261127025817.20090-1-prasanth.padarthi10@gmail.com> <20261127025817.20090-3-prasanth.padarthi10@gmail.com> <9c7e2c877422850b71221efc3c1316157e563a90.camel@codeconstruct.com.au> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-0+deb13u1 X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_214440_061219_A6EFCC6D X-CRM114-Status: GOOD ( 18.02 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Prasanth, On Fri, 2026-12-04 at 07:21 +0530, Prasanth wrote: > Hi Andrew, >=20 > Thanks for the detailed review. I=E2=80=99ll address these points in the = next revision. > - fix the continuation indentation and unwrap the short bounds check. > - use readl_poll_timeout() for idle polling. The 1 =C2=B5s delay will > remain only after issuing an OTP command, as required by ASPEED=E2=80=99s > clarification. > - reject odd addresses in the internal pair-read helper. Public reads > may still begin at an odd word by selecting the containing even pair. > - move offset and length validation into the helper that performs the > arithmetic and copying, while preserving zero-length success and > overflow-safe bounds checks. > - ensure the failure latch is checked before any further controller > operation. Probe already stops after the first initialization failure > and only performs relock cleanup. > - consider the mutex annotations and context-analysis support for > state protected by the mutex. > - inline the single-use initialization helper if that makes the flow clea= rer. > - use devm_kzalloc_obj() if there is no compatibility concern with the > supported kernel baseline. >=20 > The probe-time NVMEM keepout covers the fixed CONF0 range. Neal > confirmed that SEC54 can increase until an ARM reset, including while > Linux is running, >=20 Sure, but what actually increases it? Nothing I saw in the driver does so. > and recommended checking it on each read. > https://lore.kernel.org/linux-aspeed/KL1PR0601MB3986A356BD06F98D0FF9AD5E8= 0792@KL1PR0601MB3986.apcprd06.prod.outlook.com/ I don't think we should be accounting for it changing outside of the driver's control. > If SEC54 grows after probe and a request falls within the newly > protected range, would you prefer the driver to return -EACCES before > issuing the read, or rely on the controller=E2=80=99s response? If we can't rely on the controller's response here I wonder how we rely on the controller at all? Can you describe its behaviour when you try accessing the secure region? Andrew