From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48019 invoked by alias); 14 Jan 2018 14:20:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 47999 invoked by uid 89); 14 Jan 2018 14:20:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 14 Jan 2018 14:20:05 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 190835469AB; Sun, 14 Jan 2018 15:20:02 +0100 (CET) Date: Sun, 14 Jan 2018 14:22:00 -0000 From: Jan Hubicka To: "Kumar, Venkataramanan" Cc: "H.J. Lu" , "gcc-patches@gcc.gnu.org" , "Dharmakan, Rohit arul raj" , "Nagarajan, Muthu kumar raj" , "Uros Bizjak (ubizjak@gmail.com)" Subject: Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre Message-ID: <20180114142002.GA39519@kam.mff.cuni.cz> References: <20180114033707.6297-1-hjl.tools@gmail.com> <20180114104020.GB62416@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180114104020.GB62416@kam.mff.cuni.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2018-01/txt/msg01236.txt.bz2 > > Hi HJ, > > > > > -----Original Message----- > > > From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches- > > > owner@gcc.gnu.org] On Behalf Of H.J. Lu > > > Sent: Sunday, January 14, 2018 9:07 AM > > > To: gcc-patches@gcc.gnu.org > > > Subject: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre > > > > > > This set of patches for GCC 8 mitigates variant #2 of the speculative > > > execution vulnerabilities on x86 processors identified by CVE-2017-5715, aka > > > Spectre. They convert indirect branches and function returns to call and > > > return thunks to avoid speculative execution via indirect call, jmp and ret. > > > > > > H.J. Lu (5): > > > x86: Add -mindirect-branch= > > > x86: Add -mfunction-return= > > > x86: Add -mindirect-branch-register > > > x86: Add 'V' register operand modifier > > > x86: Disallow -mindirect-branch=/-mfunction-return= with > > > -mcmodel=large > > > > Current set of patches don't seem to have any option to generate "lfence" as the loop filler in "retpoline",  which is required by AMD. > > Can you please clarify the plan. We would like to get this checked-in GCC 8.  > > Since thunks are output as strings, it is easy to add the option > on the top of patch #1 of the series. I do not fully understand > the reason for choosing pause over lfence for Intel, but if we need > to do both, we need to have command line option (and possibly attribute). > What would be reasonable name for it? I forgot there is -mindirect-branch-loop for that in the original patchset. So for now we should be happy with having both lfence and pause in there or do we still need it? Honza > > Honza