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:   Wed, 4 Aug 2021 17:13:55 +0300
From:   Or Gerlitz <gerlitz.or@...il.com>
To:     Al Viro <viro@...iv.linux.org.uk>, Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Cc:     Boris Pismenny <borispismenny@...il.com>,
        Boris Pismenny <borisp@...dia.com>,
        David Ahern <dsahern@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        David Miller <davem@...emloft.net>,
        Saeed Mahameed <saeedm@...dia.com>, axboe@...com,
        Keith Busch <kbusch@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Shai Malin <smalin@...vell.com>, boris.pismenny@...il.com,
        linux-nvme@...ts.infradead.org,
        Linux Netdev List <netdev@...r.kernel.org>,
        benishay@...dia.com, Or Gerlitz <ogerlitz@...dia.com>,
        Yoray Zack <yorayz@...dia.com>,
        Boris Pismenny <borisp@...lanox.com>,
        Ben Ben-Ishay <benishay@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        Yoray Zack <yorayz@...lanox.com>
Subject: Re: [PATCH v5 net-next 02/36] iov_iter: DDP copy to iter/pages

On Fri, Jul 23, 2021 at 8:30 AM Al Viro <viro@...iv.linux.org.uk> wrote:
> On Fri, Jul 23, 2021 at 07:03:02AM +0200, Christoph Hellwig wrote:
> > On Thu, Jul 22, 2021 at 11:23:38PM +0300, Boris Pismenny wrote:

>>> This routine, like other changes in this file, replicates the logic in
>>> memcpy_to_page. The only difference is that "ddp" avoids copies when the
>>> copy source and destinations buffers are one and the same.

>> Now why can't we just make that change to the generic routine?

> Doable... replace memcpy(base, addr + off, len) with
>         base != addr + off && memcpy(base, addr + off, len)
> in _copy_to_iter() and be done with that...

Guys,

AFAIR we did the adding ddp_ prefix exercise to the copy functions call chain

ddp_hash_and_copy_to_iter
-> ddp_copy_to_iter
-> _ddp_copy_to_iter
-> ddp_memcpy_to_page

to address feedback given on earlier versions of the series. So let's
decide please.. are we all set to remove the ddp_ prefixed calls and just
plant the new check (plus a nice comment!) as Al suggested?

re the comments given on ddp_memcpy_to_page, upstream move
to just call memcpy, so we need not have it anyway, will be fixed in v6
if we remain with ddp_ call chain or becomes irrelevant if we drop it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ