lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 6 Oct 2015 16:28:05 -0700
From:	Dave Hansen <>
To:	Ingo Molnar <>
Cc:	Andy Lutomirski <>,
	Kees Cook <>,
	"" <>,
	LKML <>,
	Linux-MM <>,
	Linus Torvalds <>,
	Andrew Morton <>,
	Peter Zijlstra <>,
	Andy Lutomirski <>,
	Borislav Petkov <>
Subject: Re: [PATCH 26/26] x86, pkeys: Documentation

On 10/03/2015 12:27 AM, Ingo Molnar wrote:
>  - I'd also suggest providing an initial value with the 'alloc' call. It's true 
>    that user-space can do this itself in assembly, OTOH there's no reason not to 
>    provide a C interface for this.

You mean an initial value for the rights register (PKRU), correct?

So init_val would be something like


and it would refer only to the key that was allocated.

>  - Along similar considerations, also add a sys_pkey_query() system call to query 
>    the mapping of a specific pkey. (returns -EBADF or so if the key is not mapped
>    at the moment.) This too could be vDSO accelerated in the future.

Do you mean whether the key is being used on a mapping (VMA) or rather
whether the key is currently allocated (has been returned from
sys_pkey_alloc() in the past)?

> I.e. something like:
>      unsigned long sys_pkey_alloc (unsigned long flags, unsigned long init_val)
>      unsigned long sys_pkey_set   (int pkey, unsigned long new_val)
>      unsigned long sys_pkey_get   (int pkey)
>      unsigned long sys_pkey_free  (int pkey)
> Optional suggestion:
>  - _Maybe_ also allow the 'remote managed' setup of pkeys: of non-local tasks - 
>    but I'm not sure about that: it looks expensive and complex, and a TID argument 
>    can always be added later if there's some real need.

Yeah, let's see how the stuff above looks first.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists