From patchwork Tue Nov 15 19:31:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 60665 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4E931393BA6E for ; Tue, 15 Nov 2022 19:33:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E931393BA6E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668540787; bh=etoHoTPjYPKroLP2dlBBJQpkXxXZ2MZCW9anWU8E/jE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZkouNlGLjF09i2LF/CvRG6ifz4w/ThP1VghH18brEC4sGmh1YsZVZPPrW9oQjv1Wo eW2a/7Qk/MOWS3JmMoUwxGqG8VLzPMKsmz9GGbGxQOUl84vhNTmoPmkbpQYetO96f2 OiOeBkXNtpDdx2Wmdc/T8bQ2S0WmF9vUl23coGc0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-1322d768ba7so17412166fac.5 for ; Tue, 15 Nov 2022 11:32:13 -0800 (PST) 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) 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 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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