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] [day] [month] [year] [list]
Message-ID: <YlQHcAwd1DUGJGgz@matsya>
Date:   Mon, 11 Apr 2022 16:18:16 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Kevin Groeneveld <kgroeneveld@...brook.com>
Cc:     Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Robin Gong <yibin.gong@....com>,
        Lucas Stach <l.stach@...gutronix.de>,
        dmaengine@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] dmaengine: imx-sdma: fix init of uart scripts

On 10-04-22, 18:31, Kevin Groeneveld wrote:
> Commit b98ce2f4e32b ("dmaengine: imx-sdma: add uart rom script") broke
> uart rx on imx5 when using sdma firmware from older Freescale 2.6.35
> kernel. In this case reading addr->uartXX_2_mcu_addr was going out of
> bounds of the firmware memory and corrupting the uart script addresses.
> 
> Simply adding a bounds check before accessing addr->uartXX_2_mcu_addr
> does not work as the uartXX_2_mcu_addr members are now beyond the size
> of the older firmware and the uart addresses would never be populated
> in that case. There are other ways to fix this but overall the logic
> seems clearer to me to revert the uartXX_2_mcu_ram_addr structure
> entries back to uartXX_2_mcu_addr, change the newer entries to
> uartXX_2_mcu_rom_addr and update the logic accordingly.
> 
> I have tested this patch on:
> 1. An i.MX53 system with sdma firmware from Freescale 2.6.35 kernel.
>    Without this patch uart rx is broken in this scenario, with the
>    patch uart rx is restored.
> 2. An i.MX6D system with no external sdma firmware. uart is okay with
>    or without this patch.
> 3. An i.MX8MM system using current sdma-imx7d.bin firmware from
>    linux-firmware. uart is okay with or without this patch and I
>    confirmed the rom version of the uart script is being used which was
>    the intention and reason for commit b98ce2f4e32b ("dmaengine:
>    imx-sdma: add uart rom script") in the first place.

Applied, thanks

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ