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: <20181119.145343.2254073323355763213.davem@davemloft.net>
Date:   Mon, 19 Nov 2018 14:53:43 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     sagi@...mberg.me
Cc:     sagi@...htbitslabs.com, linux-block@...r.kernel.org,
        netdev@...r.kernel.org, keith.busch@...el.com, hch@....de,
        linux-nvme@...ts.infradead.org
Subject: Re: [PATCH 10/11] nvmet-tcp: add NVMe over TCP target driver

From: Sagi Grimberg <sagi@...mberg.me>
Date: Mon, 19 Nov 2018 13:26:12 -0800

> I would love you to look at skb_copy_and_hash_datagram_iter as these
> changes will require an ack from you.

My first impression is that we now have this kind of code pattern
in at least two main places and now this will be a third.

I know that nobody likes callbacks because of spectre, but all of
these cases could be done with something like:

int __skb_datagram_iter(const struct sk_buff *skb, int offset,
			struct iov_iter *to, int len,
			int (*cb)(void *, int, struct iov_iter *, void *),
			void *data)
{
	...
		n = cb(skb->data + offset, copy, to, data);
	...
}

You get the idea.  Then we have one version of all the loops and
the different (copy, copy+csum, copy+hash) cases all can be
handled by __skb_datagram_iter() but just with a different 'cb'
and private 'data'.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ