Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4482001imd; Tue, 30 Oct 2018 02:41:19 -0700 (PDT) X-Google-Smtp-Source: AJdET5fxNjPOuvQgPHT1FMwIB6cCm1jP3HAkoXacqAKlMYPST7/qNuOTLJBIUb97JSdW4LF10Irp X-Received: by 2002:a63:1d62:: with SMTP id d34-v6mr17645142pgm.180.1540892479517; Tue, 30 Oct 2018 02:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540892479; cv=none; d=google.com; s=arc-20160816; b=oXrxfmUn/Psmz08BuDi1X6PU1X2dRJ4f/lsr9HInWgiTyIf9aQm3ttdJBFrkg948lR jLUIy7ozn94nCSTA+VFig1khjJsq/j+d+O1Fvv7GPr11hWT35TRrHi7hejVCcFGeUcfC hyV+VWXe6k1HWX3GI5XuHBTWrqsNOmQS0H1lUFQ2csd2AqI2E/r5QTHe+0HaJRo7uuJh kZFDyRECI/zeMwFURRTN45Bpunp6nqKrHQASaEpqhrWtf3N1Rp8V0CMRUv+na2MBAdEa RJJADK7jJmiVUAFzfWqn/ztggBqJ+Duq4orI2YnRjpZKwnajx4cVaud8lcvtFmCh0vrP qdng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=IX4TvQU0KfyT5v+vO7hXSZ1k1oxi8UCciQlFsENTRDQ=; b=rZfJGyxUgsV/V6VjYGu1eaRld3bHPWmD/dwy1WRgMT4KciuyvnXIe5ZXu2k4kIRYEO 5QutX4It9I3hdGM8Hz6VmpBQPAwjS0kZMfXifN+W6bLUvrH5aVPXK4O7dsoE+Z1fkOtv 8w5+DmqhI6/sDAML6XmuFYJKyXifwMn9HPjtB/ecEo1GVuJrd5BV++BgN0/dVmzpVOMc wk7oPig36Jl6nl+r/tg/ckj7xukjGvIoMwJdG7FyhKWExt60B36bnszLucD7nL6jbQxA ScdLaF2RiEozEAqdbhs56FAfC5bS0IqjkOalvuYlxBXYEWFCZpv4NHOejLcDLO8K1int mVTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=QfUteZed; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si21916265pgv.349.2018.10.30.02.41.03; Tue, 30 Oct 2018 02:41:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=QfUteZed; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbeJ3SdJ (ORCPT + 99 others); Tue, 30 Oct 2018 14:33:09 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:59107 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbeJ3SdJ (ORCPT ); Tue, 30 Oct 2018 14:33:09 -0400 Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) (authenticated) by conssluserg-05.nifty.com with ESMTP id w9U9e1G4015424 for ; Tue, 30 Oct 2018 18:40:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com w9U9e1G4015424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1540892402; bh=IX4TvQU0KfyT5v+vO7hXSZ1k1oxi8UCciQlFsENTRDQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QfUteZedZ1mpk5VVr0NiAId6p/9aO/0KiT3muML+7n+Q9ahPxHmsx4W6m1CilSC6s Q0+t1w80UAJ+fs1Wkd7rdbqtIwrN5oCuObFQ/5JJNp6HhSloykI338Wefe89q9lLQt 0hwZ6MEHeI8mm6RlJVrLrpOtelTHKj+nwegizbWWkbjE0ez/M1zQ9PkkY5fPl42FkO qV4mmFCGsU+0w9Diok1D8wX1mBNN8WVmb1uZ2OyExggeWFfCUl0qHGm2TGqXnoz/80 s8VYnuKC05AYtOPqLQMtn88qcm1Xb3yUDeQv+ImDpTQA70XReY0Znf7zGg+ZQ4kp15 /Jp2i9Zgpr28A== X-Nifty-SrcIP: [209.85.222.46] Received: by mail-ua1-f46.google.com with SMTP id g10so4192342uak.5 for ; Tue, 30 Oct 2018 02:40:02 -0700 (PDT) X-Gm-Message-State: AGRZ1gJEi3CgS8D7sX4O5WZ5DbMqBN2kItBJz+WCkrBXfwRJg0kxhsDV gs7YiLUZZXOY7tQIT3L0GAVjt5brJFw31uZ7+sM= X-Received: by 2002:ab0:5444:: with SMTP id o4mr5596020uaa.55.1540892401308; Tue, 30 Oct 2018 02:40:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Tue, 30 Oct 2018 18:39:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] retpolines: Only enable retpoline when compiler support it To: zhenzhong.duan@oracle.com Cc: Linux Kernel Mailing List , Ingo Molnar , Andy Lutomirski , konrad.wilk@oracle.com, David Woodhouse , Thomas Gleixner , srinivas.eeda@oracle.com, Borislav Petkov , Daniel Borkmann , Michal Marek , "Peter Zijlstra (Intel)" , "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Oct 30, 2018 at 3:57 PM Zhenzhong Duan wrote: > > Since retpoline capable compilers are widely available, make > CONFIG_RETPOLINE hard depend on it. > > Change KBUILD to use CONFIG_RETPOLINE_SUPPORT to avoid conflict with > CONFIG_RETPOLINE which is used by kernel. > > With all that stuff, the check of RETPOLINE is changed to > CONFIG_RETPOLINE. > > This change is based on suggestion in https://lkml.org/lkml/2018/9/18/1016 > > Signed-off-by: Zhenzhong Duan > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: Borislav Petkov > Cc: Daniel Borkmann > Cc: David Woodhouse > Cc: H. Peter Anvin > Cc: Ingo Molnar > Cc: Konrad Rzeszutek Wilk > Cc: Andy Lutomirski > Cc: Masahiro Yamada > Cc: Michal Marek > --- Instead of adding another CONFIG option, does it make sense to add compiler support checks to 'depends on' syntax ? config RETPOLINE bool "Avoid speculative indirect branches in kernel" depends on $(cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) || \ $(cc-option,-mretpoline-external-thunk) default y select STACK_VALIDATION if HAVE_STACK_VALIDATION -- Best Regards Masahiro Yamada