Received: by 10.223.148.5 with SMTP id 5csp7103330wrq; Thu, 18 Jan 2018 00:39:58 -0800 (PST) X-Google-Smtp-Source: ACJfBotFQTEat7aAznhyjhQ4YLrrJ0Wazi2CExWoNAQzJZJC0NEe+SxzyJ3ExykFlVJAGCadAfNu X-Received: by 10.98.19.19 with SMTP id b19mr13597095pfj.118.1516264798238; Thu, 18 Jan 2018 00:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516264798; cv=none; d=google.com; s=arc-20160816; b=knx3cP4Ul63fPZMCEpckuelTJegVtLXThzJ7DROQEBVcF83Jg43yfE1TccV4UwMNFC z0CR4M4UiJmPq+1ApxqLJ9BWb8u3gVRyRDgue3I+Njj49pv35YOE8yisXZZYfRNUeYyu f7CyAvEU21pPiu5+SPYQ0599pL9eqHvg495vHEecdoCar4bWG/0p3ud6Uxm9mo21AqOy Uv8eHWu3AwPnzWHyu26wRBZqDSZ/Ng0MDhDbr2qMxVjP0doDbm8KXQm/rTDlV9ZvQesz 4Np0goCqXqFiAPK03enVGoLldCChRO342zyrY3wKZweLOEUX/zj3cf3PNM08+xwJ7Bjh BYkg== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=S1p4b83O3vZHt/nJ+2cuKnkeKvPhjL/W8Uoh9KoSUig=; b=WZuJ8OUEbLJSRWE2gNMv/RjIK2EPMeaIBgiwuPPJmaD6O28ju8pgi/xC4UOk85doVl My+VwNY9gUcuYNrJWdZb1I5O5Oa9Bz/dENA7zOVqKi/6GKtx6oS+cH9nBRy6lQa6MA9h 7+dhJWbdpl8b+DmaZr+bbNlQ7rQcZ9I7TztBnyXWuXiK4jj/FbSmatzRmqTwwTFVCRTv 5llFx+MKzKdDAWvY1Rl6O0ngvGKtXBiWbcsND1XTzuZnGmOYD89GRy++R5tSaGVwIlRn M/rYV6tLK8g3ez6+h9ysjcDPmVi3wqQQXOrMm9GNMhUsaA0CWWdP8rcJ4JNGgc3w5hCr QPYQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh1si5970770plb.621.2018.01.18.00.39.44; Thu, 18 Jan 2018 00:39:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754915AbeARIhj (ORCPT + 99 others); Thu, 18 Jan 2018 03:37:39 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:51262 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754900AbeARIhi (ORCPT ); Thu, 18 Jan 2018 03:37:38 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id DFA7A2D148457; Thu, 18 Jan 2018 16:37:32 +0800 (CST) Received: from [127.0.0.1] (10.177.29.40) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.361.1; Thu, 18 Jan 2018 16:37:29 +0800 Subject: Re: [PATCH v2 07/11] arm64: Add skeleton to harden the branch predictor against aliasing attacks To: Will Deacon References: <1515157961-20963-1-git-send-email-will.deacon@arm.com> <1515157961-20963-8-git-send-email-will.deacon@arm.com> <01c224eb-9bec-6b16-7ecf-14837cc107b6@huawei.com> <20180117100715.GA27892@arm.com> CC: , , , , , , , From: Yisheng Xie Message-ID: Date: Thu, 18 Jan 2018 16:37:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20180117100715.GA27892@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.40] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On 2018/1/17 18:07, Will Deacon wrote: > On Wed, Jan 17, 2018 at 12:10:33PM +0800, Yisheng Xie wrote: >> Hi Will, >> >> On 2018/1/5 21:12, Will Deacon wrote: >>> diff --git a/arch/arm64/mm/context.c b/arch/arm64/mm/context.c >>> index 5f7097d0cd12..d99b36555a16 100644 >>> --- a/arch/arm64/mm/context.c >>> +++ b/arch/arm64/mm/context.c >>> @@ -246,6 +246,8 @@ asmlinkage void post_ttbr_update_workaround(void) >>> "ic iallu; dsb nsh; isb", >>> ARM64_WORKAROUND_CAVIUM_27456, >>> CONFIG_CAVIUM_ERRATUM_27456)); >>> + >>> + arm64_apply_bp_hardening(); >>> } >> >> post_ttbr_update_workaround was used for fix Cavium erratum 2745? so does that >> means, if we do not have this erratum, we do not need arm64_apply_bp_hardening()? >> when mm_swtich and kernel_exit? >> >> From the code logical, it seems not only related to erratum 2745 anymore? >> should it be renamed? > > post_ttbr_update_workaround just runs code after a TTBR update, which > includes mitigations against variant 2 of "spectre" and also a workaround > for a Cavium erratum. These are separate issues. Get it, Thanks for your kind explain. Thanks Yisheng > > Will > > . >