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: 659246 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1901427wrb; Mon, 6 Mar 2023 08:18:33 -0800 (PST) X-Google-Smtp-Source: AK7set/RVchfWM8PQkl7H01VzkiqKoihbCx3D8Imo/C1Spp3i9Kw4yhYTMhSMNOASmka/trdcRHj X-Received: by 2002:a17:907:a0b:b0:8b2:7567:9c30 with SMTP id bb11-20020a1709070a0b00b008b275679c30mr16471356ejc.59.1678119513160; Mon, 06 Mar 2023 08:18:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678119513; cv=none; d=google.com; s=arc-20160816; b=gLbY03jQ/XKGwL8QmCp4hLKrh+SaLCbkXqFh6wkuANDKy0A5BHo7n7A6Ql1ju0NgpW 2WvvM31G5uYC1wFxLYs47TP1Zf/8Tihf1nx027Cizft5hyAO5KSagr1sudS7d5kHxgSN GXXWHDAbaqv+pfooiWGHiP4E1SiTrf6ycg+q8c3qj2p0Otphn2sqF5oseFMQanidqA/2 ZPrDwO0YbfyRJ+O5HCduwlQak/MOZl2Ydbragp2mEpll6gc5yC9+/0hr4SOaxmNPRoKo NsW0Woo/jkgJPcGiqnyl4op0sh9Fij1c1uMD7hS7ETKculeoI+kYRoLOj7sj12h3mliX 73UQ== 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=sKpbb4dIisxUHU6MFMoq8QzSXegjXxXSewxwWGl6OigKTeIaca9PUeiyOdU//R4d4I SogHckkNBriv792A+n41jiQArbXQJbiDmohITWGZhawvaYTIUecMxSjzMP20NDm407+s od1/Mh6alUwsBJpZDQf6NNvoMLfVF7l98UdMfohwoA475vkkfnoUS7lH1YzI+YWJvO59 6StzdKp4VmulQMFYYo09fDoKcO9s6gtODdpbBYfRY5p1wEKhV8p66btAjNBhg8y99LTW v0vZdwEZXLVZqzNVglywLVwv6OuwV5/SlmNgbN5InrX4i50Hf29IQSL3O8oPGdbMLEyk v5hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=oL5fiS1Y; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id go37-20020a1709070da500b008b17b101083si13065454ejc.45.2023.03.06.08.18.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 08:18:33 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=oL5fiS1Y; spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 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 25CDB3854810 for ; Mon, 6 Mar 2023 16:18:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25CDB3854810 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678119512; 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=oL5fiS1YyboHw2jcLHuN6r16vxZTotAsnVsCDtfojmrHmzBB2O81GmwaODnSWNYEv DimQqMg0eG0kYGc+VcIsiflbLH2Szk8RSJUnyjWYyAfLny0DLMJLLFXzREMARR/dnb zi3OUIAAFb4h9KvSWm9+kIWceuBuzlsNP00J/Bek= 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-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+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