This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix tst-pkey expectations on pkey_get
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Lucas A. M. Magalhaes" <lamm at linux dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 07 Feb 2020 19:22:16 +0100
- Subject: Re: [PATCH] Fix tst-pkey expectations on pkey_get
- References: <20200207134604.29046-1-lamm@linux.ibm.com>
* Lucas A. M. Magalhaes:
> Florian, Your patch including pkey_set and pkey_get looks good to me.
> Can you merge it? This one
> https://sourceware.org/ml/libc-alpha/2018-05/msg00760.html.
Thanks. Is the patch really correct for 32-bit userspace?
> With this there will be one failure on this test on powerpc machines.
> The test expects that during a signal handling the pkey_get returns
> PKEY_DISABLE_ACCESS for all keys. In my tests it returns the same
> permissions as before the signal. I couldn't find where this is done for
> x86. Is this kernel implementation?
POWER has read-disable and write-disable flags which work independently.
The kernel-defined flags cannot represent the read-disable
configuration. At the time, there was no read-disable flag allocated in
the kernel. Has this changed? (See the ”Translate” comments in my
patch.)
On x86, the hardware has write-disable and read-write-disable flags
instead, which matches the original UAPI interfaces. This is why no
translation is necessary.
Thanks,
Florian