Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3077881pxj; Mon, 10 May 2021 18:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuEZ6X5r8FJIl91HcxxW6Y2NQNd+t4t9Bb8yCU54mO88Zi8tqO5VPAgJ8trl+mVsa7g3k3 X-Received: by 2002:aa7:db95:: with SMTP id u21mr32764384edt.152.1620695576767; Mon, 10 May 2021 18:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620695576; cv=none; d=google.com; s=arc-20160816; b=YoB5dfDkFUu/KVQvDUXD2PmeIw8FSYEMpvnVyw463M2WUXt6ps/+HSFx6cTBWDepZ5 YwQFonPwPPodxYs+A5foFO8+r3kXBvdHCRi4MBoyN6cZguNbS/f+BSIvrAkPYMHVpWMj q61qmOjTRONd+Nu5syUx8T1GgbuiXzOl0QOpVimVQcRemrQN9Kew3tk/bGQ58TjK/tFp agqlyp9oQU2toi8twJW2lTF0V7UF3imuQzwsuW1kGvhtNvH4vdbDhkvp6DifmvSQMDGo kY8OCkIcCaz1OZAUWXbD/IWQcGkmJ1YPFJfTHZbBflT2wCKavh3q7HyPCl1ryZovQNhz M9UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=bmT12ajT3SxMk3jsFNMDG7Lwsl9HXMJCB/98nt4Swaw=; b=HnLD5JphRifT+DrT1WAvS7L7UGnzoc6aGf0bKs+WlM0CSW0jRIGhsb4oUC8uL94oLn ZUhhIZBUfQFS9VFGcycSJ7oqi2DtKPOHXFMMgFWw4WSnODZ+FbrenA9gI6E4lORV5P6K xL5Y4/ZrCW8TJbUuxqDYysT8CjxrfdETZwUebcuOypMJiGbpw9b1Npvpo0EKxoAqLM/K lCeJpHA8rKtFWVxRT13dlB5hMinxGE8UknMT+KFjDuLVyGMMdPpVX5IWsw8jszlTZQjc fd/YJibHqpA6L0JE4Eserd17M9f3jR4XwHuc5K1A4e2JXtMnktf4AG2Dx+QtHfCAdGV3 XvAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=UfHk2Y7q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw3si14543732ejb.658.2021.05.10.18.12.32; Mon, 10 May 2021 18:12:56 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=UfHk2Y7q; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230169AbhEKBMY (ORCPT + 99 others); Mon, 10 May 2021 21:12:24 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:38379 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbhEKBMX (ORCPT ); Mon, 10 May 2021 21:12:23 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210511011115epoutp045b0d1a9d3808a13790584d7203cfd096~93fLMFzmP3209332093epoutp04S for ; Tue, 11 May 2021 01:11:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210511011115epoutp045b0d1a9d3808a13790584d7203cfd096~93fLMFzmP3209332093epoutp04S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1620695475; bh=bmT12ajT3SxMk3jsFNMDG7Lwsl9HXMJCB/98nt4Swaw=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=UfHk2Y7qJ8LlkSqnhO7w6pasEEsB50ED3Nqej5ks49Fyz8blzyRRBOqsaZhREO3wT fbgi7kTNVgFH3jROTh4dsZ0jaXikLWfbzB0b9qtlzQKds5L2B57CQ+MCEvc5jLdFeo rQwVvgN3R+m8ugpD6F9tWv0B4cK0wJCEXLW1Vh58= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20210511011112epcas2p2006594f5bf977f42c51b7a88e2b91590~93fHvjbA60159301593epcas2p2T; Tue, 11 May 2021 01:11:12 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.40.183]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4FfKcZ1kBRz4x9QD; Tue, 11 May 2021 01:11:10 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id BC.26.09433.EA9D9906; Tue, 11 May 2021 10:11:10 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20210511011108epcas2p3167993dce9eec96ff7b922515e951274~93fEwkUKz0080200802epcas2p3U; Tue, 11 May 2021 01:11:08 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210511011108epsmtrp1a966360aa899810c24cfdb8c8f410785~93fEvsVr_2198221982epsmtrp1g; Tue, 11 May 2021 01:11:08 +0000 (GMT) X-AuditID: b6c32a47-f4bff700000024d9-63-6099d9ae1e82 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id D0.9A.08637.CA9D9906; Tue, 11 May 2021 10:11:08 +0900 (KST) Received: from KORDO035731 (unknown [12.36.185.47]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20210511011108epsmtip27246b142ac884ada51c95fd9a95a186c~93fEg5PnL2280122801epsmtip2E; Tue, 11 May 2021 01:11:08 +0000 (GMT) From: "Dongseok Yi" To: "'Willem de Bruijn'" Cc: "'Yunsheng Lin'" , "'Daniel Borkmann'" , "'bpf'" , "'Alexei Starovoitov'" , "'Andrii Nakryiko'" , "'Martin KaFai Lau'" , "'Song Liu'" , "'Yonghong Song'" , "'John Fastabend'" , "'KP Singh'" , "'David S. Miller'" , "'Jakub Kicinski'" , "'Network Development'" , "'linux-kernel'" In-Reply-To: Subject: RE: [PATCH bpf] bpf: check for data_len before upgrading mss when 6 to 4 Date: Tue, 11 May 2021 10:11:08 +0900 Message-ID: <015101d74602$86442210$92cc6630$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKypHYW3xad5/j2XvChPebQmKG2owG+YoocAqFpyMsBZavlXQIxNaIYAiru3ucBq8RF2QKY6vTDAm6kVlUBadK04AMaqQ3GARiLayQDE+caWwJJGwtFAeZKb9QDLW923Kgfn/Vg Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJJsWRmVeSWpSXmKPExsWy7bCmhe66mzMTDL7+4bD4/ns2s8WXn7fZ LT4fOc5msXjhN2aLOedbWCyadqxgsnjx4QmjxfN9vUwWF7b1sVpc3jWHzaLhLZfFsQViFj8P n2G2WPxzA1DVkhmMDvweW1beZPKY2PyO3WPnrLvsHi1H3rJ6dN24xOyxaVUnm8fnTXIB7FE5 NhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlAZysplCXm lAKFAhKLi5X07WyK8ktLUhUy8otLbJVSC1JyCgwNC/SKE3OLS/P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6amzMTDFY+NbD4/ns2s8WXn7fZ LT4fOc5msXjhN2aLOedbWCyadqxgsnjx4QmjxfN9vUwWF7b1sVpc3jWHzaLhLZfFsQViFj8P n2G2WPxzA1DVkhmMDvweW1beZPKY2PyO3WPnrLvsHi1H3rJ6dN24xOyxaVUnm8fnTXIB7FFc NimpOZllqUX6dglcGWeP72Au+M5d8eL2JPYGxkWcXYycHBICJhJPXi1g72Lk4hAS2M0ocfns G7YuRg6ghITErs2uEDXCEvdbjrCC2EICzxgl5iwtA7HZBLQk3sxqB4uLCFhJ/J99AmwOs8BV Fomta95DDT3KLvGjcQ8TSBWnQKDE/JNL2EBsYSC7/98tRhCbRUBVYvf5d2BxXgFLiSUf/rBC 2IISJ2c+YQGxmQW0JXoftjJC2PIS29/OYYa4TkHi59NlrCDLRASmMUqsvLoGqkhEYnZnG/ME RuFZSGbNQjJrFpJZs5C0LGBkWcUomVpQnJueW2xYYJiXWq5XnJhbXJqXrpecn7uJERyxWpo7 GLev+qB3iJGJg/EQowQHs5IIr2jHtAQh3pTEyqrUovz4otKc1OJDjNIcLErivBe6TsYLCaQn lqRmp6YWpBbBZJk4OKUamNxz/xjERcc+vPz47tw7hRfWBU1bG1WTKeD5ZZrBwsW/++7zq9SW 858p5bm100NSrOrTtzWz5s9be1AoaFW3h1reqeSp/81Ffu4RuXZv8vO1b6uCfOWDV+17cqXs yO3zPB46Fpzbfxq5+ieKJgvV1cw6azbj6M+7/3IEbr7+MW2Duvd14xRuye8fY9afbdc5tjra 8kWQy73p63xPMRV883zmvyHKIEGqZzJzhbSQWYjB+wfBd/c/z7b7Yis+P/GRKu+MaboNm4r4 bu28fcR5yboey2vPmLcWev548F3dqnyp/fX4ZK3Q7Jl78oOdb5+6/2yaqu87OTOrrsgvU4wK 0xin5xvcE3l55OXlO583Jv5WYinOSDTUYi4qTgQA0YV38EcDAAA= X-CMS-MailID: 20210511011108epcas2p3167993dce9eec96ff7b922515e951274 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210429102143epcas2p4c8747c09a9de28f003c20389c050394a References: <1619690903-1138-1-git-send-email-dseok.yi@samsung.com> <8c2ea41a-3fc5-d560-16e5-bf706949d857@iogearbox.net> <02bf01d74211$0ff4aed0$2fde0c70$@samsung.com> <02c801d7421f$65287a90$2f796fb0$@samsung.com> <001801d742db$68ab8060$3a028120$@samsung.com> <436dbc62-451b-9b29-178d-9da28f47ef24@huawei.com> <007001d7431a$96281960$c2784c20$@samsung.com> <00c901d74543$57fa3620$07eea260$@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 09:46:25AM -0400, Willem de Bruijn wrote: > On Mon, May 10, 2021 at 9:19 AM Willem de Bruijn > wrote: > > > > > > That generates TCP packets with different MSS within the same stream. > > > > > > > > My suggestion remains to just not change MSS at all. But this has to > > > > be a new flag to avoid changing established behavior. > > > > > > I don't understand why the mss size should be kept in GSO step. Will > > > there be any issue with different mss? > > > > This issue has come up before and that has been the feedback from > > TCP experts at one point. > > > > > In general, upgrading mss make sense when 6 to 4. The new flag would be > > > set by user to not change mss. What happened if user does not set the > > > flag? I still think we should fix the issue with a general approach. Or > > > can we remove the skb_increase_gso_size line? > > > > Admins that insert such BPF packets should be aware of these issues. > > And likely be using clamping. This is a known issue. > > > > We arrived that the flag approach in bpf_skb_net_shrink. Extending > > that to bpf_skb_change_proto would be consistent. > > As for more generic approach: does downgrading to non-TSO by clearing > gso_size work for this edge case? It can hit __skb_linearize in validate_xmit_skb and frags will be copied to a linear part. The linear part size can exceed the MTU of skb->dev unexpectedly. I will make another patch with the flag approach.