From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=203.29.241.158 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796363072; b=ZVOYyu1MSifg1tpyUTK3FYL5Az9YWoebKTsK2IQt34kQ9FA+DcHWrnBr7gSc/ODfY84l tzRafVgiAkgkT5qufAupXohEn2xIo+c4IiewbrSHsY9fACvDA0Cyx8HbmJ8MukMOyFNwq 4LPJsJw/9/El1DYK9yesAIZUQ5WImiUKFNx3Xu9UDuLu2jBLNCWffxKtXxn2ckR6dg//q A8QfPYzedAd8VgZv1CF5Cic6gDiy2i4S6bRXTH0YNoLBYAg/bex3xvkr7vC0P2xqvZwHx 7NvpDohPXVHpLal98PUqxouUxO4l2W849Cps1TyU6L3efdSEHq1D7Gq/AIb3H3zs0Nw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796363072; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Subject:From:To:Cc: Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding: User-Agent:MIME-Version; bh=kgrPtAfZFAOm0Lp+lESJ3JRZzUbzXB7l96G5QC0RBHI=; b=U6zly5FfD016sYHAUhk8XOyFbaQNIeQcJKsNwH2Q7H8Px3IatGW9mLl8zTCDGc0B7XXo WY/vKcAlo2e/mut6MaehrnmmtZF8uVGzeZCrf14xbWr4avuKYFk8s9seG6jWNTWZzcn0D qhlj75drW7spwXu67dkwSL/U5oFScjRpvz12Ed2uiv+CmBi6Vt6ontj7OEpowUH7qBdC3 9nV9BECvuXz4AEEg/x3Mk79F/7/9xWaomSenVEt4vtkgyn0CZUj0rbdEbcFykdwhIFQD5 uHcv0eUC+ZZxLLXqk8oMc1YBUAtPZ/cQcZPHPsabe9zwwT1aX24Ijb/4R3jH2nrwNrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=codeconstruct.com.au; spf=pass smtp.mailfrom=codeconstruct.com.au; dkim=pass header.d=codeconstruct.com.au header.i=@codeconstruct.com.au header.a=rsa-sha256 header.s=2022a header.b=OnK+oHLs; arc=none smtp.remote-ip=203.29.241.158 Received: from codeconstruct.com.au (pi.codeconstruct.com.au [203.29.241.158]) (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 025E4606A322; Fri, 4 Dec 2026 05:44:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 025E4606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codeconstruct.com.au Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) 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; 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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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