[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190722163811.GJ60625@arrakis.emea.arm.com>
Date: Mon, 22 Jul 2019 17:38:12 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Guo Ren <guoren@...nel.org>
Cc: Julien Grall <julien.grall@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
aou@...s.berkeley.edu, gary@...yguo.net,
Atish Patra <Atish.Patra@....com>, hch@...radead.org,
paul.walmsley@...ive.com, rppt@...ux.ibm.com,
linux-riscv@...ts.infradead.org, Anup Patel <anup.Patel@....com>,
Palmer Dabbelt <palmer@...ive.com>, suzuki.poulose@....com,
Marc Zyngier <marc.zyngier@....com>, julien.thierry@....com,
Will Deacon <will.deacon@....com>, christoffer.dall@....com,
james.morse@....com, linux-csky@...r.kernel.org
Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a
separate file
On Tue, Jul 16, 2019 at 11:31:27AM +0800, Guo Ren wrote:
> I saw arm64 to prevent speculation by temporarily setting TTBR0.el1 to
> a zero page table. Is that used to prevent speculative execution user
> space code or just prevent ld/st in copy_use_* ?
Only to prevent explicit ld/st from user. On ARMv8.1+, we don't normally
use the TTBR0 trick but rather disable user space access using the PAN
(privileged access never) feature. However, I don't think PAN disables
speculative accesses, only explicit loads/stores. Also, with ARMv8.2
Linux uses the LDTR/STTR instructions in copy_*_user() which don't need
to disable PAN explicitly.
--
Catalin
Powered by blists - more mailing lists