Re: [PATCH v3 1/3] arch/x86: Rename config X86_INTEL_MEMORY_PROTECTION_KEYS to generic x86

From: Dave Hansen
Date: Mon May 11 2020 - 19:44:25 EST


On 5/11/20 4:32 PM, Babu Moger wrote:
> AMD's next generation of EPYC processors support the MPK (Memory
> Protection Keys) feature.
>
> So, rename X86_INTEL_MEMORY_PROTECTION_KEYS to X86_MEMORY_PROTECTION_KEYS.
>
> No functional changes.
>
> AMD documentation for MPK feature is available at "AMD64 Architecture
> Programmerâs Manual Volume 2: System Programming, Pub. 24593 Rev. 3.34,
> Section 5.6.6 Memory Protection Keys (MPK) Bit". Documentation can be
> obtained at the link below.

I was hoping to see at least *some* justification in this changelog. Do
you think having "INTEL_" will confuse users? Is there some technical
merit to this change?

The naming churn is an obviously bad, not technically necessary change.

> +config X86_MEMORY_PROTECTION_KEYS
> + # Note: This is an intermediate change to avoid config prompt to
> + # the users. Eventually, the option X86_INTEL_MEMORY_PROTECTION_KEYS
> + # should be changed to X86_MEMORY_PROTECTION_KEYS permanently after
> + # few kernel revisions.
> + def_bool X86_INTEL_MEMORY_PROTECTION_KEYS

"after a few kernel revisions" is code for "never". :)

Could we put an explicit date on this, please? One year seems roughly
right. Or, maybe "after the v5.10" release, so that this will approach
will make into at least one LTS kernel.

Maybe:

# Set the "INTEL_"-free option whenever the "INTEL_" one is set.
# The "INTEL_" one should be removed and replaced by this option after
# 5.10. This avoids exposing most 'oldconfig' users to this churn.