From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 AOPPLoIrOmK0ZwAAgWs5BA (envelope-from ) for ; Tue, 22 Mar 2022 21:03:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sJ1nJ4IrOmJloAAAG6o9tA (envelope-from ) for ; Tue, 22 Mar 2022 21:03:14 +0100 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 68B0C22683 for ; Tue, 22 Mar 2022 21:03:14 +0100 (CET) Received: from localhost ([::1]:35256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWkin-0000Od-6Y for larch@yhetil.org; Tue, 22 Mar 2022 16:03:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWkhv-0000OK-Cs for guix-devel@gnu.org; Tue, 22 Mar 2022 16:02:19 -0400 Received: from w1.tutanota.de ([81.3.6.162]:38814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWkht-0006vN-Az for guix-devel@gnu.org; Tue, 22 Mar 2022 16:02:19 -0400 Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id BB95FFBF8DD; Tue, 22 Mar 2022 20:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1647979333; 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=nrDQgHamKsxZQWEoNC2pSrjDLXWlueBhej5PqOQjGwM=; b=v2OcBRhk783Z/L8XrNwHyGjKt29gys8NQB8/hChyI6Y6GBhE3JuZd6wLEgo5cvaT MaWeL1ntBFxutG/kL5c8R0ptuBI8HkqBONb8Anth73xDUM08oIOkgp8ePFpgz3Y94d/ ayeImjS3vDWruFXNR+ix9T7PdN1qT8f9byBY74foMFB0VkHAiAAIpkBJE2phHgqzVQZ g2r2WTyOc1OAJE8UHKqN6QZw1etWX5iUfiyOIValxYXOha2WDzCPkYUoJ0eDuTaOSEn JRziJbLi2sOuwFUEQVKjUsCsYwhDyJh5ddbYAhNkqleLOYD5Cijfll6G58mzgqDstqg jrT/Euo6HA== Date: Tue, 22 Mar 2022 21:02:13 +0100 (CET) To: zimoun Cc: Guix Devel Message-ID: In-Reply-To: <86y2119580.fsf@gmail.com> References: <874k3r8m4m.fsf@gmail.com> <86y2119580.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=1647979394; 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=nrDQgHamKsxZQWEoNC2pSrjDLXWlueBhej5PqOQjGwM=; b=lesQqDbwtKPTu8qGqHlRQyoeEDcAAw4bCYo5INx+mYBFGBKaQ0+Bz8Zt/5P31/FOcTl8z7 ffRO7sHbre5BGpzZfqPy33e76+sP8n4Bc+CrGR7kaGs4z7JwafRSVwFQCvDmfmT1VKQQ8M tDRPTrGGNO45QDiKPEiNOX6EplSvHIkc0/1ULdHJVDyuUdHDduASMql96Ml0hpXsq1i2UW 8H3F3V24mjP+NJEAFXcn66FKy5/laj4MoVZhE2TI5X/BXWGJIdPcPaERw+0saReHH7wAKC hgEX/m1718zUEr1eqAeg5vAnyqO/ZWujzAVrd4gdJn7GVaYk8ss/FzuP7Odotg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647979394; a=rsa-sha256; cv=none; b=FT+0d2Mshf/yJw3GSFOWA2iHNPEU8m0jvD+1oqQUJuHoAgd3GIr4csU7HpTaUsw5WnVo1p Qlx4W9aZwODzrpXj/O93/wwwaH+fI7M1yQlsH415qnxqUBIpz1NlnZNty+6L59r79nr8KY rPWklKXwPmddVKAlozPH5zoe8+Dz/Ymf6QwdfT2gi0bn4et2Twtwz+9FgFfWkFNUPwbMd5 BhojFBFWxb857johf6WaL1uuaJjccWrrj9HdhXkKYNjBuDQ8xuLcA+FYBAyo93w8Yo9HPc mz43gAX7Mme6IAlPSwLaXKQ0RHDgPiyyTKclaHWYszH5bBExSIeu+tQdkwq7Lw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tutanota.com header.s=s1 header.b=v2OcBRhk; 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: -4.71 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tutanota.com header.s=s1 header.b=v2OcBRhk; 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: 68B0C22683 X-Spam-Score: -4.71 X-Migadu-Scanner: scn0.migadu.com X-TUID: cuGw5J10uW3F Mar 22, 2022, 19:06 by zimon.toutoune@gmail.com: > Hi, > > (Although you know :) please keep CC guix-devel.)=20 > Will remember to CC guix-devel next time. > On Tue, 22 Mar 2022 at 18:23, kiasoc5@tutanota.com wrote: > >>> --8<---------------cut here---------------start------------->8--- >>> (define (make-gcc-hardened gcc) >>> (package >>> (inherit gcc) >>> (arguments >>> (substitute-keyword-arguments (package-arguments gcc) >>> ((#:configure-flags flags >>> `(append (list "--enable-default-ssp" "--enable-default-pie") >>> ,flags))))))) >>> >>> (define-public gcc-hardened >>> (make-gcc-hardened gcc)) >>> --8<---------------cut here---------------end--------------->8--- >>> > > [...] > >> >> I get an error when I build with guix, if you could help find it that >> would be great. >> >> % ./pre-inst-env guix build -f hardened.scm >> /home/kiasoc5/build/guix-notes/hardening/hardened.scm:11:10: error: (sub= stitute-keyword-arguments (package-arguments gcc) ((#:con=EF=AC=81gure-=EF= =AC=82ags =EF=AC=82ags (quasiquote (append (list "--enable-default-ssp" "--= enable-default-pie") (unquote =EF=AC=82ags)))))): source expression failed = to match any pattern >> > > That=E2=80=99s because a typo. :-) > Silly me, thanks for the catch. I'll let you know how the hardened gcc goes= . > ((#:configure-flags flags > ^missing closing parenthesis. Well, it looks like: > > --8<---------------cut here---------------start------------->8--- > (use-modules (gnu) > (guix) > (guix packages)) > > (use-package-modules gcc) > > (define (make-gcc-hardened gcc) > (package > (inherit gcc) > (arguments > (substitute-keyword-arguments (package-arguments gcc) > ((#:configure-flags flags) > `(append (list "--enable-default-ssp" > "--enable-default-pie") > ,flags)))))) > > (define-public gcc-hardened > (make-gcc-hardened gcc)) > > gcc-hardened > --8<---------------cut here---------------end--------------->8--- > > Then, this command > > guix build -f hardened.scm -n > > returns: > > --8<---------------cut here---------------start------------->8--- > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% > substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... = 100.0% > The following derivation would be built: > /gnu/store/3i6i3pqr5r7l1568b3hswbgych974aqw-gcc-10.3.0.drv > 81.4 MB would be downloaded: > /gnu/store/7vrx4p62bkmxzrxwqdc4il9hqyh1yngh-libstdc++-10.3.0 > /gnu/store/i459ksarhxysqb8gxa8hq6phl13d0q4a-libstdc++-headers-10.3.0 > /gnu/store/d3js6699lc1p0sw7p0dkafi0cn33sig6-gcc-10.3.0.tar.xz > --8<---------------cut here---------------end--------------->8--- > > I do not have tried to effectively build this gcc-hardened. :-) > > Hope that helps. > > Cheers, > simon >