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]
Date:   Thu, 20 Dec 2018 19:57:14 +0100
From:   Marek Vasut <marex@...x.de>
To:     Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc:     andrew@...n.ch, Tristram Ha <Tristram.Ha@...rochip.com>,
        Woojung Huh <Woojung.Huh@...rochip.com>
Subject: Re: [RFT][PATCH 4/7] net: dsa: microchip: Remove dev->txbuf

On 12/20/2018 02:20 AM, Florian Fainelli wrote:
> On 12/19/18 5:06 PM, Marek Vasut wrote:
>> Previous patches unconver that ksz_spi_write() is always ever called
>> with len = 1, 2 or 4. We can thus drop the if (len > SPI_TX_BUF_LEN)
>> check and we can also drop the allocation of the txbuf which is part
>> of the driver data. This wastes 256 bytes for no reason and can be
>> replaced with 8-byte stack allocated buffer, which is what this patch
>> does. This is an intermediate step though, which will go away after
>> regmap conversion.
> 
> dev is a kmalloc'd buffer, so dev->txbuf is a DMA-able buffer, that
> could be presumably why it was used in the first place, DMA from the
> stack is not something safe, but I did not check the core SPI layer or
> the SPI bus master driver to see whether they do take care of that already.

Well, I can just squash this and 6/7 and let regmap handle these details.

-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ