All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Pratyush Yadav <p.yadav@ti.com>
Cc: Mark Brown <broonie@kernel.org>,
	Tudor Ambarus <tudor.ambarus@microchip.com>,
	Michael Walle <michael@walle.cc>,
	Takahiro Kuwano <tkuw584924@gmail.com>,
	<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] spi: spi-mem: check if data buffers are on stack
Date: Thu, 21 Apr 2022 09:14:09 +0200	[thread overview]
Message-ID: <20220421091409.3b7ea7ac@xps13> (raw)
In-Reply-To: <20220421071056.4o33vlhoqarod3ow@ti.com>

Hey,

p.yadav@ti.com wrote on Thu, 21 Apr 2022 12:40:56 +0530:

> On 20/04/22 02:04PM, Mark Brown wrote:
> > On Wed, Apr 20, 2022 at 03:50:22PM +0530, Pratyush Yadav wrote:  
> > > The buffers passed in the data phase must be DMA-able. Programmers often
> > > don't realise this requirement and pass in buffers that reside on the
> > > stack. This can be hard to spot when reviewing code. Reject ops if their
> > > data buffer is on the stack to avoid this.
> > > 
> > > Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
> > > Acked-by: Mark Brown <broonie@kernel.org>
> > > ---
> > > 
> > > Changes in v2:
> > > - Include task_stack.h. It might not get included indirectly on some
> > >   platforms and can cause build failures.
> > > - Add a WARN_ON_ONCE() for debuggability.
> > > - Add Mark's Ack.  
> > 
> > Since this is now an isolated patch does that mean whatever meant that I
> > acked rather than applying this patch has gone in and I can now apply it
> > directly?  
> 
> Yes, you should be able to apply it directly. Miquel's spi-mem-ecc 
> branch is now in 5.18-rc1 and later. Though this patch never conflicted 
> with that branch to begin with. The spi-mem-ecc branch does not touch 
> spi_mem_check_op() as far as I can see.

It did during a few version AFAIR, but not the final ones anymore.

But it's upstream now, so please feel free to apply.

Thanks,
Miquèl

  reply	other threads:[~2022-04-21  7:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 10:20 [PATCH v2] spi: spi-mem: check if data buffers are on stack Pratyush Yadav
2022-04-20 13:04 ` Mark Brown
2022-04-21  7:10   ` Pratyush Yadav
2022-04-21  7:14     ` Miquel Raynal [this message]
2022-04-21 15:29 ` Mark Brown

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=20220421091409.3b7ea7ac@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=p.yadav@ti.com \
    --cc=tkuw584924@gmail.com \
    --cc=tudor.ambarus@microchip.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.