From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id 6159038AA267 for ; Tue, 15 Nov 2022 19:32:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6159038AA267 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-1322d768ba7so17412166fac.5 for ; Tue, 15 Nov 2022 11:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=etoHoTPjYPKroLP2dlBBJQpkXxXZ2MZCW9anWU8E/jE=; b=PvdlT77qtC2rM3DpOMPk6H6c3pFMJmZJ6pjh+UfFmh0lnPG0fvv6HvuRTXqQ4qkQ2s wPCDGSPgEtlDee6PpBYToxdC8R/WBsMKNVCwjklFY5hOM8nYhM1imCzGgaSzlhX6cka5 +VTlZ40MaUZ7OLIP6eo4JDW0iW05W195Ee7SopWFJJnu0DZHp9V8UoN1p1NC1/iRoek9 ZgQN79JSBxGomb2S2XkjCCftrA3xFmBd102Wk0PmmYSR8OlQmyTo9Mr0H5uCbnak0fiw RtKgSVG1LG3pkgJFUp+E+lmR0gIYX/9yrx55ntdlcvrCdv/0UlIVQdwiZRumP7MsIpHv 1GNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=etoHoTPjYPKroLP2dlBBJQpkXxXZ2MZCW9anWU8E/jE=; b=lWPlzdUyVqqRP7Ex4lv+erT0F+mWekwCY+//32BG5eC0YNjjeHT5uoQujr/8SUIeq0 EdvuttOav7uXOPzOmuNB/Crr/K7b/o0ipc+RKmRifFJ7t1R665rvMyBtBvr/PTYL6uME HxvIjCrSwbuG3su6mK+KHM7pcIbCTFzCX9s9eQfK4ql9p3wSslHBi2waRXY2Aq5DlvA0 Fdw/RlXA9Lqz9dVYB4n0wudWG5XlBt+27tSYpTpEPYdwAdPpheC8Q3xXu3NwZr70aQca bsB1pXfFqMXTMHYI9MLB0ICfxO+FYHn4kx94OJAs1tJi9lOMayzQxrB12VRrAGohvxYn 0+Hg== X-Gm-Message-State: ANoB5plWu5Q0u6HqkHCKiyc7Fao4ngMN00vZy9tWcS7EA5btV0lxy7zz aoBXEiy0AaewUKF22gDEaQBWYPmmXkn3uoKm X-Google-Smtp-Source: AA0mqf6SZuoDHGmFGE8Y0UlDQTW3EdqDt790miN0AMEE1bg1VX0mdg2QrBGppecBDEguEYMg7dU48w== X-Received: by 2002:a05:6870:b602:b0:13c:87dc:d9e7 with SMTP id cm2-20020a056870b60200b0013c87dcd9e7mr1239858oab.149.1668540732926; Tue, 15 Nov 2022 11:32:12 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:1164:573d:c7d8:ae8e:e2eb]) by smtp.gmail.com with ESMTPSA id f7-20020a9d2c07000000b00660e833baddsm5705231otb.29.2022.11.15.11.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 11:32:12 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Fangrui Song Subject: [PATCH 7/7] Remove set-hooks.h from generic includes Date: Tue, 15 Nov 2022 16:31:59 -0300 Message-Id: <20221115193159.173838-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221115193159.173838-1-adhemerval.zanella@linaro.org> References: <20221115193159.173838-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The hooks mechanism uses symbol sets for running lists of functions, which requires either extra linker directives to provide any hardening (such RELRO) or additional code (such as pointer obfuscation via mangling with random value). Currently only hurd uses it and there multiple examples where using direct function call provides both hardening and good code generation without the need to extra link or code handling (for instance nptl/nptlfreeres.c). --- {include => hurd}/set-hooks.h | 0 nptl/nptlfreeres.c | 1 - sysdeps/mach/hurd/bits/errno.h | 1 - 3 files changed, 2 deletions(-) rename {include => hurd}/set-hooks.h (100%) diff --git a/include/set-hooks.h b/hurd/set-hooks.h similarity index 100% rename from include/set-hooks.h rename to hurd/set-hooks.h diff --git a/nptl/nptlfreeres.c b/nptl/nptlfreeres.c index c67456d9d3..90b7b13287 100644 --- a/nptl/nptlfreeres.c +++ b/nptl/nptlfreeres.c @@ -16,7 +16,6 @@ License along with the GNU C Library; if not, see . */ -#include #include #include #include -- 2.34.1