From 11fa2524e56a1367369f36dd0f382ecb6bccd935 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Feb 12 2021 08:43:51 +0000 Subject: Apply patch glibc-rh1642150-3.patch patch_name: glibc-rh1642150-3.patch present_in_specfile: true location_in_specfile: 336 --- diff --git a/manual/memory.texi b/manual/memory.texi index a1435aa..4731a38 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -3289,6 +3289,10 @@ in which memory protection keys are disabled. @item ENOSPC All available protection keys already have been allocated. + +The system does not implement memory protection keys or runs in a mode +in which memory protection keys are disabled. + @end table @end deftypefun diff --git a/sysdeps/unix/sysv/linux/tst-pkey.c b/sysdeps/unix/sysv/linux/tst-pkey.c index 600b6f0..40d7e9f 100644 --- a/sysdeps/unix/sysv/linux/tst-pkey.c +++ b/sysdeps/unix/sysv/linux/tst-pkey.c @@ -199,6 +199,10 @@ do_test (void) if (errno == EINVAL) FAIL_UNSUPPORTED ("CPU does not support memory protection keys: %m"); + if (errno == ENOSPC) + FAIL_UNSUPPORTED + ("no keys available or kernel does not support memory" + " protection keys"); FAIL_EXIT1 ("pkey_alloc: %m"); } TEST_COMPARE (pkey_get (keys[0]), 0);