Re: [PATCH 1/4] pkeys: add API to switch to permissive pkey register

From: Dave Hansen
Date: Wed Feb 26 2025 - 12:22:24 EST


On 2/26/25 02:00, Dmitry Vyukov wrote:
>> We could typedef it to some fake struct. Such a struct can't be passed
>> to any function accepting an integer type (real pkeys), and any
>> arithmetic won't work on it.
> Dave, how should we proceed? Do you think this is a potential misuse
> worth preventing proactively? If yes, I can send v7.

I don't think it's worth doing anything too weird. Defining some kind of
special struct would be pretty weird.