Devicetree
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Prasanth <prasanth.padarthi10@gmail.com>
Cc: "Srinivas Kandagatla" <srini@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Joel Stanley" <joel@jms.id.au>,
	"Ryan Chen" <ryan_chen@aspeedtech.com>,
	"Billy Tsai" <billy_tsai@aspeedtech.com>,
	"Neal Liu" <neal_liu@aspeedtech.com>,
	"Tan Siewert" <tan.siewert@9elements.com>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] nvmem: aspeed: Add read-only AST2600 OTP support
Date: Fri, 04 Dec 2026 16:14:26 +1030	[thread overview]
Message-ID: <e92989540519f4c136dae00d8d1d7cdaf1530b5d.camel@codeconstruct.com.au> (raw)
In-Reply-To: <CAMFFDGgU2rVreDZp53e8Kviy247omqNJCLTRZrVv03nfCm7-SA@mail.gmail.com>

Hi Prasanth,

On Fri, 2026-12-04 at 07:21 +0530, Prasanth wrote:
> Hi Andrew,
> 
> Thanks for the detailed review. I’ll 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 µs delay will
> remain only after issuing an OTP command, as required by ASPEED’s
> 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 clearer.
> - use devm_kzalloc_obj() if there is no compatibility concern with the
> supported kernel baseline.
> 
> 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,
> 

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/KL1PR0601MB3986A356BD06F98D0FF9AD5E80792@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’s 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

      reply	other threads:[~2026-12-04  5:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  2:58 [PATCH v4 0/2] nvmem: aspeed: Add read-only AST2600 OTP support Prasanth Kumar Padarthi
2026-11-27  2:58 ` [PATCH v4 1/2] dt-bindings: arm: aspeed: sbc: Describe OTP NVMEM provider Prasanth Kumar Padarthi
2026-12-04  0:06   ` Rob Herring (Arm)
2026-11-27  2:58 ` [PATCH v4 2/2] nvmem: aspeed: Add read-only AST2600 OTP support Prasanth Kumar Padarthi
2026-12-04  1:00   ` Andrew Jeffery
2026-12-04  1:51     ` Prasanth
2026-12-04  5:44       ` Andrew Jeffery [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e92989540519f4c136dae00d8d1d7cdaf1530b5d.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --cc=billy_tsai@aspeedtech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neal_liu@aspeedtech.com \
    --cc=prasanth.padarthi10@gmail.com \
    --cc=robh@kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=srini@kernel.org \
    --cc=tan.siewert@9elements.com \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox