Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp637154rdb; Thu, 8 Feb 2024 17:08:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFLq4s81mLFoSIy8T0rSZ1aZwoFHPOxxz0YHNiHmSTv7yeOlI5v6UdbsRHxjQLl2yTI5P9 X-Received: by 2002:a05:6a21:3a81:b0:19e:b6c6:8f15 with SMTP id zv1-20020a056a213a8100b0019eb6c68f15mr331064pzb.25.1707440896090; Thu, 08 Feb 2024 17:08:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707440896; cv=pass; d=google.com; s=arc-20160816; b=lNg2lmyuvpCoW1fqCP1pvvYYva0BNjvPjWRLvEvcrErgMMW1vZJaQdfBrstxhBr6sF oNC1hMT295oKnHSQqHYlQvcgD8e0ol7itwrod8rAsYqijBzKjIThGzFNrcxHLnxSHmj0 1EMefJGF/MBlgL+3ioJY8PSKLRHNeFB1hmFWDTDATRN35DcI/mcg2w7boOcippw1llg1 PSz61bXxkyA7MtPAptPlJEzUDVx7eZXSJ3aRNps4GT8C1ijq7SwKA2w4tXPJzGu5Dh+F b305mIg3Wbey/MY7nyNJgKd6+YlQ2LEqflFfI02X1IMCRjIK1HLb47l/l2y0fQPB8ZXC 7Arw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=RoO/AYczjRmfK2y8baMVNsK+Qib8OGiIWBRfrTnSMC0=; fh=EpdRuDKmUIFCkJGFMQZYeRvb3QAPSN2gIJsLAFXMxJM=; b=k+Ulu90WrG2iTB4SisEjuX2HLN58F+ymZVUUsuIvjFIR/NAkdM0SWTWSF4hj/jeVmY XLHDVuIGZRy87uhM+g+BQAk/RbI3pd8o73R0Sn2giXNc5+bWj5RyZqmEhP1ZBkb6NVFj DZIoFK93IZbL9m6VXWeyW00cO18U1zhWJq0/VDI0rJHaIn3ok16SVSFABxVGO9GDF1+z eZqJIfGvJXu1OTO7ggtpNq3U0uWV3gXDzXi/DBMOQ86jpJ8jkfGOyhiRYrna/m3ldrUa k4tBG+zdWB30unsDG4zRIY8SnRm5slv/tOjUPMNucG/K42ulM/58jSrLRnryVFUXtbic hN6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kwZ46+gg; arc=pass (i=1 spf=pass spfdomain=flex--sdf.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCU7sYTUQ58CIh2sFpm89A30GkAcbTdkRqZmXXO04E9JonHgeyxpuTeF4lC78PYXJHPCKr/ttZKxN9f3v7a98M82bgYLKkDdT1QMDc6p6w== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id kb18-20020a17090ae7d200b002943cd1b20asi681219pjb.93.2024.02.08.17.08.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 17:08:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=kwZ46+gg; arc=pass (i=1 spf=pass spfdomain=flex--sdf.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-58909-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 99369B22D64 for ; Fri, 9 Feb 2024 00:43:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7119FA5F; Fri, 9 Feb 2024 00:43:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kwZ46+gg" Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128B8376 for ; Fri, 9 Feb 2024 00:43:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707439390; cv=none; b=F5mYkLdHt4VFtqe/wusYnpZkthNtKIY+b9MiYwDsNchMg5lSSBYNYXOPZyhzN+KxGec/zUz78UdbzIOyTR8IQlUtxKj946/CP1Ge9yGFbj3IDtwAd+wDq9EmkCQ8OL2ADAvwhQrhkEsI1u3G8TJmHlsqFIPdjq6VbPkNpgLPO6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707439390; c=relaxed/simple; bh=2oAnO/g2tacYgXjulh1LaEWxa3FD8yP3GFfq3RtHp1Y=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CDNA55hya3HVJG/ghWezGj2CAba9d7RBDl+TERsORmYBh53oHiZKEUzYBuOCnDoUuNcWxFrduhi7plLxJftnpcGp3761rkBZYI2vByujfv0+0/NiGlM7D7/98LdG+tNr9lIIGOoiPu/3U2CBPDPy5LsyuEh2gfr5FCM+Af46qM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--sdf.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=kwZ46+gg; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--sdf.bounces.google.com Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-1d9742bff20so15310595ad.1 for ; Thu, 08 Feb 2024 16:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707439388; x=1708044188; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=RoO/AYczjRmfK2y8baMVNsK+Qib8OGiIWBRfrTnSMC0=; b=kwZ46+ggv4uU1SrG73Hng0g5SQ/dtXSNpFuqQZ5oLiq+Y6FXzYYq/427qtFf5G6Kkx aXm8PvZiY66EHr3/ruAGwlFI21+9JUkedT//yvn7Fkm7Ow3dNVIQOluIZgVzxTfWaUbN 0HE/3ezEqFXtGM1xi8AQjsV7M7iLhHzriepqXud6QKD1nVHuJWPX5PaWRJZB2SBKLyU/ 3LCXcNb0RtTk0+eJQVe1cPv7aOTuQ3Nh58rwPuw13iHukTvWxTc5bFRA5C4WNU+UqFrA OTqS8bIfetihF4PAahoQtEoatEHk5LX4BuSjsa/gB4RgoEhpVf6WsYJb3Z/m54XjJp2q pquw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707439388; x=1708044188; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RoO/AYczjRmfK2y8baMVNsK+Qib8OGiIWBRfrTnSMC0=; b=ZvhXR9BzzLbCLxlDP3+iylF2261PXyWnwl6cKmLZc3tp/+qt+i0SQK9LDKAaginNja 2VWPY2+ersvutpwHIuitPvhyO038+pBddmjF+6vaQTy7rLC71tOrp2xifP35xxDc1kYR bjybzJdliRG6IRGajchq9hpZ+fLzVel1UTG7ETh+EBOufiJLp9mtt8XpPX0yYuYPeulV gy6NYzAN5wo+wIFPGzdf4aUZNgDRaX6QVPp1GdFGcXUn/eOD74IY83xihSKfN6TIJa9W HcBo5t/BviifrOEOLwOJ21GgxhIQdjQ+lXWkOtbpVjVwDa8hgAWHjMoiGsECql4JTW9v OUIQ== X-Gm-Message-State: AOJu0Yy2oulsN7SgZ+ZJUFc9empgHUqRte4GBdAOHECablGBt+EOMN0g hOd7rrAmwuD33JOPwGqOTmbW8jsNhrH0R8H6lqocir8xAxEMXe8pNhH4eL0IEGdhRg== X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a17:903:2349:b0:1d9:3baa:ef64 with SMTP id c9-20020a170903234900b001d93baaef64mr146plh.3.1707439388220; Thu, 08 Feb 2024 16:43:08 -0800 (PST) Date: Thu, 8 Feb 2024 16:43:06 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH] net: remove check before __cgroup_bpf_run_filter_skb From: Stanislav Fomichev To: Oliver Crumrine Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On 02/08, Oliver Crumrine wrote: > Checking if __sk is a full socket in macro > BPF_CGROUP_RUN_PROG_INET_EGRESS is redundant, as the same check is > done in function __cgroup_bpf_run_filter_skb, called as part of the > macro. The check is here to make sure we only run this hook on non-req sockets. Dropping it would mean we'd be running the hook on the listeners instead. I don't think we want that.