From patchwork Fri Nov 26 11:19:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 12640397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5788C433EF for ; Fri, 26 Nov 2021 11:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237993AbhKZLYy (ORCPT ); Fri, 26 Nov 2021 06:24:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52974 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237992AbhKZLWv (ORCPT ); Fri, 26 Nov 2021 06:22:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637925578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=qkz3t6yTtCyGGIa4smq1sgd2IxE223NuLT4wxqa7ekM=; b=OitM6paGFrDHvquKvAiHhdr30O693FgspUkKg0d+giwPwj5lLgEaaJw6hrMD2wvEKDBFVq anVFrXAL9Fp0rXBW3c5SBOuAEpfOiLPBeC8SATPZ1xmiswWDUF8z92EGSCxkHt255f+KXM Qwd7UihIXwneexA/A9XOs/JeJ75O+LA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-432-HCoO5XZEMrWFZARas5sMyA-1; Fri, 26 Nov 2021 06:19:35 -0500 X-MC-Unique: HCoO5XZEMrWFZARas5sMyA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 489F61853022; Fri, 26 Nov 2021 11:19:34 +0000 (UTC) Received: from gerbillo.fritz.box (unknown [10.39.194.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 796E960BF4; Fri, 26 Nov 2021 11:19:19 +0000 (UTC) From: Paolo Abeni To: netdev@vger.kernel.org Cc: Alexei Starovoitov , Daniel Borkmann , bpf@vger.kernel.org, =?utf-8?q?Toke?= =?utf-8?q?_H=C3=B8iland-J=C3=B8rgensen?= Subject: [PATCH net-next v2 0/2] bpf: do not WARN in bpf_warn_invalid_xdp_action() Date: Fri, 26 Nov 2021 12:19:09 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The mentioned WARN is quite noisy, especially vs fuzzers and apparently used only to track the relevant BPF program and/or involved driver. The first patch replace it with a pr_warn_once(), and the 2nd patch allow dumps relevant info to track the reported issue. This is quite invasive, but the mentioned WARN makes the hunt for some bugs reported by syzkaller quite difficult. v1 -> v2: - do not include the device name for maps caller (Toke) Paolo Abeni (2): bpf: do not WARN in bpf_warn_invalid_xdp_action() bpf: let bpf_warn_invalid_xdp_action() report more info drivers/net/ethernet/amazon/ena/ena_netdev.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 +- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 2 +- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 2 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +- drivers/net/ethernet/intel/ice/ice_xsk.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 2 +- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +- drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +- drivers/net/ethernet/microsoft/mana/mana_bpf.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 +- drivers/net/ethernet/sfc/rx.c | 2 +- drivers/net/ethernet/socionext/netsec.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/ti/cpsw_priv.c | 2 +- drivers/net/hyperv/netvsc_bpf.c | 2 +- drivers/net/tun.c | 2 +- drivers/net/veth.c | 4 ++-- drivers/net/virtio_net.c | 4 ++-- drivers/net/xen-netfront.c | 2 +- include/linux/filter.h | 2 +- kernel/bpf/cpumap.c | 4 ++-- kernel/bpf/devmap.c | 4 ++-- net/core/dev.c | 2 +- net/core/filter.c | 8 ++++---- 37 files changed, 44 insertions(+), 44 deletions(-)