From patchwork Mon Mar 6 16:09:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 66042 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 945103850200 for ; Mon, 6 Mar 2023 16:18:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 945103850200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678119526; bh=pzqCZUZMikQnIY0pFL2djBn+Mq03FBdGCaYoUtnhP3I=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=o/H10lR5QrkfS+mfdMMvQV5rEzLaIvqJ1IJwMqcVYXxxDnh+aGOZwJg4/h0jzO+85 OtIR2ivKDNYK/bwFh3WAxSuLs2spcbnKEzObNahTTpmB2pGrpRIMp1xPiYthEnZJhC MX1swMpYkYtEaftQk8JRR3wWSVT5NZLkiSo8SAbY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 947F63858C31 for ; Mon, 6 Mar 2023 16:17:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 947F63858C31 Received: by mail-oi1-x235.google.com with SMTP id bi17so7465506oib.3 for ; Mon, 06 Mar 2023 08:17:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678119477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pzqCZUZMikQnIY0pFL2djBn+Mq03FBdGCaYoUtnhP3I=; b=7X/1EZBry0LIqG+BSnZtzYJeixx1vjcigySNcaUeK0egcbqxigxMyv6XDidyDoUMtc kFoBCPMB1f9Ev6+vBFR4D2Kqt2OrCmQyg825FAEIcbXDwZFmPJ/VyfR8D4rVD2ZxlcXn jfod2wpSnVbsBSbQ5nxbKkEVDVFftSIy0IzZfbMHhJVUOtf8EhIKKkEdX0Ic9bpd6yXs gphvDX0xZMfpykGRh6egmVU0vj+KoEpwQShi8UbEnjAqLr1IMokR55Wv35MIvw7EDwaw NhxSVddjoQMYt7ggObNICihb/tOZrb/t/tSU3G8WBR94+cySttpma3fNFWcseKqszEwy YX3Q== X-Gm-Message-State: AO0yUKXliuUNDAvmanoD38Yp3y2zXrXHeYy0D+O9cz2jNGLyEEK756h9 e64ovOfgd1HAv++7QPekFVLCzh4Mgyyrwa8/ELQyJQ== X-Google-Smtp-Source: AK7set/oPH7LZawc+dSPfCuRKf7w4i/0gGDd65eocSWn+8lMLl1a7WDEOXgBp7mp8WOe9WcJY+F2Vg== X-Received: by 2002:a05:6808:983:b0:37a:a450:a8ee with SMTP id a3-20020a056808098300b0037aa450a8eemr4784753oic.59.1678119476927; Mon, 06 Mar 2023 08:17:56 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:d849:8c2f:e58d:3e6:9de5]) by smtp.gmail.com with ESMTPSA id o188-20020acaf0c5000000b00383ef58c15bsm4126378oih.28.2023.03.06.08.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 08:17:56 -0800 (PST) To: libc-alpha@sourceware.org, Florian Weimer , Carlos O'Donell Cc: Adhemerval Zanella Netto Subject: [PATCH v4 4/4] Remove set-hooks.h from generic includes Date: Mon, 6 Mar 2023 13:09:20 -0300 Message-Id: <20230306160920.2942970-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306160920.2942970-1-adhemerval.zanella@linaro.org> References: <20230306160920.2942970-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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" From: Adhemerval Zanella Netto The hooks mechanism uses symbol sets for running lists of functions, which requires either extra linker directives to provide any hardening (such as RELRO) or additional code (such as pointer obfuscation via mangling with random value). Currently only hurd uses set-hooks.h so we remove it from the generic includes. The generic implementation uses direct function calls which provide hardening and good code generation, observability and debugging without the need for extra linking options or special code handling. Reviewed-by: Carlos O'Donell --- {include => hurd}/set-hooks.h | 0 1 file changed, 0 insertions(+), 0 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