Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1863656imd; Fri, 2 Nov 2018 01:46:56 -0700 (PDT) X-Google-Smtp-Source: AJdET5eByxeBSI/8skU7MqKZtSWC378Pob65qJoQ0OA6Kyx2lwe2kvGKcQPBZKVS38UzRjf47i1L X-Received: by 2002:a17:902:d705:: with SMTP id w5-v6mr10570873ply.11.1541148416847; Fri, 02 Nov 2018 01:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541148416; cv=none; d=google.com; s=arc-20160816; b=ZQpV398j7Jnf6cAi3J+W2VrosPMb5Ezp7/bgWsDm3Qo55iuF0TcRn3oL+jJZ2fS7jX u1Hkk4SbCgwzhVfEPWPl+d8o/CwT1xV+9cfSt9N04FcEZzwhjvMxeeVJTPK0m12jkgJj sCfWDBI9ccVmcV8zmXOq26bFP1jC3/YOXOrmGa+3w0d30FjkUFj14NBdzSSuBt/bs6Gi FvHaOPlNQiClTRyBbvPcBiQtzEnIULQsItSYNE4fbgJ69xn9WQnROylGAZm0MCVJP8ar TilZCrbbjuqtCSLcCnGjnAmQclnF77g0kQm6O38P1v2FnEXkhfgaBv8OjBFvFJVqaVDL TEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:subject:cc:to:from:date:message-id :mime-version:dkim-signature; bh=1Eupju32Mi0/55TYZX39qjJCz+9E5zh9MCOXLcesDO0=; b=j5ZqZ0iRhfqKZljOOyG7UGpTKHBO8d8sq0mhd9+EMq1xtFRSbA0ezZtss2X6XJdpGA n5VnMNE1x/9xbIyWzErqO//e0i+C155VXPEH/iSyB28OYMmLrs7ETTM2j2/PqEvC+dL3 YNoxZqqR1OMADW31qwR/P/t0fW7Kv4Jiuh6YiC21LODe3vJxXXs+ursnfYzoAoo3q4uh c9dKrkGEqOzVZSWv73rHYZgdi5JaBnDircMdIutx3J1Eebh7tFvGJsrf3jukfZ96v9tB 3MJpes3NGoJBrpwZn26GT2hqEc4xOPQRzbbTx0M45SQ2VcM1QgnlSY+MfRFrtq9K7+vm z6Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=GlC2Stmd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3-v6si8266104pld.119.2018.11.02.01.46.41; Fri, 02 Nov 2018 01:46:56 -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=@oracle.com header.s=corp-2018-07-02 header.b=GlC2Stmd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbeKBRwg (ORCPT + 99 others); Fri, 2 Nov 2018 13:52:36 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:33700 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbeKBRwg (ORCPT ); Fri, 2 Nov 2018 13:52:36 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA28jN35133834; Fri, 2 Nov 2018 08:45:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : to : cc : subject : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=1Eupju32Mi0/55TYZX39qjJCz+9E5zh9MCOXLcesDO0=; b=GlC2StmdLKm3Bih959rdmlyudryij2je4IxiEPE6+jdHdxIkIBhKMldzrAd5oBVFviZd zkmMtW5GISKutbiXSvE4zFmSMqQGCyL8RU15ZzylgDxpEwW+3vYBLWN1ELbbme5N8/bb r1mZw15IbecLJ+pM449G2H+xXu/k+ykrZBTZMTQEYIvg39A6ZZoxsKbOG/khDRncQA/s tJ8oX4Nk7KHq0bFArHAZymjfNvAfL1SY8fd2PsiYtlR1sQBj4z/guKc7kwFWwzv321oX XX2/z80NTtAGIgSQlLI89s92la5ceR6x7pBM4Lu2A2m/urxqYFe7wDR36cuDEyDgWpcR 8Q== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2ncfyqd8tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 02 Nov 2018 08:45:48 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wA28jfcv006313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Nov 2018 08:45:42 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wA28jfZA026820; Fri, 2 Nov 2018 08:45:41 GMT MIME-Version: 1.0 Message-ID: <7ba46cbd-826d-459b-98d4-b9f4e08dbcda@default> Date: Fri, 2 Nov 2018 01:45:40 -0700 (PDT) From: Zhenzhong Duan To: Cc: , , , , , Subject: [PATCH v3 0/2] Enable retpoline support only when compiler support X-Mailer: Zimbra on Oracle Beehive Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9064 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=565 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811020083 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to PeterZ's suggestion in https://lkml.org/lkml/2018/9/18/1016, hard bind retpoline with compiler support and remove minimal stuff. Tested with both CONFIG_RETPOLINE enabled and disabled. -v3: Add Suggested-by[Ingo] Break build if compiler doesn't support retpoline[Dwmw,Tglx,Ingo] -v2: Add compiler support check in Kconfig [Masahiro] Drop 3rd patch as __insn_is_indirect_jump() may be used in some corner case= .[PeterZ] Zhenzhong Duan (2): retpolines: Only enable retpoline when compiler support it retpolines: Remove the minimal stuff of retpoline support arch/x86/Kconfig | 4 ---- arch/x86/Makefile | 5 +++-- arch/x86/include/asm/nospec-branch.h | 12 ++++++------ arch/x86/kernel/cpu/bugs.c | 13 ++----------- scripts/Makefile.build | 2 -- 5 files changed, 11 insertions(+), 25 deletions(-) --=20 1.8.3.1