From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
robh+dt@kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org, Daniele.Palmas@telit.com,
bjorn.andersson@linaro.org
Subject: Re: [PATCH v10 3/4] mtd: rawnand: Add support for secure regions in NAND memory
Date: Fri, 2 Apr 2021 19:57:30 +0530 [thread overview]
Message-ID: <20210402142730.GA10498@work> (raw)
In-Reply-To: <20210402105154.0a2a3af5@collabora.com>
On Fri, Apr 02, 2021 at 10:51:54AM +0200, Boris Brezillon wrote:
> On Thu, 1 Apr 2021 21:46:22 +0530
> Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote:
>
> > On Thu, Apr 01, 2021 at 05:54:21PM +0200, Boris Brezillon wrote:
> > > On Thu, 1 Apr 2021 20:49:54 +0530
> > > Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> wrote:
> > >
> > > > @@ -565,6 +608,11 @@ static int nand_block_isreserved(struct mtd_info *mtd, loff_t ofs)
> > > >
> > > > if (!chip->bbt)
> > > > return 0;
> > > > +
> > > > + /* Check if the region is secured */
> > > > + if (nand_region_is_secured(chip, ofs, 0))
> > > > + return -EIO;
> > >
> > > That would is still wrong, you should never pass a 0 size to
> > > nand_region_is_secured().
> > >
> >
> > Size doesn't matter here, that's why I passed 0. Maybe 1 would be
> > appropriate?
>
> You're checking if a block is reserved, so I think passing the
> eraseblock size would make more sense, but I actually don't understand
> why you need to check if the region is secure here (looks like
> nand_block_isreserved() does not access the flash).
>
Ah yes indeed, brain fade...
Thanks,
Mani
next prev parent reply other threads:[~2021-04-02 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 15:19 [PATCH v10 0/4] Add support for secure regions in NAND Manivannan Sadhasivam
2021-04-01 15:19 ` [PATCH v10 1/4] dt-bindings: mtd: Convert Qcom NANDc binding to YAML Manivannan Sadhasivam
2021-04-01 15:19 ` [PATCH v10 2/4] dt-bindings: mtd: Add a property to declare secure regions in NAND chips Manivannan Sadhasivam
2021-04-01 15:19 ` [PATCH v10 3/4] mtd: rawnand: Add support for secure regions in NAND memory Manivannan Sadhasivam
2021-04-01 15:54 ` Boris Brezillon
2021-04-01 16:16 ` Manivannan Sadhasivam
2021-04-02 8:51 ` Boris Brezillon
2021-04-02 14:27 ` Manivannan Sadhasivam [this message]
2021-04-01 15:19 ` [PATCH v10 4/4] mtd: rawnand: qcom: Add missing nand_cleanup() in error path Manivannan Sadhasivam
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=20210402142730.GA10498@work \
--to=manivannan.sadhasivam@linaro.org \
--cc=Daniele.Palmas@telit.com \
--cc=bjorn.andersson@linaro.org \
--cc=boris.brezillon@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).