[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878s3y7p4r.ffs@nanos.tec.linutronix.de>
Date: Fri, 28 May 2021 19:19:00 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Dave Hansen <dave.hansen@...el.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com, bp@...en8.de,
x86@...nel.org, luto@...nel.org, shuah@...nel.org,
babu.moger@....com, dave.kleikamp@...cle.com, linuxram@...ibm.com,
bauerman@...ux.ibm.com
Subject: Re: [PATCH 0/5] x86/pkeys: PKRU manipulation bug fixes and cleanups
On Fri, May 28 2021 at 09:11, Dave Hansen wrote:
> On 5/28/21 8:32 AM, Thomas Gleixner wrote:
> There are also the usual concerns that folks doing user-level context
> switching or other insanity get PKRU context switching for "free" when
> it's XSAVE-managed. Moving away from that could break them.
Both issues are trivial to solve.
We can have pkru enabled in xcr0 and just do not restore it when
returning to user space (clear the mask bit).
When we restore it in sigrestore via xrstor then we read it via rdpkru
afterwards and update task->thread.pkru.
Thanks,
tglx
Powered by blists - more mailing lists