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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5b5509f1-9713-f1bc-cb33-18ebdb1cb8c5@linux.ibm.com>
Date:   Tue, 3 Jul 2018 15:52:02 +0200
From:   Ursula Braun <ubraun@...ux.ibm.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        David Miller <davem@...emloft.net>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Network Development <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT] Networking



On 07/02/2018 08:29 PM, Linus Torvalds wrote:
> On Mon, Jul 2, 2018 at 6:03 AM David Miller <davem@...emloft.net> wrote:
>>
>> are available in the Git repository at:
>>
>>   gitolite@...kernel.org:/pub/scm/linux/kernel/git/davem/net.git
> 
> So the af_smc poll fixes clashed with the revert of the commit that
> caused those fixed to be done in the first place.
> 
> See the changes to net/smc/af_smc.c in my commit
> 
>   a11e1d432b51 ("Revert changes to convert to ->poll_mask() and aio
> IOCB_CMD_POLL")
> 
> vs Ursula's
> 
>   24ac3a08e658 ("net/smc: rebuild nonblocking connect")
> 
> I (briefly) considered just dropping Ursula's changes entirely, but
> they looked like a nice cleanup on their own, so what I did instead
> was to try to fix up my revert instead.
> 
> That involved removing the release_sock/lock_sock pair around the
> ->poll() call, and removing the special "sock_poll_wait()" that got
> re-introduced by my revert, but that Ursula's changes seem to obviate.
> 
> However, while I can look at the code and say "my merge makes sense to
> me", (a) I can't test it, (b) I don't actually know the rules for SMC
> sockets in the first place, and (c) I may be just incompetent.
> 
> So Ursula - mind checking and testing the end result? I _think_ it's
> fine and the merge looked pretty obvious, but maybe af_smc got broken
> again.
> 

Thanks Linus for your revert. I run a test, and found it is almost fine.
Just these 2 lines are missing:

---
 net/smc/af_smc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index e017b6a4452b..e7d7ff87499e 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -1345,6 +1345,8 @@ static __poll_t smc_poll(struct file *file, struct socket *sock,
 		if (sk->sk_err)
 			mask |= EPOLLERR;
 	} else {
+		if (sk->sk_state != SMC_CLOSED)
+			sock_poll_wait(file, sk_sleep(sk), wait);
 		if (sk->sk_err)
 			mask |= EPOLLERR;
 		if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
-- 


> [ It's still going through by basic build tests, so I haven't pushed
> out my merge yet, but it should be in the usual places in a short
> while ]
> 
> Thanks,
> 
>                 Linus
> 

Regards, Ursula

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ