Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp238094ybt; Tue, 30 Jun 2020 19:42:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6DxlMGsbH249gVylerdoOEex6RJpOxMoHTTDNBZCRdD3vUEldalflfmfWhwiCSiT6DCh9 X-Received: by 2002:a17:906:140e:: with SMTP id p14mr20009664ejc.430.1593571362775; Tue, 30 Jun 2020 19:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593571362; cv=none; d=google.com; s=arc-20160816; b=eZGr3xm+H1zRnBfg5scevUDBMuTFIe7Gyrs/L6uIi5WL2gX1z5EzhiRAIgLn95VRo6 1k/+janxJjiNHGd49gyO1j5R/EojM4oMRjZ7h4jIazvCx/U1rAyWI7OBxjtbU2wHG7BN VQsG8zD+l1RCb6ZYmMhBtYdh6B1AZr0NUmPIejHIp13Rx0zqqWiZ6OGyPgYxRC4tzF4r WOGAjiY1dN48DolycIGMPA3KWvWhrcqbtfqBQWxVhZpWkGwHFae7d8yMGfx1sVaNY5PW 7D8MssaQKDVxcI8CaiifbGZ2Az859pAz8a26qQqsI1pg6DXDaltaQMjxVu08w2NtFABU bUkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=LELox4nshMqy0qsh4BniFOhz4dEZ5kfJ8HftEq/j+eA=; b=cetcwHoqwyGaKEXdsRCJ2isAmK1Rq3l2I7jVpge8RVb/N/263qJHw2xrfZmbs0EW7V YzZ581wKCXLESHGxLx5151O5/Y4y43LCAjmV601Yz8cUVS+h2yJvXZOS9y2Ueg9IK/Ub SmlwJ7f3u/IEpzGnbrt8Z2fE7sLtOQ+dNDJaPjtq6hF/bCCmWEUpixbjgVKoq05EN6Uv 1FzWFzLLxpV6QqVMeT7bNRcI/67VvL1/1Hkj8nywHznZHOXKmnmLrAxFO+tbJY03iF6K BzJRbNG9dhO2ImQm88gGWRQGDKOCK77qDot5kyyqo9bQnCobLT3VGQom7nPoirrz8FFy SBxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rk8si3002945ejb.578.2020.06.30.19.42.19; Tue, 30 Jun 2020 19:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbgGACjR (ORCPT + 99 others); Tue, 30 Jun 2020 22:39:17 -0400 Received: from smtprelay0163.hostedemail.com ([216.40.44.163]:46382 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726874AbgGACjR (ORCPT ); Tue, 30 Jun 2020 22:39:17 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 1BE6B100E7B43; Wed, 1 Jul 2020 02:39:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:2897:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:10004:10400:10848:11232:11658:11914:12297:12740:12760:12895:13069:13311:13357:13439:14096:14097:14181:14659:14721:21080:21627:30012:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: toad01_1017c2226e7d X-Filterd-Recvd-Size: 2160 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Wed, 1 Jul 2020 02:39:14 +0000 (UTC) Message-ID: Subject: Re: [regression] TCP_MD5SIG on established sockets From: Joe Perches To: Eric Dumazet , Herbert Xu Cc: Mathieu Desnoyers , David Miller , Linus Torvalds , LKML , netdev , Yuchung Cheng , Jonathan Rajotte-Julien Date: Tue, 30 Jun 2020 19:39:13 -0700 In-Reply-To: References: <20200701020211.GA6875@gondor.apana.org.au> <20200701022241.GA7167@gondor.apana.org.au> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-06-30 at 19:30 -0700, Eric Dumazet wrote: > On Tue, Jun 30, 2020 at 7:23 PM Herbert Xu wrote: > > On Tue, Jun 30, 2020 at 07:17:46PM -0700, Eric Dumazet wrote: > > > The main issue of the prior code was the double read of key->keylen in > > > tcp_md5_hash_key(), not that few bytes could change under us. > > > > > > I used smp_rmb() to ease backports, since old kernels had no > > > READ_ONCE()/WRITE_ONCE(), but ACCESS_ONCE() instead. > > > > If it's the double-read that you're protecting against, you should > > just use barrier() and the comment should say so too. > > I made this clear in the changelog, do we want comments all over the places ? Having to run git for every line of code isn't great. Comments in code is better than comments in changelogs.