On Wed, Jan 25, 2023 at 11:13 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote: > > On 1/25/23 11:02, Jeff Xu wrote: > > I'm investigating if there is a need to backport x86/pkeys > > fix/feature into earlier kernel versions, Chrome is starting to use > > PKEY in x86, and I hope experts here can give advice on this. > > > > For background, ChromeOS regularly syncs with upstream kernel > > versions, and has production that uses 4.4/4.14/4.19/5.4/5.10/5.15. > To be honest, I haven't got the foggiest idea what you need to backport. > I can barely keep track of mainline. > > Are there really production 4.4 kernels that you need to run on > pkey-capable hardware? That would mean running a 2015-era kernel on a > CPU released in late 2020. I think Q3'2020 is when the 11th gen CPUs > came out which were the first non-server CPUs that had pkeys. > Thanks! For 11th gen CPUs, chromebook uses 5.4 and above, so that eliminate half of the versions. > On a positive note, the pkeys selftest has been pretty consistently > updated as we find bugs. I'd be curious how well a mainline version of > that selftests runs on old kernels. But, I'm too scared to find out > what's down that particular rabbit hole myself. I can start with 5.10 or 5.15, it seems there are quite some changes though, for example, this one by Thomas https://lore.kernel.org/lkml/20210623120127.327154589@xxxxxxxxxxxxx/ My question is, if I have to pick a version that doesn't require a lot of backporting, and functionality is stable enough, what version would this be ? 5.4/5.10/5.15 ? -Jeff