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: <20191207.115034.1743579700466281633.davem@davemloft.net>
Date:   Sat, 07 Dec 2019 11:50:34 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     ivan.khoronzhuk@...aro.org
Cc:     grygorii.strashko@...com, netdev@...r.kernel.org, nsekhar@...com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net: ethernet: ti: davinci_cpdma: fix warning
 "device driver frees DMA memory with different size"

From: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
Date: Sat, 7 Dec 2019 14:02:39 +0200

> @@ -1046,7 +1045,6 @@ static int cpdma_chan_submit_si(struct
> submit_info *si)
>        if (si->data_dma) {
>                buffer = si->data_dma;
>                dma_sync_single_for_device(ctlr->dev, buffer, len, chan->dir);
> -               swlen |= CPDMA_DMA_EXT_MAP;
>        } else {
>                buffer = dma_map_single(ctlr->dev, si->data_virt, len, chan->dir);
>                ret = dma_mapping_error(ctlr->dev, buffer);
> @@ -1065,7 +1063,7 @@ static int cpdma_chan_submit_si(struct
> submit_info *si)
>        writel_relaxed(mode | len, &desc->hw_mode);
>        writel_relaxed((uintptr_t)si->token, &desc->sw_token);
>        writel_relaxed(buffer, &desc->sw_buffer);
> -       writel_relaxed(swlen, &desc->sw_len);
> + writel_relaxed(si->data_dma ? len | CPDMA_DMA_EXT_MAP : len,
> &desc->sw_len);
>        desc_read(desc, sw_len);
> 
>        __cpdma_chan_submit(chan, desc);
> 
> But it's branched twice then.

It's a conditional move rather than a branch....

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ