From patchwork Sat Nov 14 08:19:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 1400239 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=tessares.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=tessares-net.20150623.gappssmtp.com header.i=@tessares-net.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=JbfkIYnZ; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CY7Ym6m8Qz9sTv for ; Sat, 14 Nov 2020 19:20:12 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 49FF9100EF25C; Sat, 14 Nov 2020 00:20:07 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::642; helo=mail-ej1-x642.google.com; envelope-from=matthieu.baerts@tessares.net; receiver= Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5256A100EF247 for ; Sat, 14 Nov 2020 00:20:04 -0800 (PST) Received: by mail-ej1-x642.google.com with SMTP id o21so17246833ejb.3 for ; Sat, 14 Nov 2020 00:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tessares-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jij3OZM9DK03+4dG4/T1sHc0VGKxyYZnAjruFVeLiZQ=; b=JbfkIYnZnP7Alz16j5S89u6DRCBnCSxkbzundAL9J70Nw/bnd/yAp3SmDOwMQjHvjl gPui8KiqFJPsDMc+03gB5JKipyquy4hwDwUMVDXxFsE2QdRA5uO9sTBt0r58Pkck5bcb D5QGE9A0vpxkDNzYdaKvNiG5zCrfbckqx5Q9sfXc8mDRGEp5DjChbHYN/5cT/7X2dBo6 unKXgXr+5ikvcKCX9oI48E5gzhapLwzVFoTbcyl8c0el14XUleKL7D7ugtSc3g2GQW/U dBC6APp3DoLK1v+I/4wQ0IfOxNMmL7WQ7Wb5EUD68+7wvE//Y2XOUmejJZA5geH30yLu +Qsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Jij3OZM9DK03+4dG4/T1sHc0VGKxyYZnAjruFVeLiZQ=; b=RvULuPst9DjEsDyTT2MehHwYETDZtJ4jOW83JbQdion+8XdDMTrsIHugIvHVLWNk1f AztcNPCckwjiGez2MIRuhGvfBzYq//n3Ud8WAYPdn29YXo4/SJTE7APLaHiQk3D70Ymh ZTLWLdComoBJpBLQvDivm7BD+8i2NekDL+ixWhIPe302njT2+8wAQH+yha3+qhggueYr ckbYn0/a/kHnZVhV2V1gDfmmDrlsptkZdQxx+U+Y65A0wpPKm5YUP2JXt7hHfsCPRpIi eY2B2vly+MDcb5ItW0Hge3VFnZkrnmPdTgNfKBXi+qbsUcuJI12zorbsxPKDt6EjDQ1E K/Xw== X-Gm-Message-State: AOAM530QoKddDRAphpUgx5ju+Dj5u1BhyczU9RQNUr2SIGdJ/fvQL6zM wjgb/ZmbJ/GyPCVTgbo3oL6K3VjIyEShgLJK X-Google-Smtp-Source: ABdhPJyPPScfcsAZlG59oXBPeA8YOFOqJ/VaIFUKI0+YG/mkz/7/h5qMZ7TgYp04wSPL/IwPwZgVrA== X-Received: by 2002:a17:906:1d50:: with SMTP id o16mr5912094ejh.145.1605342002792; Sat, 14 Nov 2020 00:20:02 -0800 (PST) Received: from tsr-vdi-mbaerts.nix.tessares.net (static.23.216.130.94.clients.your-server.de. [94.130.216.23]) by smtp.gmail.com with ESMTPSA id ld21sm5862780ejb.104.2020.11.14.00.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 00:20:02 -0800 (PST) From: Matthieu Baerts To: mptcp@lists.01.org Date: Sat, 14 Nov 2020 09:19:36 +0100 Message-Id: <20201114081936.2617526-1-matthieu.baerts@tessares.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Message-ID-Hash: VHOTN6JVGEOGYQQ7AYEGOJD6CYKVYDSC X-Message-ID-Hash: VHOTN6JVGEOGYQQ7AYEGOJD6CYKVYDSC X-MailFrom: matthieu.baerts@tessares.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: kernel test robot X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH mptcp-next] bpf: move bpf_mptcp_sock_ fn out of CONFIG_INET List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: If CONFIG_INET is not enabled, our bpf_mptcp_sock_*() functions were not declared as reported by the 0-day bot. We can simply move these bpf_mptcp_sock_*() functions out of #ifdef CONFIG_INET Because these functions are surrounded with: #ifdef CONFIG_MPTCP which depends on CONFIG_INET. Fixes: 0da79c831507 ("bpf: add 'bpf_mptcp_sock' structure and helper") Reported-by: kernel test robot Link: https://lists.01.org/hyperkitty/list/mptcp@lists.01.org/thread/RT36VFHG56TKRUO6EJQOIIUPWDJZELIL/ Signed-off-by: Matthieu Baerts --- Notes: to be squashed in "bpf: add 'bpf_mptcp_sock' structure and helper" include/linux/bpf.h | 56 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 269033924cb7..10f2329ed654 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1895,34 +1895,6 @@ struct sk_reuseport_kern { bool bind_inany; }; -#ifdef CONFIG_MPTCP -bool bpf_mptcp_sock_is_valid_access(int off, int size, - enum bpf_access_type type, - struct bpf_insn_access_aux *info); - -u32 bpf_mptcp_sock_convert_ctx_access(enum bpf_access_type type, - const struct bpf_insn *si, - struct bpf_insn *insn_buf, - struct bpf_prog *prog, - u32 *target_size); -#else /* CONFIG_MPTCP */ -static inline bool bpf_mptcp_sock_is_valid_access(int off, int size, - enum bpf_access_type type, - struct bpf_insn_access_aux *info) -{ - return false; -} - -static inline u32 bpf_mptcp_sock_convert_ctx_access(enum bpf_access_type type, - const struct bpf_insn *si, - struct bpf_insn *insn_buf, - struct bpf_prog *prog, - u32 *target_size) -{ - return 0; -} -#endif /* CONFIG_MPTCP */ - bool bpf_tcp_sock_is_valid_access(int off, int size, enum bpf_access_type type, struct bpf_insn_access_aux *info); @@ -1973,6 +1945,34 @@ static inline u32 bpf_xdp_sock_convert_ctx_access(enum bpf_access_type type, } #endif /* CONFIG_INET */ +#ifdef CONFIG_MPTCP +bool bpf_mptcp_sock_is_valid_access(int off, int size, + enum bpf_access_type type, + struct bpf_insn_access_aux *info); + +u32 bpf_mptcp_sock_convert_ctx_access(enum bpf_access_type type, + const struct bpf_insn *si, + struct bpf_insn *insn_buf, + struct bpf_prog *prog, + u32 *target_size); +#else /* CONFIG_MPTCP */ +static inline bool bpf_mptcp_sock_is_valid_access(int off, int size, + enum bpf_access_type type, + struct bpf_insn_access_aux *info) +{ + return false; +} + +static inline u32 bpf_mptcp_sock_convert_ctx_access(enum bpf_access_type type, + const struct bpf_insn *si, + struct bpf_insn *insn_buf, + struct bpf_prog *prog, + u32 *target_size) +{ + return 0; +} +#endif /* CONFIG_MPTCP */ + enum bpf_text_poke_type { BPF_MOD_CALL, BPF_MOD_JUMP,