From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IBD+CKRMQmKJQwAAgWs5BA (envelope-from ) for ; Tue, 29 Mar 2022 02:02:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CAGrBaRMQmI2ewEAauVa8A (envelope-from ) for ; Tue, 29 Mar 2022 02:02:44 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A3F7B21F38 for ; Tue, 29 Mar 2022 02:02:43 +0200 (CEST) Received: from localhost ([::1]:52594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYzJq-000287-Gy for larch@yhetil.org; Mon, 28 Mar 2022 20:02:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYzJZ-00027j-Ej for guix-devel@gnu.org; Mon, 28 Mar 2022 20:02:25 -0400 Received: from w1.tutanota.de ([81.3.6.162]:50030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYzJX-000264-Uk for guix-devel@gnu.org; Mon, 28 Mar 2022 20:02:25 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 79320FBF8E9; Tue, 29 Mar 2022 00:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1648512140; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=1Y0NwVNOP5ecWv8X5mm0F8dNXdH8SqwK7yiRYxXrSXM=; b=Cx6vU6YYCSuZiFxl/fiFcZPmJYQVWlDZlfRcsMzlCEt4CtS9Dzv7Ng48lG7yHvRr 5kEn88XKbFye8AGZv1rA1Pp9Ql/ZNMtDkqV4cU3TVKG/xqN28PRc8QCuXY/F8BmDflz L/XGzwwN0/tQxuY/TobUDJG3m1GkUAmUe7yB1JGA8G0HrzPG3gQW1q6J3lf2e6z0FM8 aMoEh8unAfzClEXGKmW8sI6daP/HRjemx8xMG4T7uPyGGCNbWahynnEJbb9trfLTqK6 lhuHVPq1GJYDFMeNoy4ZNl//+lhjB4FugQKxC3WZV4kKNw++TcgarSgjrP/UuORr0WG pTEo9UwQqw== Date: Tue, 29 Mar 2022 02:02:20 +0200 (CEST) To: Maxim Cournoyer Cc: Maxime Devos , zimoun , Guix Devel Message-ID: In-Reply-To: <874k3iwysf.fsf@gmail.com> References: <874k3r8m4m.fsf@gmail.com> <8464b1bff3acb0a84f46ea6dcbbeaa7045b03d1c.camel@telenet.be> <874k3iwysf.fsf@gmail.com> Subject: Re: Hardened toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=81.3.6.162; envelope-from=kiasoc5@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" Reply-to: kiasoc5@tutanota.com From: kiasoc5--- via "Development of GNU Guix and the GNU System distribution." X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648512163; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1Y0NwVNOP5ecWv8X5mm0F8dNXdH8SqwK7yiRYxXrSXM=; b=qow+Xciekp55F0qVdAOuipL8HUN29HVGkURin8jUPQ8Ca1Q5ZvORPyOug/f3q4AgRx+GLg m++HUQRi6MXFLPHTwBjDgq5fCpUruS5WZHbpkGv/8ZZX5RyiKVxBt+uUyLpWf841SjXvTi 3CM2kcGTdWrgSOSUUoC0Zac+5dWN9fcme8ztXHpmXE/UbjMuvJpDVYAD9Kt+yqwduDjEGI 5BlOIVHP/LkyzzEmPLweTGHnHo9sxCv9bBhjEslQ+ZGDAndawMVZ2IkNDT3+MxwPgMigh7 CBy/+RP7Kq/uvo6WhimJkRXRiWCAxILhZVaeHQZmI0T0tx29VVa6pBlGOvk19g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648512163; a=rsa-sha256; cv=none; b=OjEReEmR117eEive5DEYoO0qXiLBz+LpUuR+FEhOBBpTL6zY6B9J7ym262mHbp4tDbI+H0 fcKFbZIHhe/ipBalDdZPXS9BkMMOUhV7puF8IEYC7LdRD83SuQFUnLzQ7j5bfkor82ZIo/ 0zPNgX2BO4YKU/eWLnmFku2cEwItaiyxj2z9+sLLgZWbz/xPCPpHs9Tir8d8BgALarkajc c+dOCW2CtnKjH+g49tskV3BXGRPGOtOXoGJJIsz1FglglZ5i2LWh5jQT5ywT71rQqCe4BH fWDvLeDZ6pBJ8ohv6KhqQWZ1xRp6i6h2jn8oIZGukeFy/F82iUmI5n/uLSLadQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tutanota.com header.s=s1 header.b=Cx6vU6YY; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tutanota.com header.s=s1 header.b=Cx6vU6YY; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A3F7B21F38 X-Spam-Score: -2.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9zJPvsyJqDbB Yes it would be easier to add the hardening flags to gcc directly, I just w= asn't sure whether the maintainers would be open to the idea. Since the default gcc toolchain version is still on gcc 10, the hardening f= lags could be added to gcc 11. Then the upgrade from gcc toolchain 10 to 11= can benefit from the hardening flags, and "only" 1 world rebuild is needed= . Mar 28, 2022, 03:17 by maxim.cournoyer@gmail.com: > Hi, > > Maxime Devos writes: > >> zimoun schreef op ma 21-03-2022 om 14:34 [+0100]: >> >>> > * gcc can be compiled with `--enable-default-ssp --enable-default- >>> > pie` >>> > to enforce ssp and pic >>> >>> You wrote [1]: >>> >>> --8<---------------cut here---------------start------------->8--- >>> (define-public gcc >>> =C2=A0 (package >>> =C2=A0=C2=A0=C2=A0 (inherit gcc) >>> =C2=A0=C2=A0=C2=A0 (arguments >>> =C2=A0=C2=A0=C2=A0=C2=A0 (substitute-keyword-arguments (package-argumen= ts gcc) >>> =C2=A0=C2=A0=C2=A0=C2=A0 ((#:configure-flags flags >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 `(append (list "--enable-default-s= sp" "--enable-default-pie") >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,fla= gs))))))) >>> --8<---------------cut here---------------end--------------->8--- >>> >> >> I think it would be a lot simpler to just add this to the 'standard' >> gcc configure flags, in (gnu packages gcc), given that probably the >> idea is to do this hardening for all packages? Needs a world-rebuild >> though. >> > > +1. The whole distribution can probably benefit from this hardening. > > Maxim >