Message ID | 20231031114800.2874685-1-hauke@hauke-m.de |
---|---|
State | Accepted |
Delegated to: | Hauke Mehrtens |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=sW72cr2L; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=wuIcx2Qa; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SKT411SNNz1yQZ for <incoming@patchwork.ozlabs.org>; Tue, 31 Oct 2023 22:50:55 +1100 (AEDT) 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=oh5qhD6P1ojAO+RAavNuzeV73it0IFsDmO7NlIZ/6I8=; b=sW72cr2LBkgAbW MhL5kuIdMKT+yIb+K6LtNiTFHOjwKevNUgVaVnHQLDItRWEUSzY2Aac1r2Lt+dkbi9AnIxBGPr0Af xxQL/jJznxuZ+8IdHhfF0WnP2C2HLyoGcgtjcjmLVUGIiG4JvQI1V2dNduAKcWAtO850TFdSUHg9S Ag9mC+MzxmcKqpZN12D5nW/fF1NvJyATaruaS9iNMlR3+k534m/9VXOHmSo8kY3eOYJBTbl3G51iO wLUi5//Ij+BDI6TbtCMrBQgKBIuZ+qTu1VAUnAXWFaFlDKtnF3WvQMZWtU38DvgvqMyLDGaxCb1dL gRlE42aJ2Dy/SlXJXIsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxnEO-005Bim-0W; Tue, 31 Oct 2023 11:48:24 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxnEL-005BiI-1S for openwrt-devel@lists.openwrt.org; Tue, 31 Oct 2023 11:48:22 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::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 mout-p-102.mailbox.org (Postfix) with ESMTPS id 4SKT0w5J06z9sTW; Tue, 31 Oct 2023 12:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1698752896; 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=1ZdRz1Nuw+xbn9M/ku3QIhWKdKxE7ipMfpU7Gi+2gfU=; b=wuIcx2Qa/PN4PhBwXnBCD0Lckpaogsb8N4iXVX4gPhEje9QPDL75oYraV3zax92swMD0+z H68INh0wVRr6xodC1ds/kooAwM00nVnO6ic99+LbTQCPeLlWgRLl2IqSX6o4UgrtoXlFiB WNccTDoNAQLVXSW6OfiDvxn/1Sn94qljMbdNIazplqrZAoOyHCK+1UwuDtqKQKRiDZ1jLc H21DbqGaTjzsOYp8rcE+g1IS+D9C3+aUe9H8SanL2qFJyfX96hcgz1l4OayGlqFD8bheXT vVm4uDt+Pu/BI/7QRlLBcUlJ5qA3ZwB14FKB/sIrRrF8dVddOYRMBrT8L1WL4A== From: Hauke Mehrtens <hauke@hauke-m.de> To: openwrt-devel@lists.openwrt.org Cc: amadeus@jmu.edu.cn, a.heider@gmail.com, ynezz@true.cz, rafal@milecki.pl, jonas.gorski@gmail.com, Hauke Mehrtens <hauke@hauke-m.de> Subject: [PATCH v2] Deactivate _FORTIFY_SOURCE in jitterentropy-base.c Date: Tue, 31 Oct 2023 12:48:00 +0100 Message-Id: <20231031114800.2874685-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4SKT0w5J06z9sTW X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231031_044821_641020_14AB0163 X-CRM114-Status: UNSURE ( 8.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: This fixes compilation with glibc. _FORTIFY_SOURCE only works with compiler optimizations activated. We have to deactivate it when we set -O0. This fixes the following error message with glibc: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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 <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
[v2] Deactivate _FORTIFY_SOURCE in jitterentropy-base.c
|
expand
|
diff --git a/CMakeLists.txt b/CMakeLists.txt index a1ee0c1..f415f87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,11 @@ ADD_EXECUTABLE(urngd ) TARGET_LINK_LIBRARIES(urngd ${ubox}) -# jitter RNG must not be compiled with optimizations -SET_SOURCE_FILES_PROPERTIES(${JTEN_DIR}/jitterentropy-base.c PROPERTIES COMPILE_FLAGS -O0) +# jitter RNG must not be compiled with optimizations, _FORTIFY_SOURCE needs optimizations +SET_PROPERTY( + SOURCE ${JTEN_DIR}/jitterentropy-base.c + APPEND PROPERTY COMPILE_OPTIONS -U_FORTIFY_SOURCE -O0 +) INSTALL(TARGETS urngd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
This fixes compilation with glibc. _FORTIFY_SOURCE only works with compiler optimizations activated. We have to deactivate it when we set -O0. This fixes the following error message with glibc: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] musl libc does not show an error message in this case, but has the same internal problems. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Changelog: v2: Use SET_PROPERTY and COMPILE_OPTIONS