Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4656079imm; Mon, 17 Sep 2018 18:58:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY48cWVzPyPDzHCMRwd77/iBzPDaRA4Ivr+d1dfgTa4Uz1BAlsJyhcZDqg+dUwwVpX6MqXR X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr25194512pgi.335.1537235887026; Mon, 17 Sep 2018 18:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537235886; cv=none; d=google.com; s=arc-20160816; b=GiQTbf3zpioqRD6IyRuQHC4ZzNrqUpyaWEt5Mf5PojtcoJdIe3IK+F7LiQw1koq/gP dVQ7Du1wtSUlXR5IGLN23y3pk+zhTH6o+FAjrXtjRStwGj2AeZABF3dAR0qBtn1s8SR4 e1QWwzrZOYF1iv3dzFZKUs6xLK/stVogd1bO2HHzjyv+xd3e98CsOnrr9mCZ81xZKMYR ivTTB840UvDgr07+pAcYs3xcYAPl4bxXcNzxAc44MSCxGWi0syoPnndE27TcC35yqZlR tmI69jkOVQur6Bn8EXjhMh6iq/7Wfus8Snd8cXRYwJODmrknzcaOTQolkcQ5bIttrEd4 0pfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iAUIgu2rYqmlflH3rJQokWACL1lzwpWO6tPLcJMJwt4=; b=a5v2i/Sp8+A4leXTWEDUNjvbV4FGgNqn62Xz7+B8RQL+77ozS6AKhExUPhLEWOopxb 1dAX9q1LobJFjaXJ+bsgPqZPMc1aCW/ASmRPqJUN9bjFuPst84ZhHGPWR2tQQ/qDEfR0 S7HMvC3PfVFYFKm2hcf1ZecwEZT9+WArlTGl7SC8jNcjNWRxMkLZyr2tAdY/bpdlPRLd /jA2pbkVHd7QrK2I2b1oQiFpaINksCg7UDRuX97KMKspd1WzU2ae+tr8wTmnf9lyfK8w p72Zu+ehbxpOYPg0bl+XEoobLvmF9eKGAnXF3LfftEAyKMIu/7Ql1skzVDT5F8KNVRF+ rPyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22-v6si15785667pgj.436.2018.09.17.18.57.52; Mon, 17 Sep 2018 18:58:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728849AbeIRH1t (ORCPT + 99 others); Tue, 18 Sep 2018 03:27:49 -0400 Received: from nautica.notk.org ([91.121.71.147]:53241 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728703AbeIRH1r (ORCPT ); Tue, 18 Sep 2018 03:27:47 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 63194C009; Tue, 18 Sep 2018 03:57:38 +0200 (CEST) Date: Tue, 18 Sep 2018 03:57:23 +0200 From: Dominique Martinet To: David Miller Cc: doronrk@fb.com, tom@quantonium.net, davejwatson@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kcm: remove any offset before parsing messages Message-ID: <20180918015723.GA26300@nautica> References: <1536657703-27577-1-git-send-email-asmadeus@codewreck.org> <20180912053642.GA2912@nautica> <20180917.184502.447385458615284933.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180917.184502.447385458615284933.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Miller wrote on Mon, Sep 17, 2018: > From: Dominique Martinet > Date: Wed, 12 Sep 2018 07:36:42 +0200 > > > Dominique Martinet wrote on Tue, Sep 11, 2018: > >> Hmm, while trying to benchmark this, I sometimes got hangs in > >> kcm_wait_data() for the last packet somehow? > >> The sender program was done (exited (zombie) so I assumed the sender > >> socket flushed), but the receiver was in kcm_wait_data in kcm_recvmsg > >> indicating it parsed a header but there was no skb to peek at? > >> But the sock is locked so this shouldn't be racy... > >> > >> I can get it fairly often with this patch and small messages with an > >> offset, but I think it's just because the pull changes some timing - I > >> can't hit it with just the clone, and I can hit it with a pull without > >> clone as well.... And I don't see how pulling a cloned skb can impact > >> the original socket, but I'm a bit fuzzy on this. > > > > This is weird, I cannot reproduce at all without that pull, even if I > > add another delay there instead of the pull, so it's not just timing... > > I really can't apply this patch until you resolve this. > > It is weird, given your description, though... Thanks for the reminder! I totally agree with you here and did not expect this to be merged as it is (in retrospect, I probably should have written something to that extent in the subject, "RFC"?) I really don't have much time to give to that right now as I'm doing this on my freetime, and the lack of reply has been rather demotivating so it got pushed back a few times... Given you did reply now I'll try to spend some time to figure that out in the next couple of weeks but it might not make it for this cycle depending on the number of rc we'll get and time you want this to soak it -next. (I can start by putting the pull back in netparser and try to reproduce, it's really weird that I never got it to happen at the time...) -- Dominique