All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Yadav <pratyush@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	 Michael Walle <mwalle@kernel.org>,
	 Takahiro Kuwano <takahiro.kuwano@infineon.com>,
	Richard Weinberger <richard@nod.at>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 Jonathan Corbet <corbet@lwn.net>,
	 Tudor Ambarus <tudor.ambarus@linaro.org>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Sean Anderson <sean.anderson@linux.dev>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Steam Lin <STLin2@winbond.com>,
	linux-mtd@lists.infradead.org,  linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org,  stable@kernel.org
Subject: Re: [PATCH v6 00/28] mtd: spi-nor: Enhance software protection
Date: Tue, 26 May 2026 17:35:23 +0200	[thread overview]
Message-ID: <2vxz8q964210.fsf@kernel.org> (raw)
In-Reply-To: <20260526-winbond-v6-18-rc1-spi-nor-swp-v6-0-4092f1419f8f@bootlin.com> (Miquel Raynal's message of "Tue, 26 May 2026 16:56:24 +0200")

On Tue, May 26 2026, Miquel Raynal wrote:

> Hello,
>
> Back in October 2025, the "locking" support in SPI NOR was discussed on
> the mailing list (link below). The conclusion was that this support
> could benefit from some enhancements. As I myself had to dig into it,
> here is a proposal.
>
> First issue that I see, the MEMLOCK ioctl is not behaving correctly
> in some cases, as addressed in:
>
>     mtd: spi-nor: swp: Improve locking user experience
>
> Then there is no clear explanation of the shortcuts taken by the kernel
> in terms of uAPI, so there is an attempt to list them in:
>
>     mtd: spi-nor: swp: Explain the MEMLOCK ioctl implementation behaviour
>
> Plus, Tudor also asked if we could cover locking in the testing
> procedure, which is done in:
>
>     mtd: spi-nor: Add steps for testing locking support
>
> In order to simplify this procedure, and because it got very helpful
> during my testing/development, I want to propose additions to the
> debugfs output:
>
>     mtd: spi-nor: debugfs: Add locking support TODO: make the captures again
>
> Finally, I am providing an implementation for the complement (CMP)
> feature in order to allow finer control of the regions locked. This
> feature is for instance available on Winbond chips:
>
>     [core] mtd: spi-nor: swp: Add support for the complement feature
>     [doc]  mtd: spi-nor: Add steps for testing locking with CMP
>     [use]  mtd: spi-nor: winbond: Add CMP locking support
>
> Disclaimer: it was much less straightforward than I initially thought to
> get the CMP feature working correctly. I tested it with as much focus as
> I could, and I am improving the test coverage for the new cases, I am
> also providing extra test cases in the metadata of the commit (which do
> not make sense to test for chip additions, but may be sensible show when
> making core additions like this one), but honestly there are so many
> possibilities, I may still be missing corner cases. I hope this will
> anyway be helpful to others!
>
> All the other patches are misc improvements or style fixes which I faced
> and fixed during my development.
>
> Link: https://lore.kernel.org/linux-mtd/92e99a96-5582-48a5-a4f9-e9b33fcff171@linux.dev/
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Applied to spi-nor/next. This should give us around 3 weeks to soak in
linux next. Expect the SPI NOR PR a little bit later than usual, around
the start of the merge window so we can maximize the exposure of these
patches.

Apologies once again for the crappy contributor experience, I tried to
get to this sooner, but wasn't much successful at it :-/

[...]

-- 
Regards,
Pratyush Yadav

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Pratyush Yadav <pratyush@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Pratyush Yadav <pratyush@kernel.org>,
	 Michael Walle <mwalle@kernel.org>,
	 Takahiro Kuwano <takahiro.kuwano@infineon.com>,
	Richard Weinberger <richard@nod.at>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 Jonathan Corbet <corbet@lwn.net>,
	 Tudor Ambarus <tudor.ambarus@linaro.org>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Sean Anderson <sean.anderson@linux.dev>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Steam Lin <STLin2@winbond.com>,
	linux-mtd@lists.infradead.org,  linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org,  stable@kernel.org
Subject: Re: [PATCH v6 00/28] mtd: spi-nor: Enhance software protection
Date: Tue, 26 May 2026 17:35:23 +0200	[thread overview]
Message-ID: <2vxz8q964210.fsf@kernel.org> (raw)
In-Reply-To: <20260526-winbond-v6-18-rc1-spi-nor-swp-v6-0-4092f1419f8f@bootlin.com> (Miquel Raynal's message of "Tue, 26 May 2026 16:56:24 +0200")

On Tue, May 26 2026, Miquel Raynal wrote:

> Hello,
>
> Back in October 2025, the "locking" support in SPI NOR was discussed on
> the mailing list (link below). The conclusion was that this support
> could benefit from some enhancements. As I myself had to dig into it,
> here is a proposal.
>
> First issue that I see, the MEMLOCK ioctl is not behaving correctly
> in some cases, as addressed in:
>
>     mtd: spi-nor: swp: Improve locking user experience
>
> Then there is no clear explanation of the shortcuts taken by the kernel
> in terms of uAPI, so there is an attempt to list them in:
>
>     mtd: spi-nor: swp: Explain the MEMLOCK ioctl implementation behaviour
>
> Plus, Tudor also asked if we could cover locking in the testing
> procedure, which is done in:
>
>     mtd: spi-nor: Add steps for testing locking support
>
> In order to simplify this procedure, and because it got very helpful
> during my testing/development, I want to propose additions to the
> debugfs output:
>
>     mtd: spi-nor: debugfs: Add locking support TODO: make the captures again
>
> Finally, I am providing an implementation for the complement (CMP)
> feature in order to allow finer control of the regions locked. This
> feature is for instance available on Winbond chips:
>
>     [core] mtd: spi-nor: swp: Add support for the complement feature
>     [doc]  mtd: spi-nor: Add steps for testing locking with CMP
>     [use]  mtd: spi-nor: winbond: Add CMP locking support
>
> Disclaimer: it was much less straightforward than I initially thought to
> get the CMP feature working correctly. I tested it with as much focus as
> I could, and I am improving the test coverage for the new cases, I am
> also providing extra test cases in the metadata of the commit (which do
> not make sense to test for chip additions, but may be sensible show when
> making core additions like this one), but honestly there are so many
> possibilities, I may still be missing corner cases. I hope this will
> anyway be helpful to others!
>
> All the other patches are misc improvements or style fixes which I faced
> and fixed during my development.
>
> Link: https://lore.kernel.org/linux-mtd/92e99a96-5582-48a5-a4f9-e9b33fcff171@linux.dev/
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Applied to spi-nor/next. This should give us around 3 weeks to soak in
linux next. Expect the SPI NOR PR a little bit later than usual, around
the start of the merge window so we can maximize the exposure of these
patches.

Apologies once again for the crappy contributor experience, I tried to
get to this sooner, but wasn't much successful at it :-/

[...]

-- 
Regards,
Pratyush Yadav

  parent reply	other threads:[~2026-05-26 15:35 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 14:56 [PATCH v6 00/28] mtd: spi-nor: Enhance software protection Miquel Raynal
2026-05-26 14:56 ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 01/28] mtd: spi-nor: debugfs: Fix the flags list Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 02/28] mtd: spi-nor: swp: Improve locking user experience Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 03/28] mtd: spi-nor: Drop duplicate Kconfig dependency Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 04/28] mtd: spi-nor: Make sure the QE bit is kept enabled if useful Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 05/28] mtd: spi-nor: Improve opcodes documentation Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 06/28] mtd: spi-nor: debugfs: Align variable access with the rest of the file Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 07/28] mtd: spi-nor: debugfs: Enhance output Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 08/28] mtd: spi-nor: swp: Explain the MEMLOCK ioctl implementation behaviour Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 09/28] mtd: spi-nor: swp: Clarify a comment Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 10/28] mtd: spi-nor: swp: Use a pointer for SR instead of a single byte Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 11/28] mtd: spi-nor: swp: Create a helper that writes SR, CR and checks Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 12/28] mtd: spi-nor: swp: Rename a mask Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 13/28] mtd: spi-nor: swp: Create a TB intermediate variable Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 14/28] mtd: spi-nor: swp: Create helpers for building the SR register Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 15/28] mtd: spi-nor: swp: Simplify checking the locked/unlocked range Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 16/28] mtd: spi-nor: swp: Cosmetic changes Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 17/28] mtd: spi-nor: Create a local SR cache Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 18/28] mtd: spi-nor: debugfs: Add locking support Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 19/28] mtd: spi-nor: debugfs: Add a locked sectors map Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 20/28] mtd: spi-nor: Add steps for testing locking support Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 21/28] mtd: spi-nor: swp: Add support for the complement feature Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 22/28] mtd: spi-nor: Add steps for testing locking with CMP Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 23/28] mtd: spi-nor: winbond: Add W25H512NWxxAM CMP locking support Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 24/28] mtd: spi-nor: winbond: Add W25H01NWxxAM " Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 25/28] mtd: spi-nor: winbond: Add W25H02NWxxAM " Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 26/28] mtd: spi-nor: winbond: Add W25Q01NWxxIQ " Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 27/28] mtd: spi-nor: winbond: Add W25Q01NWxxIM " Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 14:56 ` [PATCH v6 28/28] mtd: spi-nor: winbond: Add W25Q02NWxxIM " Miquel Raynal
2026-05-26 14:56   ` Miquel Raynal
2026-05-26 15:35 ` Pratyush Yadav [this message]
2026-05-26 15:35   ` [PATCH v6 00/28] mtd: spi-nor: Enhance software protection Pratyush Yadav
2026-05-27  7:54   ` Miquel Raynal
2026-05-27  7:54     ` Miquel Raynal

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=2vxz8q964210.fsf@kernel.org \
    --to=pratyush@kernel.org \
    --cc=STLin2@winbond.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=richard@nod.at \
    --cc=sean.anderson@linux.dev \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@kernel.org \
    --cc=takahiro.kuwano@infineon.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tudor.ambarus@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.