From patchwork Mon Mar 6 19:16:42 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: 659266 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1988015wrb; Mon, 6 Mar 2023 11:18:00 -0800 (PST) X-Google-Smtp-Source: AK7set/3hOMy2ppixI/h7xSLRV+BgJ9+e8CQYgFu43AhOkHVHEDf0D36OB85e0PeX0yGuRegFA7r X-Received: by 2002:a17:907:a04:b0:7e0:eed0:8beb with SMTP id bb4-20020a1709070a0400b007e0eed08bebmr15699695ejc.41.1678130280130; Mon, 06 Mar 2023 11:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678130280; cv=none; d=google.com; s=arc-20160816; b=uALx8NU9MfB9KjjTUOx8pPLYb5GAyf31c0b8EooF/oHB5ghFE+Ob84k9wuWKLf0auK eODMWATYvAKLiSqOdc53X+xvelVI/2KchjuB5KgUSU0sNwMDOPrXbGv90EJ+ofi/ab/x CV+O4SoFENBy+fCzDXT+mMaz+K1BCrVjVJaA340wjj6dlKY9/pCsta+VLM6AZn2WXWFR OaR0AYtL1X+2PnQ9CrBeJjQi3IOL1soC/tG+XBi4Wb3LOGI2O+5WhU+WVt+Q0ms8r5C0 SBGPrkAorIAVlrw7b9qxnSVEhYT1EjMAxFHfUgk4SckCni2TYUZscrh/yKgd2ab460Hy 89Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=pzqCZUZMikQnIY0pFL2djBn+Mq03FBdGCaYoUtnhP3I=; b=RrlHDFyP7+IxbfG3R9DmCk2D2x6cP2oj2P6VMoZW4UXxY9og9Me1wlKZ5hX6+fdi4Q 7yI4szwUbcvM3/GtWNL76GjbHLRGOARnUWK4RIyAc3bu1FwahAx81sTKIxZa7AgMmCSO Xd+zBiUpMcYlhsdv956KLAjL2vGeKEtfikQL+gu0RiC3GXSM/fRKcLFLmYvdOCnBFakL IcODRfRoAqidvUjM/cLzt326GOkWDczBglNURaGo0Tbit5JJjrCrXCk+0j5hVEMtLbe3 uG2umBkMrZ68LQ2JDdi9i+2/DRSll+SqQ5Dt2tH0UVq+kDD5OKgvMF1T0P4m7GPlpbhc v5DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=JILsCg7h; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Return-Path: Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s13-20020a170906168d00b008f0ba0949e0si5225643ejd.980.2023.03.06.11.17.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 11:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=JILsCg7h; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E70E9384D1A7 for ; Mon, 6 Mar 2023 19:17:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E70E9384D1A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678130278; 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=JILsCg7hvxlnskEwpds9lnYeXlVt5enzfwKWm0fotu24A1YMtWo/3ntIjVFxQM5aD Oj2Dd8ITxii5Rfsz7OFF8OKyKN7yM/PxMeUdfPv8qcHc4g7klMAKkCMhWHdxfBK3wK zSz34W3aHoxsSepiWewMny1cQcsWjw/F2mUlHmb0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id 6C6E43851ABA for ; Mon, 6 Mar 2023 19:17:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C6E43851ABA Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-173435e0ec4so12517063fac.12 for ; Mon, 06 Mar 2023 11:17:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678130221; 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=nFW5T62hFjroEH3RsqpfnbjmdrZaDixenehKpyoaxxLx52HJi+iIaKyqQdUlDQEHlT sst7vrzVJHAVVQVuQTt9JdR1HSJW9Ve3buvRu1ha2le0greqvsdUgM+GmhsxgbMc3IE3 RhVb+fJ/MVyj2LlZA037nwpIXLonCgmuZA2JEDzkIKlOJVgPMo2ivKyA7CZ+JtJgGXko hvA+0DVi3HDnpV+F0McrbzzS36eu3p9KfLGaumiesSGaOpKP2XgqZEcueZ8Y838Nop+u KgOGWPrQA0ykj5LFiKYqIJZKSJlwHtDC3HhUfMxxebJgLb9MNgmFpMcxGjyxqJcQogXS f3Hw== X-Gm-Message-State: AO0yUKXWT6NFtaNkBBsj7xYdIXsn5rQYXuJjhCs6Vaz4W9jbB7J74LWc n3LcRiFaqaOQ1fKf0SaAECKAuDG8Cg80FFT0WkUVUA== X-Received: by 2002:a05:6871:889:b0:16e:93ba:e55e with SMTP id r9-20020a056871088900b0016e93bae55emr7503840oaq.8.1678130221078; Mon, 06 Mar 2023 11:17:01 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c3:d849:8c2f:e58d:3e6:9de5]) by smtp.gmail.com with ESMTPSA id zf29-20020a0568716a9d00b00176598b79d3sm4280668oab.24.2023.03.06.11.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 11:17:00 -0800 (PST) To: libc-alpha@sourceware.org, Florian Weimer , Carlos O'Donell Cc: Adhemerval Zanella Netto Subject: [PATCH v5 5/5] Remove set-hooks.h from generic includes Date: Mon, 6 Mar 2023 16:16:42 -0300 Message-Id: <20230306191642.347001-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306191642.347001-1-adhemerval.zanella@linaro.org> References: <20230306191642.347001-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+patch=linaro.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