Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3137003ybl; Fri, 20 Dec 2019 04:33:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzISD/2D8uqPm/QAzj2yt0g7rRRzWWi9ic8Mg90ZQTsBJOR1j+cIVrC8bWRuTu8rYWmMdeV X-Received: by 2002:a9d:708f:: with SMTP id l15mr15228040otj.286.1576845228601; Fri, 20 Dec 2019 04:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576845228; cv=none; d=google.com; s=arc-20160816; b=e1t+YC8MVCcae05oMq8ZtlAI47rpKIHiaJAleFBYBv4ofXLLhlUYxbiqVEIUr/i+rt cIdSNhyytFOWIRU/Sk4xDFtZMs2P03DLCM289Sn9OUJ9EahmIIpT4TCVPgE4eIa1Faw8 YFmYOWRPK3fQBcZGmJCESsk57bARv2lfpqHx4AMnoAOZYadF28/VdTwSFjYCwaKuKrHj L5EbkF28i/qfHOLuFmCtkwAZwn5keqhss/Z1RRENX8bTeQhmMDOR8KlYKlarLMu1j5lt 8EVCVx81tGGmVT5f7paWj47biLJXa5MIXIwBhqscY/eDfII3S8QvckHur/TWzWub+rxs pw3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2q1OQblY1iDBsx/l/A1aAIx7HOSY4ye2G1ZTpVWaMFE=; b=W/bUEYwJMcka767Bh2iUj8hW7aVyTQJxO7Aq5eZRuNAD7L11sy8A/vAJCCyF77oOXx /RJ9go+fR3ehfRXSxajez2HIinRGXgO/FndW8wuUE9mUgabZnhiS7BtdqNG4NW6BmEA9 C7Jt7XK9SvYqnt+LRLMg23spd7I6gwmhPB+FNKm1dXv8tr2zEs+oTfhkTOCmlrgq4sHd GU8vm9PLH9ApLrLkhCa8j9wZ9ygZSZwxm1x+vpNVOZodQ3p+YBXAjMDrVs1b3yfs4ssf IhTZG6UVXOqx6HFFvDz2NbNqPTA9S3Wk2jn6q+KratdT7IK0DOiIuuM6bNsTLDzrnOqZ IsDQ== 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 p19si4931399oic.216.2019.12.20.04.33.37; Fri, 20 Dec 2019 04:33:48 -0800 (PST) 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 S1727425AbfLTMcW (ORCPT + 99 others); Fri, 20 Dec 2019 07:32:22 -0500 Received: from charlotte.tuxdriver.com ([70.61.120.58]:57384 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727301AbfLTMcV (ORCPT ); Fri, 20 Dec 2019 07:32:21 -0500 Received: from 2606-a000-111b-43ee-0000-0000-0000-115f.inf6.spectrum.com ([2606:a000:111b:43ee::115f] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1iiHRt-00077n-5i; Fri, 20 Dec 2019 07:32:15 -0500 Date: Fri, 20 Dec 2019 07:32:03 -0500 From: Neil Horman To: Kevin Kou Cc: vyasevich@gmail.com, marcelo.leitner@gmail.com, davem@davemloft.net, linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sctp: do trace_sctp_probe after SACK validation and check Message-ID: <20191220123203.GA5616@hmswarspite.think-freely.org> References: <20191220044703.88-1-qdkevin.kou@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220044703.88-1-qdkevin.kou@gmail.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 20, 2019 at 04:47:03AM +0000, Kevin Kou wrote: > The function sctp_sf_eat_sack_6_2 now performs > the Verification Tag validation, Chunk length validation, Bogu check, > and also the detection of out-of-order SACK based on the RFC2960 > Section 6.2 at the beginning, and finally performs the further > processing of SACK. The trace_sctp_probe now triggered before > the above necessary validation and check. > > This patch is to do the trace_sctp_probe after the necessary check > and validation to SACK. > > Signed-off-by: Kevin Kou > --- > net/sctp/sm_statefuns.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c > index 42558fa..b4a54df 100644 > --- a/net/sctp/sm_statefuns.c > +++ b/net/sctp/sm_statefuns.c > @@ -3281,7 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net, > struct sctp_sackhdr *sackh; > __u32 ctsn; > > - trace_sctp_probe(ep, asoc, chunk); > > if (!sctp_vtag_verify(chunk, asoc)) > return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); > @@ -3319,6 +3318,8 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net, > if (!TSN_lt(ctsn, asoc->next_tsn)) > return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands); > > + trace_sctp_probe(ep, asoc, chunk); > + > /* Return this SACK for further processing. */ > sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk)); > > -- > 1.8.3.1 > > Acked-by: Neil Horman