From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Vong Subject: Re: [PATCHES] gnu: linux-libre: Full retpoline support on x86 [spectre mitigation] Date: Fri, 26 Jan 2018 19:41:14 +0800 Message-ID: <87efmcq23p.fsf@gmail.com> References: <87po648e2n.fsf@netris.org> <87lggqt4k6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ef4cU-0001gC-16 for guix-devel@gnu.org; Fri, 26 Jan 2018 09:04:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ef4cO-0001Ky-WC for guix-devel@gnu.org; Fri, 26 Jan 2018 09:04:42 -0500 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:46347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ef4cO-0001Kd-RZ for guix-devel@gnu.org; Fri, 26 Jan 2018 09:04:36 -0500 Received: by mail-pf0-x242.google.com with SMTP id y5so301791pff.13 for ; Fri, 26 Jan 2018 06:04:36 -0800 (PST) In-Reply-To: <87lggqt4k6.fsf@gmail.com> (Alex Vong's message of "Mon, 22 Jan 2018 21:18:33 +0800") 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel@gnu.org Alex Vong writes: > Hello Mark, > > Mark H Weaver writes: > >> Here are two patches that: >> >> * Add gcc-7.3.0-RC-20180117, which includes support for retpoline. >> * Use gcc-7.3 to build linux-libre on x86 systems. >> >> I'm currently running linux-libre-4.14.14 with full retpoline support: >> >> mhw@jojen ~$ cd /sys/devices/system/cpu/vulnerabilities >> mhw@jojen /sys/devices/system/cpu/vulnerabilities$ grep . * >> meltdown:Mitigation: PTI >> spectre_v1:Vulnerable >> spectre_v2:Mitigation: Full generic retpoline >> >> There's also support for retpoline in linux-libre-4.9.77, but none yet >> in earlier kernels. >> >> My question is: should we push these patches to 'master' now, or should >> we wait until gcc-7.3 is released (possibly as soon as January 24)? >> >> Mark >> >> > [...] > > I have a question. > > Do we plan to eventually build all programs with all retpoline flags > (-mindirect-branch=thunk, -mfunction-return=thunk, -mindirect-branch-register) > enabled? > > In particular, do we build gcc itself with these flags? If so, we will > have to add these flags to BOOT_CFLAGS (which I have problem > understanding how to do it). I figure it out. We can use 'substitute-keyword-arguments' to alter '#:make-flags'.