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:   Fri, 19 Aug 2022 11:12:11 +0300
From:   Sergei Antonov <saproj@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
        Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH 2/2] net: moxa: prevent double-mapping of DMA areas

On Thu, 18 Aug 2022 at 22:27, Andrew Lunn <andrew@...n.ch> wrote:
> > Unmap RX memory areas in moxart_mac_stop(), so that moxart_mac_open()
> > will map them anew instead of double-mapping. To avoid code duplication,
> > create a new function moxart_mac_unmap_rx(). Nullify unmapped pointers to
> > prevent double-unmapping (ex: moxart_mac_stop(), then moxart_remove()).
>
> This makes the code symmetric, which is good.
>
> However, moxart_mac_free_memory() will also free the descriptors,
> which is not required. moxart_remove() should undo what the probe did,
> nothing more.

Having considered your comments, I now think I should make another
patch, which fixes two problems at once. To unmap DMA areas only in
moxart_mac_stop() and not in moxart_remove(). It will fix error
unwinding during probe and double-mapping on link down, link up. It
will be correct if Linux always calls moxart_mac_stop() before calling
moxart_remove().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ