Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1389499ybd; Wed, 26 Jun 2019 16:58:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCaVy1GTsMJfb/tGE9M0KfDxcJKcr5CWPQvut7M5gFm2MtGfD78C/+l4qYDhp5bxamcXtB X-Received: by 2002:a17:902:b591:: with SMTP id a17mr913958pls.96.1561593514254; Wed, 26 Jun 2019 16:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561593514; cv=none; d=google.com; s=arc-20160816; b=iGeLtWXCo9VyIxjoPvd7GdcW2S3jHJ4OWGdhudsYl9i1KfMjirMPspKvCp1aUZqmD9 CnPwuH4Ur6Bo4RxCsRpEAVvefxldQDUFArXLalbhQq/t5GUbKZ1nKGLuwCOhALjwkhlE B0P4j1oCrF51CjmxsG0fnTYvxpnHOQ/jXDcNQS4eDfuLs9MxwhuXmhrj9dgMBetdAg4V AWke3B2g6aNN8ZPnbjH+YEgMZkR9OpjWOXo0Trx2aC6pTQOKXzrjIBl59c34JgmlZhOJ SZF/JcFO3lfi0IUcBthtS3v8eXBXGbJblfQdK8rmURqaqt7Ptrf7kFd2aG013dxDavW9 zsPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=kFK6kUjpqNh/C0sbAwD586/2wF+g+pKdLWduP+48Qag=; b=A/VnVeGwTbbd1NG36G10DbRS+cIaBTtwpcLjK7DaBGv+rf56Ek2vs89dDYz65KNBzm Xl2taL0FOEv4whgWqPmNU986AQo2/tE6OvaL8zXMKJW0k/vqRt8LjtDAHupKq+3q4Pod ZnyGr5ruPPZnK7+FDik0TlN8yLBosjKzfRMkFIS1HwcoDAoLYRZJSdzdg7y5d5iLv9R8 6GAZKGEmrC7r0fdF4yVe/saoCzjgjekbQpf/rX+lKr8zQEW+aaB98+bFeSIYSpr4EYYd LlVjFczpXaXfj2D3nAfwGFB/VWnqy5u9Vpj0b5Ts8voUUKdSRMzA3tb1SPbgwYJG3hNO LbNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OULKLsIl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si426661pgp.245.2019.06.26.16.58.17; Wed, 26 Jun 2019 16:58:34 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=OULKLsIl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbfFZX6H (ORCPT + 99 others); Wed, 26 Jun 2019 19:58:07 -0400 Received: from mail-pg1-f201.google.com ([209.85.215.201]:48690 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbfFZX6H (ORCPT ); Wed, 26 Jun 2019 19:58:07 -0400 Received: by mail-pg1-f201.google.com with SMTP id z10so201583pgf.15 for ; Wed, 26 Jun 2019 16:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=kFK6kUjpqNh/C0sbAwD586/2wF+g+pKdLWduP+48Qag=; b=OULKLsIl+2/igNiIyxSMQEZ09WlnN7Q5vcihYkyYKx5gqRl+4Fbh9jeuEqzKZBN+/r wlaJD5vkDwxc3zfuQt0mbw0H6y2M2Zuql6lPB6OW2f9Y3/sI+n7/KumjC/nymAHGz2qs twccjv2IPx5YPeC5dwXfnSl5SEqWbjesOYdm0T4gzPZ2l/QEOlJsyCVYp6EuZnWm29pe UoJUAJ/6/e2WR82o0NqGO08HkR5uxmV8Phz/tEKsE5TafnvB6pi9QMGj8choxTMwtsRz mDSuXDWWdIYDM+9AMHf4xixOtk5UojQRnVoyuBvCmUko3A54JVoBcMukHDpHSdR07LiG gFrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=kFK6kUjpqNh/C0sbAwD586/2wF+g+pKdLWduP+48Qag=; b=NKakLYK0h8BuYYBRPTcv1cUyTvbaIlIpWQgsLNnPU1MarBaUgiTD3Gh+cI++Urm+Hc 1Hrhz1kFPmTuFxHHmZHShPwsaGCmklmrbD5VmTkTi9qMj+7Tc8QIvC6mCqz5qo2uocX4 kk3AZgqTGdk9+W0pBtUkPoC8TiLzx5bYdhPkqgRAR3+iQYaqjxeJ+hYbJYO0IfF1O3yK k03rFqh/ET8/DAWCxJ5afIlOY98NuivOPcR9FjwuCMv3KLa79zlymODHwPdz3evzE5/B 38DB4Ph99bEW2S+xgF5v50/+mRwi0p9eb1Ojzw/UKmOgfXBgkSvfN3ROGhL+6NwCGafF C+vQ== X-Gm-Message-State: APjAAAUiIvT9p9DD2NGmcO1hBRXFYTFwLF/h+s60J2trxMGOIbi1dbk+ QYOyLKmFQFVDJvm/jgK9i/VC3XV30UW0WuJv X-Received: by 2002:a63:5048:: with SMTP id q8mr639484pgl.446.1561593486318; Wed, 26 Jun 2019 16:58:06 -0700 (PDT) Date: Wed, 26 Jun 2019 16:57:59 -0700 Message-Id: <20190626235801.210508-1-allanzhang@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH bpf-next v7 0/2] bpf: Allow bpf_skb_event_output for more prog types From: Allan Zhang To: Daniel Borkmann , Song Liu Cc: Alexei Starovoitov , Martin KaFai Lau , Yonghong Song , "David S. Miller" , linux-kernel@vger.kernel.org, Allan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Software event output is only enabled by a few prog types right now (TC, LWT out, XDP, sockops). Many other skb based prog types need bpf_skb_event_output to produce software event. More prog types are enabled to access bpf_skb_event_output in this patch. v7 changes: Reformat from hints by scripts/checkpatch.pl, including Song's comment on signed-off-by name to captical case in cover letter. 3 of hints are ignored: 1. new file mode. 2. SPDX-License-Identifier for event_output.c since all files under this dir have no such line. 3. "Macros ... enclosed in parentheses" for macro in event_output.c due to code's nature. Change patch 02 subject "bpf:..." to "selftests/bpf:..." v6 changes: Fix Signed-off-by, fix fixup map creation. v5 changes: Fix typos, reformat comments in event_output.c, move revision history to cover letter. v4 changes: Reformating log message. v3 changes: Reformating log message. v2 changes: Reformating log message. Allan Zhang (2): bpf: Allow bpf_skb_event_output for a few prog types selftests/bpf: Add selftests for bpf_perf_event_output net/core/filter.c | 6 ++ tools/testing/selftests/bpf/test_verifier.c | 12 ++- .../selftests/bpf/verifier/event_output.c | 94 +++++++++++++++++++ 3 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/bpf/verifier/event_output.c -- 2.22.0.410.gd8fdbe21b5-goog