Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp240325rdh; Tue, 13 Feb 2024 15:50:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXMYAdzBEk2lqmZuw9klAOsloszyehjMngxY3OclknCgzvkvw6qSsVfu/GmG7fv2dEYzEq7PK95560UctR5s83bIhsOHTHuRVRxIRaEQ== X-Google-Smtp-Source: AGHT+IESg/XS4JDq2a7gXEYJEd9vfm1H9UyjnX3aKwwGhwq0abJIArLqzeghirS1McHMUAWF2+Iu X-Received: by 2002:a17:90b:351:b0:298:bd8c:11b5 with SMTP id fh17-20020a17090b035100b00298bd8c11b5mr482766pjb.18.1707868213008; Tue, 13 Feb 2024 15:50:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707868212; cv=pass; d=google.com; s=arc-20160816; b=YQN5Tryvgd50PYkx+wpJAug1eN9af/iFKfW9poo302Bj9El8xrWoDzXFhekEQcf9oS 7o0zrirZL6dAQPT3Q8BtWwKLtSXXHOPR75F+SGHW7WKAbjBNNY+s1L7jM8ux4b/9bXPk 4KhXS+xH3TNAToQubtqOpMJ2AUE3cUleITUkL4cBIVPGC/wGNqnv4YTS21KpSEJiwJYX lup3L/7JNRM9OOz66hrjLkMvx5SYC26erKRSvAs5JyCQEyntEQ+16SpNsNAi8V/k+zGF k4wVr1cSJKw+YsOuUrVJAqE1mh3t7Oz16S1ASyCySvm5FWdUwp7+KHmO5GE/chI3MiCc nwKA== 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=wOs2miH9PU17seTtpB1seNG3pbtPurqQtu7wPIC49WA=; fh=nrh/vya4kITVF4K1T6cMY8t0wvVKcDuZRRULyG6K0EE=; b=T/oEOeel0BZX/3KLmsWaVjvFt4UXmCDzyxeQKzQlKXCHT7mslGpuE2oYrTtTz/2/jo QY0DRLsYyCW1AfwkBcVY14xQc6TS6zADwBTeM6A3J190Qj1OaIthZj5BbTgOIY6l6Puu ci7rm3xtLCKv9Xp/QKHRNahv//0fGyD0TmwcA+Abkj7r4cq3yXjwIlWIlhduH9aAXy6h oqHSDFn/f9Xejc7WUr5e7GrjGJXawmNeNJ2SpsKRazDKgbh3S4J6xcYUKMAX94V0DyEQ ErFrEObfEXUDs0nJCeCoEiC8DFEyYRO0oJmRr7YgTpAetHVGy/qqO589EuuAyoaeLNHV BiIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=xwyOMhUS; 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-64565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64565-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; AJvYcCXYNhZTV88/pgKlaLB8TJMtBjmDabodOYqd/2v+kryb8gBaPRUCnoTT+SaH8470z4uv44Z+yifnTD6LRSBmOxj49pK1s+qakd0iW7i1YQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lb15-20020a17090b4a4f00b00298d688c1c4si71718pjb.36.2024.02.13.15.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 15:50:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=xwyOMhUS; 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-64565-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64565-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BFEE52864FB for ; Tue, 13 Feb 2024 23:49:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB6FA633EA; Tue, 13 Feb 2024 23:49:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xwyOMhUS" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.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 7EFFB6312D for ; Tue, 13 Feb 2024 23:49:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868187; cv=none; b=Z/SB8ToDqceRQzP2cYt7PrLcyFttW1QAxMo4jnoILw4FvWiKaNTN6TvNrNOqvTIsmOiQWQgkFpGByAP0tM0dT7aTIez5411MuHzVTmAUrzSljB8u/rvlqWun3sYy2MJ7EC9xIeRp+orp8DM0d816FwMhnvOjDMK1hitEInWx71Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707868187; c=relaxed/simple; bh=0W+rhN0UAZexn1dEtLfCeV9iTTxm3Ye4I94zVL+vFfI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=oE7sbwI9cLr2qL6mftX3EBRSFXfpvS3ZBL/q0UdJGrHeRcTfOEZLOZPMGovz/9KmmaKJJhqZbnbpcTL0gtz0BJVEwHT2bXe+YPMxAZagpkMOyrydfL8kk8u1deEufL1NuoT39XinLhKb/DWF5LNstxT6gInokVQAr9n3dldndSs= 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=xwyOMhUS; arc=none smtp.client-ip=209.85.128.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-yw1-f201.google.com with SMTP id 00721157ae682-5eba564eb3fso101302837b3.1 for ; Tue, 13 Feb 2024 15:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707868184; x=1708472984; 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=wOs2miH9PU17seTtpB1seNG3pbtPurqQtu7wPIC49WA=; b=xwyOMhUS558BZUlUwQg5f94+yOhe1xVs8qlwoG0ur7xGXtEr8f9eLSVKGhBCCCRPbv eC5RQl4VWTqIahk8BJ9xA0hfeUZs3E5T1T6cPUFdDpuQK/kJ1cc2buLR0agsCtb42AiS nmdu+MYX9HbG+pgdckCi35hZ7vOuvkU0bjXSMDxT83Rqy+87uZ/NHP3QRLn0gqAE9F8n SUWwXldsmsNmcEANRDJL4PfZoqQiQSejy4G24u2ZXkbZHanXpY9ja3qvmK1gtaROmKT+ 0r+EDUGCpZFT6FHDW36iyx7UudimSwWCZEcXtBKBs/lgfNjjciiz1gjLclL7Dw3JRu5N AGtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707868184; x=1708472984; 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=wOs2miH9PU17seTtpB1seNG3pbtPurqQtu7wPIC49WA=; b=LrpN4hq+WlNAq7sLiy+IRTkd1Dp6/MdQz+L7PGm6oZIZ9VvB18Us3Yhl5vNGMJ5MIN xMn4wNoX0YlfSPGwwk+HXhQVdqJWvt4+Px7VJF34R0RWX2OIfGH3dYV7/csZd70LA/EQ wdYnFGZlSQbmnraNJgqsUtXdkwAULQzQmnNFC4T+JKSCMM/0VNeNEZDYd8sI5oGNbN8J Qlq5HCedzqvDugMrjGRcv5HEF8Q6jaLipevZ1gn/AJknVlz0qdw1ueJwQbWaTS8Eiqpa saybOIG5gtmbwIdiO1g03iuGWV9hytkyZP5x4KUPDF8vF+slhdsxRswsv6b81KyTrW/8 ixUQ== X-Forwarded-Encrypted: i=1; AJvYcCXHBRbdfh0G2tpaBHBWy1XBO56FtrfUO45VrcUbX5D8lpV9ahYrVzwnFOwe57xQV81Lit2CDrLjU+25eMvryD6Si8tzHKQv8PMBHjw4 X-Gm-Message-State: AOJu0Yxz/4eh9tz138R1gIseR4OEU9jbU2fEkfayIXIvGmMeD1j1oJqO IJdfl9fyMPajd4KYZidwQ/2g73Uk2kSg8H8EdrvSE4Vb79TLI8NILNgcZ47TFew68A== X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a0d:dd09:0:b0:607:8d3b:f1e3 with SMTP id g9-20020a0ddd09000000b006078d3bf1e3mr203365ywe.2.1707868184549; Tue, 13 Feb 2024 15:49:44 -0800 (PST) Date: Tue, 13 Feb 2024 15:49:42 -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: <7lv62yiyvmj5a7eozv2iznglpkydkdfancgmbhiptrgvgan5sy@3fl3onchgdz3> Message-ID: Subject: Re: [PATCH v4 bpf-next] net: remove check in __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/13, Oliver Crumrine wrote: > On Mon, Feb 12, 2024 at 08:49:14AM -0800, Stanislav Fomichev wrote: > > On 02/09, Oliver Crumrine wrote: > > > Originally, this patch removed a redundant check in > > > BPF_CGROUP_RUN_PROG_INET_EGRESS, as the check was already being done in > > > the function it called, __cgroup_bpf_run_filter_skb. For v2, it was > > > reccomended that I remove the check from __cgroup_bpf_run_filter_skb, > > > and add the checks to the other macro that calls that function, > > > BPF_CGROUP_RUN_PROG_INET_INGRESS. > > > > > > To sum it up, checking that the socket exists and that it is a full > > > socket is now part of both macros BPF_CGROUP_RUN_PROG_INET_EGRESS and > > > BPF_CGROUP_RUN_PROG_INET_INGRESS, and it is no longer part of the > > > function they call, __cgroup_bpf_run_filter_skb. > > > > > > Signed-off-by: Oliver Crumrine > > > > Acked-by: Stanislav Fomichev > > Quick question: My subject had "net:" in it. Should it have had "bpf:" in > the subject instead? > > If yes, would this warrant another version of this patch or resending it > with a different subject? > > It felt right to put net: there as it felt like I was working with > networking code that was simply calling bpf code but I'm not exactly > sure of that anymore. > > This is my first kernel patch that has actually gone anywhere and > I'm just looking for some feedback as I couldn't find much good > documentation on kernel.org that describes how I should be doing > this. It's fine, the only part that really matters is [PATCH bpf-next]. That puts it into bpf patchwork so somebody will merge that eventually :-) WRT documentation, Documentation/bpf/bpf_devel_QA.rst should have all the info you need.