Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4773945rdh; Wed, 29 Nov 2023 10:12:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzJSmPLB1Lv0f06qUnoeQ4jKIHBxE6Ye0qGL4dQQHiBMEd833zqL6POuTTRZZZ5/h+HO3L X-Received: by 2002:a17:902:d4d2:b0:1cf:b57a:5055 with SMTP id o18-20020a170902d4d200b001cfb57a5055mr19853810plg.0.1701281527638; Wed, 29 Nov 2023 10:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701281527; cv=none; d=google.com; s=arc-20160816; b=HVDuROE+r08l34XvFGpLqj/Nl3Auw5U8VyYd52nUFmhGWfBq74E624L1iPBpyjgj5X CLNv1qo+6RsKUsxdVn8wzjLSL02POZYlbTFYomA3IGpOmioEgOM7uFqWQ5Si0EMU/1RA O8Mx6d2IA22MZ+TtIXz1e9GV8/Fqie74wPIk7RRoz3uqUJBIKkcw6zoRtRUhopiqMau6 o9C1jejKCftSDJpy9xuCHrSXh9PiaGMChAigk58cs+ea0Psr/jK/WYZj7BfIzu9fMKlK wYOM4BLotjMo2zctc60GPOyrk2po2VIZA8L3Gnn+iaWoNsUij1N52R5wkgvNlbyoT4l1 k57w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EnncOB2h9jk2qjqG+JIa0//zO7OvYoVVbykcUe7Jp/c=; fh=X1lxrGLA7V3PBg9NtHG1M9vtBdBLI2mDk4lzNRfgcS0=; b=BX7zXTYBXDXUb7jx0oteYZywso4XMNAahGdt07/mvwsS1ylSL4w0MpE+NT9wR016I5 40wgOoXMnSYX7hJVhBFOiubAtcC576YEui7ZHBkGWPI+hKAXasxxyzkTnO72VArHgWtr Wkf+ZSgNMxxJPXKZsWm2ivyZro8CSRTLmfiUuXhc3WorrzoUXCrHa4ZlEx8+wFKK6eBD GUaSyoo7B8BRoGgtUxI2vttR5aVAe+4utHlfuVcMQT+1XxUbR1OSpUp/LiKdFDWdlaWK g2HFt/YhPRGKZED+OyHnYXnatXriN4dHenfv/yjCpGvPUoIl8m5ln8jECHc4rwyMcGfh aYUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bGYotj5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id b18-20020a170903229200b001cfb6c41e9csi10275528plh.608.2023.11.29.10.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 10:12:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=bGYotj5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 233EA808206B; Wed, 29 Nov 2023 10:11:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbjK2SKx (ORCPT + 99 others); Wed, 29 Nov 2023 13:10:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjK2SKw (ORCPT ); Wed, 29 Nov 2023 13:10:52 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D00EB9 for ; Wed, 29 Nov 2023 10:10:58 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-548c6efc020so748a12.0 for ; Wed, 29 Nov 2023 10:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701281457; x=1701886257; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EnncOB2h9jk2qjqG+JIa0//zO7OvYoVVbykcUe7Jp/c=; b=bGYotj5rsTyGBNiNZ1wGEy8Ux4gKjH0aU0z6sHYy9wHZPJW7c0sIvJCW1orhTEefEP bJEdO4EAkiQzI+dyJcmGBQ1X799cyOYm0/Qk8H9jpA/TZiipH9BAgV0hIHHamuaEbEqm /mduHdNv8iq7ECdB1egzeGux3mugY2h/AXdBB7HwsdREAE23u74lSlsH3+8cLQf9VpZM hi2xMyFSsf3y3NYwU+0qe+UI1xGdS6t+VaZStIGKQwksVdZvjzAm2VEUtNFQSQKPGbe+ mJM1EkYqV5buzAKNJ1QQkatvn00pTwEwV3Bpc8sUH7wNkGnmsTFcwM+SWVhUCuzPO0A2 Q30Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701281457; x=1701886257; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EnncOB2h9jk2qjqG+JIa0//zO7OvYoVVbykcUe7Jp/c=; b=CJSusb8alOLCrY4s9hKC7Xh+7qZ2auMDYO2qHzepsW0sTO8b5L3/XmOU75onWjpwpp 04o3BtJEFst4U+3wNScEplbJ3n3jauF+CvgR7s6HNL1c7kfK8FW71ZKX91+anPueaQoF r1A6cD6OTQQu7UGisqiKNNN3+Ll9WAAuGmnCrIk6OL1nthlo9c4p6bquqfgcL1xno1Zg jjEhbrA6vlZOrg4NEE6p/DTu3tUln+Fq29O3Fx3XFzNYQj1lnGV84rWkiJDcjZLPoQxU SmO+m7EWYQpiohcmFemdvlPqzyPMG/ar/JJKO0O4s+Fa4EbWrlLe9FxM3F7S+qhdrXFE A9RQ== X-Gm-Message-State: AOJu0YxL3oPuAyucDSWl4HzSAGpAJxukiZX7AWDY6P3tJQHepQMJzPQL cqfCA93MG3tobjetjpzLlLRc3dPoXrC4YXo51yBN/A== X-Received: by 2002:a05:6402:11c6:b0:54a:ee8b:7a99 with SMTP id j6-20020a05640211c600b0054aee8b7a99mr853479edw.0.1701281456539; Wed, 29 Nov 2023 10:10:56 -0800 (PST) MIME-Version: 1.0 References: <20231129165721.337302-1-dima@arista.com> <20231129165721.337302-8-dima@arista.com> In-Reply-To: <20231129165721.337302-8-dima@arista.com> From: Eric Dumazet Date: Wed, 29 Nov 2023 19:10:45 +0100 Message-ID: Subject: Re: [PATCH v4 7/7] net/tcp: Don't store TCP-AO maclen on reqsk To: Dmitry Safonov Cc: David Ahern , Paolo Abeni , Jakub Kicinski , "David S. Miller" , linux-kernel@vger.kernel.org, Dmitry Safonov <0x7f454c46@gmail.com>, Francesco Ruggeri , Salam Noureddine , Simon Horman , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 10:11:09 -0800 (PST) On Wed, Nov 29, 2023 at 5:57=E2=80=AFPM Dmitry Safonov wr= ote: > > This extra check doesn't work for a handshake when SYN segment has > (current_key.maclen !=3D rnext_key.maclen). It could be amended to > preserve rnext_key.maclen instead of current_key.maclen, but that > requires a lookup on listen socket. > > Originally, this extra maclen check was introduced just because it was > cheap. Drop it and convert tcp_request_sock::maclen into boolean > tcp_request_sock::used_tcp_ao. > > Fixes: 06b22ef29591 ("net/tcp: Wire TCP-AO to request sockets") > Signed-off-by: Dmitry Safonov > Reviewed-by: Eric Dumazet