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: <5c480a83-dfcf-c20c-f277-4449a7b41403@synopsys.com>
Date:   Fri, 29 Mar 2019 10:02:20 +0000
From:   Jose Abreu <jose.abreu@...opsys.com>
To:     Aaro Koskinen <aaro.koskinen@....fi>,
        "David S. Miller" <davem@...emloft.net>,
        Jose Abreu <jose.abreu@...opsys.com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        Giuseppe Cavallaro <peppe.cavallaro@...com>,
        <netdev@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>,
        Aaro Koskinen <aaro.koskinen@...ia.com>
Subject: Re: [PATCH 1/6] net: stmmac: use correct DMA buffer size in the RX
 descriptor

On 3/27/2019 8:35 PM, Aaro Koskinen wrote:
> From: Aaro Koskinen <aaro.koskinen@...ia.com>
> 
> We always program the maximum DMA buffer size into the receive descriptor,
> although the allocated size may be less. E.g. with the default MTU size
> we allocate only 1536 bytes. If somebody sends us a bigger frame, then
> memory may get corrupted.
> 
> Fix by using exact buffer sizes.
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@...ia.com>

So, I'm seeing that the maximum allowed buffer size that can be
put in the descriptor changes between enhanced descriptors to
normal descriptors (8KB vs. 2KB right ?).

Shouldn't stmmac_main know about this limit before trying to init
descriptors ?

We do limit the MTU according to HW version but I would rather
prefer not having to need to calculate min() values in the
descriptor code and just use the value as is ...

Thanks,
Jose Miguel Abreu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ