From patchwork Sat Jul 29 07:49:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Tintel X-Patchwork-Id: 1814482 X-Patchwork-Delegate: stijn@linux-ipv6.be Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=y0lSyMEc; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-ipv6.be header.i=@linux-ipv6.be header.a=rsa-sha256 header.s=502B7754-045F-11E5-BBC5-64595FD46BE8 header.b=DprE4LmO; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RCcGD3DTFz1yf1 for ; Sat, 29 Jul 2023 17:54:10 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5RDyspzz2kaxQFxi81PqHeQjp4rBVfh8aZ8aRd7NQQk=; b=y0lSyMEcQ7pAdJ EIYMegOeExmW+JNBBVJGx5h/Oo1U1Atk9HH1FBkC9LcQdVRfOOxgp8LV1rWSZNAg9/X77La/mzwLD RkYvwnwgf13JCa+LYLwuiMatHh1mXdLE8kEJLSB8y8WwnEBXiwAQi8AjA3gOBkx8SxvoTQ1Gqkb2W U7EeyZlvvYGN9BJRGdAydw4oNfKwRan50tqgPgfdER+DZr+h6bQ0x4eIXpTlUTwidxFjqLEvbDM8/ gJ9CwK8dKlUEa9vAR5qH5mkZfMV5NnHLw2DIqlRXFSCXIGR2GsalFMhxJm6kqgZM1HqgTpnwN0i3u W2jyhuiKZ2InY7e+HaLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qPeiH-006erE-1U; Sat, 29 Jul 2023 07:50:09 +0000 Received: from mail.tintel.eu ([2001:41d0:a:6e77:0:ff:fe5c:6a54]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qPeiC-006eqC-1Q for openwrt-devel@lists.openwrt.org; Sat, 29 Jul 2023 07:50:06 +0000 Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id E73E640FA7E5; Sat, 29 Jul 2023 09:49:57 +0200 (CEST) Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id 72UI0MrF22pJ; Sat, 29 Jul 2023 09:49:57 +0200 (CEST) Received: from localhost (localhost [IPv6:::1]) by mail.tintel.eu (Postfix) with ESMTP id 3A8A342AA2CA; Sat, 29 Jul 2023 09:49:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tintel.eu 3A8A342AA2CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-ipv6.be; s=502B7754-045F-11E5-BBC5-64595FD46BE8; t=1690616997; bh=itX+MPPws+KHhEe8W7HwZRlHCqjkpWzkHnAfLy5Smsk=; h=From:To:Date:Message-ID:MIME-Version; b=DprE4LmOPrLZxvxGEduqVCP7L1IxedZvvboEJFACl/++vZgorTvok0Y1DngEUjuT3 Z/s9N5LcVXz4J7GLPFc/jO6JBQ9Q5lnO5+2DA4NfHazgxSPXzypU/WgiCXV5TzTO/d N5ojt/Klqrqz6ZulL58gBZZAR8FQl9eL6CdIg6IQ= X-Virus-Scanned: amavisd-new at mail.tintel.eu Received: from mail.tintel.eu ([IPv6:::1]) by localhost (mail.tintel.eu [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 3nlCJoG1GhSh; Sat, 29 Jul 2023 09:49:57 +0200 (CEST) Received: from taz.sof.bg.adlevio.net (unknown [IPv6:2001:67c:21bc:20::10]) by mail.tintel.eu (Postfix) with ESMTPS id D180740FA7E5; Sat, 29 Jul 2023 09:49:53 +0200 (CEST) From: stijn@linux-ipv6.be To: openwrt-devel@lists.openwrt.org Cc: daniel@makrotopia.org, vincent@systemli.org Subject: [PATCH] xdp-tools: disable stack protector for BPF programs Date: Sat, 29 Jul 2023 10:49:31 +0300 Message-ID: <20230729074931.1527472-1-stijn@linux-ipv6.be> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-Rspamd-Queue-Id: D180740FA7E5 X-Spamd-Result: default: False [2.49 / 15.00]; RDNS_NONE(1.00)[]; R_SPF_FAIL(1.00)[-all]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; MX_GOOD(-0.01)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DIRECT_TO_MX(0.00)[git-send-email 2.41.0]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:200533, ipnet:2001:67c:21bc::/48, country:BG]; FROM_NO_DN(0.00)[]; IP_WHITELIST(0.00)[2001:67c:21bc:20::10] X-Rspamd-Action: no action X-Rspamd-Server: skulls X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: IP_WHITELIST X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230729_005004_792115_DE68C176 X-CRM114-Status: UNSURE ( 8.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When building xdp-tools with CONFIG_USE_LLVM_HOST=y, on a host that enabled stack protector by default in Clang, compilation fails with the following error: CLANG xdp-dispatcher.o clang-16: error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpfeb' [-Werror,-Woption-ignored] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org When building xdp-tools with CONFIG_USE_LLVM_HOST=y, on a host that enabled stack protector by default in Clang, compilation fails with the following error: CLANG xdp-dispatcher.o clang-16: error: ignoring '-fstack-protector-strong' option as it is not currently supported for target 'bpfeb' [-Werror,-Woption-ignored] Add -fno-stack-protector to BPF_CFLAGS to fix this. Signed-off-by: Stijn Tintel --- package/network/utils/xdp-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index 3cc7980cf6..dba775e4ea 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -94,7 +94,7 @@ MAKE_VARS += \ define Build/Configure $(call Build/Configure/Default) - echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib" >> $(PKG_BUILD_DIR)/config.mk + echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk endef define Build/InstallDev