Message ID | 20191211154206.46260-11-broonie@kernel.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp701001ile; Wed, 11 Dec 2019 07:43:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxkhUwrOSzHLk2uyoQYnbnD+nGGFI5pNOSgXYQBsPBlc+k8SiZyQdK15L6C26DeP0dtPe8f X-Received: by 2002:a05:6830:22ee:: with SMTP id t14mr2659729otc.236.1576079004649; Wed, 11 Dec 2019 07:43:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079004; cv=none; d=google.com; s=arc-20160816; b=l293pSMDyzeMUTO+ce/SMxJi7pV4waa0wRmJpSf/AdxtzLcCy5ZrPNzaV2FTKCknZ+ M2tF2yEZkDBr31ppYNixC0noKD3dH5OMn3fSLadPsCoRSZuG6Zbu2VqWYfkuyCE2kBuY nAsjAN8cVCeIBLqqmYwcVNExw7D6CxoqWqG1jJGYXb5BXVkk7wstMX5ywJujPUQRWCN4 tB2kIK/bptWssqxgjwSsQ4ztFAswM9paaR0xiJvts3/Tl95gXesE+oMMZW9bQPa7Z4SB JUAgPiABc5zhsorhzxmb3RqblDhQqzCOF0MueMnKtU09evmIaj1Hx0svA//Z3zlFVe+k tGmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=e9YqLX5MhzVOhNDAP+AZg2FrvXUvfjQM7El1wCaw0nE=; b=xI2hkB4JR380dxXppE9jw2YXgYERXPVgWx+gi0sYPvpQDFnjyMX/8Hyoh78FFI2512 RxcvIIpOYc6jE1ymCLHYIVe1xmYX0y81Bkso+wOmzzfsfbR464lA1PQRaWZHJH7Qjk8Q ME9+qaXIqF7RFhteNgwK1242RxDladxbpYWuh8K5ZWd29bgrwWXklaahzFJQ2XknNXc4 fM8JcQobUd7y5j3TlwGziIpIkAe2ePpXVd9oMnaXv8vEQae4yQBZRYotdHKTqZJ0cwh0 M2T34lQsB/uPOeKzz5VsukzN7gyKKpBntOY5b57uFD0euiPuJ5DL6joSJWfQUEbFMALn jKiw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c131si1166055oig.170.2019.12.11.07.43.23; Wed, 11 Dec 2019 07:43:24 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387851AbfLKPnT (ORCPT <rfc822;christophe.lyon@linaro.org> + 27 others); Wed, 11 Dec 2019 10:43:19 -0500 Received: from foss.arm.com ([217.140.110.172]:35612 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388372AbfLKPnO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Dec 2019 10:43:14 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F2D431B; Wed, 11 Dec 2019 07:43:13 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EE213F52E; Wed, 11 Dec 2019 07:43:13 -0800 (PST) From: Mark Brown <broonie@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Paul Elliott <paul.elliott@arm.com>, Peter Zijlstra <peterz@infradead.org>, Yu-cheng Yu <yu-cheng.yu@intel.com>, Amit Kachhap <amit.kachhap@arm.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Marc Zyngier <maz@kernel.org>, Eugene Syromiatnikov <esyr@redhat.com>, Szabolcs Nagy <szabolcs.nagy@arm.com>, "H.J. Lu" <hjl.tools@gmail.com>, Andrew Jones <drjones@redhat.com>, Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>, Jann Horn <jannh@google.com>, Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Kristina_Mart=C5=A1enko?= <kristina.martsenko@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Florian Weimer <fweimer@redhat.com>, Sudakshina Das <sudi.das@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Dave Martin <Dave.Martin@arm.com>, Mark Brown <broonie@kernel.org> Subject: [PATCH v4 10/12] arm64: BTI: Reset BTYPE when skipping emulated instructions Date: Wed, 11 Dec 2019 15:42:04 +0000 Message-Id: <20191211154206.46260-11-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211154206.46260-1-broonie@kernel.org> References: <20191211154206.46260-1-broonie@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
arm64: ARMv8.5-A: Branch Target Identification support
|
expand
|
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index bf79d8024fbe..9fc05ae500e6 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -332,6 +332,8 @@ void arm64_skip_faulting_instruction(struct pt_regs *regs, unsigned long size) if (regs->pstate & PSR_MODE32_BIT) advance_itstate(regs); + else + regs->pstate &= ~PSR_BTYPE_MASK; } static LIST_HEAD(undef_hook);