From patchwork Thu Oct 11 15:16:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu-cheng Yu X-Patchwork-Id: 10636915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8E2B112B for ; Thu, 11 Oct 2018 15:23:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C30D42BA19 for ; Thu, 11 Oct 2018 15:23:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C08032BA58; Thu, 11 Oct 2018 15:23:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1B3B2BA5E for ; Thu, 11 Oct 2018 15:23:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C7656B02A3; Thu, 11 Oct 2018 11:22:09 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 60D656B02A9; Thu, 11 Oct 2018 11:22:09 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 25EA26B02A0; Thu, 11 Oct 2018 11:22:09 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id C785E6B02A2 for ; Thu, 11 Oct 2018 11:22:08 -0400 (EDT) Received: by mail-pf1-f198.google.com with SMTP id b22-v6so8052093pfc.18 for ; Thu, 11 Oct 2018 08:22:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=TK8EDeMGPZ2hWiuLL/i5vI4+eG5g0kdJ6UAxh9hkMGQ=; b=S93MSOeIOW1TGHWtA06YJH8yLpbQlrFClBuUJuwm4H1sucriQuwIjb8b3Ipfv6bPKT G2F8LbzknRgJK417Nhy1ZHSX2hLKHVtMeRz6K5g47HqN1dPb2eLN/zymD37FaWtRTw1P u/qqRbc7hk80NLSEUyROaWJLYzVgMg7DQ1SAlhBfRpWl5fDqVVK8u8VxRhzAIcYwyqXB yyi+TdZhiZlDysdnYduIY+DTQrY6tzQR6s+3BVTxsbNonzZaQbfHQ2Pg8tszejoXS3d8 EK1PmbLQlA78vCmHd2jxBVEOUmmCMRdWqlXkcgzA56T69hQCuH0xUVB2/MC1JPXVAYh/ Yaww== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: ABuFfojh/s6jj0Imn/6dZTizsUrPgt4tBpNEBy0i0ir1ZgK6zCAaZ3j2 4cJ1Y6iBfYXY09TWeMkX0y+lKhFB7WhwbbIMJ2PsxGrm4qTjbhKRa1AOuKbgqWm6CJHXHPI414h 4tU+b5RTWg/3AQ6XPMBbQKx511MSSKhD07DI8qygoIWGwsbg6ZCAcSsw0RBi0byToAw== X-Received: by 2002:a62:d206:: with SMTP id c6-v6mr2056779pfg.8.1539271328503; Thu, 11 Oct 2018 08:22:08 -0700 (PDT) X-Google-Smtp-Source: ACcGV60pqzAWSW5Wyv0+tKjYO05Z+KYDmPJUQlAjOgx5PCf2vO18tzDxFUKOXY5ZF/2VdUbsrdTr X-Received: by 2002:a62:d206:: with SMTP id c6-v6mr2056734pfg.8.1539271327837; Thu, 11 Oct 2018 08:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539271327; cv=none; d=google.com; s=arc-20160816; b=fQLUzNANjY3r6qOf7seGwM8d3QuCc0MbZE66H4U6Jn+sg6eElLMNsb0tJZb5fc7i9S pcdekxbn9baJR0wSoTkbAwrRYynIMr5p+xqZ/4PWHoURCS1w0SfUlsGPLlz7/q3C5Ohd bf1AMqhs8DOSvRaEvRnx2v/aC8lA2gabg1kRaYblkByA8fScprH9MYCRaZppr7PSwZnq onPPSrS+h4i7Bvb6FTY8RlKsKsvzud4y6hICS2yyZ3P95LHYl74atNCCwJ8MyfQ6/ubg EFy2RnixTehTYCabnvA3ts4PPaB6XPiC1T66BrNVxAGgVOj92U9Q/cuw1oW2S+blRYh4 t0Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=TK8EDeMGPZ2hWiuLL/i5vI4+eG5g0kdJ6UAxh9hkMGQ=; b=VGDlmttl6DpLg2DFl32KA7xc28Z2e57LNzYyY90/E2s4LqyTVxknsk6w9jTZ/x0GEu bERpjMqX/Ey71MP/EoREebU7fybcRss2xtN+9dEcS/nhvMSdUjEbMY4RamxUXciVjVUE G3Zn8Nvr6KC0SnJbUHEbRqCH1zPaIjDOHmggrTKmw7oSYh7brVDEGN9ucpOFDA4GWVZJ i4omyzA5oy2LailQWuXt6HK81jI5G2I9bavkA+Rt7pYpcttN8RPVPU1RLwqWgtT2DRYC wpQC0VY9tg28I2IhqSsPdSFH+FmsjwOmZCZS2WjKdsaWGk0waKaecjXaxfxucLDYtXcy YV9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga14.intel.com (mga14.intel.com. [192.55.52.115]) by mx.google.com with ESMTPS id 33-v6si28541073plh.50.2018.10.11.08.22.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 08:22:07 -0700 (PDT) Received-SPF: pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) client-ip=192.55.52.115; Authentication-Results: mx.google.com; spf=pass (google.com: domain of yu-cheng.yu@intel.com designates 192.55.52.115 as permitted sender) smtp.mailfrom=yu-cheng.yu@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2018 08:22:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,368,1534834800"; d="scan'208";a="77271636" Received: from 2b52.sc.intel.com ([143.183.136.147]) by fmsmga007.fm.intel.com with ESMTP; 11 Oct 2018 08:21:45 -0700 From: Yu-cheng Yu To: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue Cc: Yu-cheng Yu Subject: [PATCH v5 07/11] x86/cet/ibt: Add ENDBR to op-code-map Date: Thu, 11 Oct 2018 08:16:50 -0700 Message-Id: <20181011151654.27221-8-yu-cheng.yu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011151654.27221-1-yu-cheng.yu@intel.com> References: <20181011151654.27221-1-yu-cheng.yu@intel.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Add control transfer terminating instructions: ENDBR64/ENDBR32: Mark a valid 64/32-bit control transfer endpoint. Signed-off-by: Yu-cheng Yu --- arch/x86/lib/x86-opcode-map.txt | 13 +++++++++++-- tools/objtool/arch/x86/lib/x86-opcode-map.txt | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt index c5e825d44766..fbc53481bc59 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt @@ -620,7 +620,16 @@ ea: SAVEPREVSSP (f3) # Skip 0xeb-0xff EndTable -Table: 3-byte opcode 2 (0x0f 0x38) +Table: 3-byte opcode 2 (0x0f 0x1e) +Referrer: +AVXcode: +# Skip 0x00-0xf9 +fa: ENDBR64 (f3) +fb: ENDBR32 (f3) +#skip 0xfc-0xff +EndTable + +Table: 3-byte opcode 3 (0x0f 0x38) Referrer: 3-byte escape 1 AVXcode: 2 # 0x0f 0x38 0x00-0x0f @@ -804,7 +813,7 @@ f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v) | WRSS Pq,Qq f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v) EndTable -Table: 3-byte opcode 3 (0x0f 0x3a) +Table: 3-byte opcode 4 (0x0f 0x3a) Referrer: 3-byte escape 2 AVXcode: 3 # 0x0f 0x3a 0x00-0xff diff --git a/tools/objtool/arch/x86/lib/x86-opcode-map.txt b/tools/objtool/arch/x86/lib/x86-opcode-map.txt index c5e825d44766..fbc53481bc59 100644 --- a/tools/objtool/arch/x86/lib/x86-opcode-map.txt +++ b/tools/objtool/arch/x86/lib/x86-opcode-map.txt @@ -620,7 +620,16 @@ ea: SAVEPREVSSP (f3) # Skip 0xeb-0xff EndTable -Table: 3-byte opcode 2 (0x0f 0x38) +Table: 3-byte opcode 2 (0x0f 0x1e) +Referrer: +AVXcode: +# Skip 0x00-0xf9 +fa: ENDBR64 (f3) +fb: ENDBR32 (f3) +#skip 0xfc-0xff +EndTable + +Table: 3-byte opcode 3 (0x0f 0x38) Referrer: 3-byte escape 1 AVXcode: 2 # 0x0f 0x38 0x00-0x0f @@ -804,7 +813,7 @@ f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v) | WRSS Pq,Qq f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v) EndTable -Table: 3-byte opcode 3 (0x0f 0x3a) +Table: 3-byte opcode 4 (0x0f 0x3a) Referrer: 3-byte escape 2 AVXcode: 3 # 0x0f 0x3a 0x00-0xff