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  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:	Mon, 19 May 2014 07:09:47 -0700
From:	Eric Dumazet <>
To:	Jason Wang <>
Cc:	Xi Wang <>, "David S. Miller" <>,, "Michael S. Tsirkin" <>,
	Maxim Krasnyansky <>,
	Neal Cardwell <>,
	Eric Dumazet <>
Subject: Re: [PATCH v2] net-tun: restructure tun_do_read for better
 sleep/wakeup efficiency

On Mon, 2014-05-19 at 17:27 +0800, Jason Wang wrote:

> Still a little bit difference. We check the reg_state after we're sure
> there's nothing left in sk_receive_queue. But this patch returns -EIO
> before trying to dequeue skb.

Do you think its a problem, other than a simple difference of behavior ?

Is this -EIO thing a hard requirement, or a side effect ?

Either we try to converge things, or we keep this driver a pile of
copy/pasted stuff from other locations, missing improvements we did
in core networking stack, because of some supposed differences.

About the sk_data_ready() and wake_up_all(), you missed the whole part
of the patch I think.

Check how sock_def_readable() does everything properly and efficiently,
including the async part.

static void sock_def_readable(struct sock *sk)
        struct socket_wq *wq;

        wq = rcu_dereference(sk->sk_wq);
        if (wq_has_sleeper(wq))
                wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI |
                                                POLLRDNORM | POLLRDBAND);
        sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);

Using sk_data_ready() is the way to reach sock_def_readable()
as its not an EXPORT_SYMBOL.

If this driver was using the common interface, we would not have
these false sharing problems, that were solved a long time ago.

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists