lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220131170711.ydydtx3jeu3fl7pu@ti.com>
Date:   Mon, 31 Jan 2022 22:37:11 +0530
From:   Pratyush Yadav <p.yadav@...com>
To:     Mark Brown <broonie@...nel.org>
CC:     Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Michael Walle <michael@...le.cc>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Takahiro Kuwano <tkuw584924@...il.com>,
        <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: spi-mem: check if data buffers are on stack

On 31/01/22 01:55PM, Mark Brown wrote:
> On Mon, Jan 31, 2022 at 05:15:08PM +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.
> 
> Acked-by: Mark Brown <broonie@...nel.org>

Thanks. But seems like this is breaking build on arm-socfpga_defconfig. 
Let me take a look into it.

> 
> > +	/* Buffers must be DMA-able. */
> > +	if (op->data.dir == SPI_MEM_DATA_IN &&
> > +	    object_is_on_stack(op->data.buf.in))
> 
> Might be worth a WARN_ON_ONCE() for debuggability?

Okay, I'll add it.

-- 
Regards,
Pratyush Yadav
Texas Instruments Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ