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: Mon, 22 Jan 2018 21:18:33 +0800 Message-ID: <87lggqt4k6.fsf@gmail.com> References: <87po648e2n.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1edbzm-00040j-O0 for guix-devel@gnu.org; Mon, 22 Jan 2018 08:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1edbzi-0000uP-P7 for guix-devel@gnu.org; Mon, 22 Jan 2018 08:18:42 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:33694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1edbzi-0000tu-Ij for guix-devel@gnu.org; Mon, 22 Jan 2018 08:18:38 -0500 Received: by mail-pg0-x243.google.com with SMTP id u1so7083379pgr.0 for ; Mon, 22 Jan 2018 05:18:38 -0800 (PST) In-Reply-To: <87po648e2n.fsf@netris.org> (Mark H. Weaver's message of "Sat, 20 Jan 2018 15:34:08 -0500") 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 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).