Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248847 > unrolled thread
| Started by | Dave Hansen <dave@sr71.net> |
|---|---|
| First post | 2015-10-16 17:20 +0200 |
| Last post | 2015-10-16 17:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 26/26] x86, pkeys: Documentation Dave Hansen <dave@sr71.net> - 2015-10-16 17:20 +0200
| From | Dave Hansen <dave@sr71.net> |
|---|---|
| Date | 2015-10-16 17:20 +0200 |
| Subject | Re: [PATCH 26/26] x86, pkeys: Documentation |
| Message-ID | <qkeXv-1Ha-15@gated-at.bofh.it> |
On 10/03/2015 12:27 AM, Ingo Molnar wrote: > - 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. > > 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) The pkey_set() operation is going to get a wee bit interesting with signals. pkey_set() will modify the _current_ context's PKRU which includes the register itself and the kernel XSAVE buffer (if active). But, since the PKRU state is saved/restored with the XSAVE state, we will blow away any state set during the signal. I _think_ the right move here is to either keep a 'shadow' version of PKRU inside the kernel (for each thread) and always update the task's XSAVE PKRU state when returning from a signal handler. Or, _copy_ the signal's PKRU state in to the main process's PKRU state when returning from a signal. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web