Florian, thanks for the heads-up and for pursuing this. I read some of the links pointed out in that bug, and I see there is much to improve yet, and 4.17 might not have the best pkeys story for powerpc. Maybe we should just disable that test in the meantime.
About the particular problem we saw here in our case:
FAIL: misc/tst-pkey
original exit status 1
error: ../sysdeps/unix/sysv/linux/tst-pkey.c:200: pkey_alloc: No space left on device
error: 1 test failures
Running this on a system I got hold onto, I got the same issue.
Likely, this is due to pkey_disabled from arch/powerpc/include/asm/pkeys.h:mm_pkey_alloc, which would be the case as in arch/powerpc/mm/pkeys.c:pkey_initialize:
if (!pkey_mmu_enabled() || radix_enabled() || !pkeys_total) static_branch_enable(&pkey_disabled);
else static_branch_disable(&pkey_disabled);
I don't think EINVAL should be returned instead. Returning ENOSPC in such a case seems reasonable, and any pkey code should be able to handle that case. So, one more thing to fixup in the tests expectations.
Florian, thanks for the heads-up and for pursuing this. I read some of the links pointed out in that bug, and I see there is much to improve yet, and 4.17 might not have the best pkeys story for powerpc. Maybe we should just disable that test in the meantime.
About the particular problem we saw here in our case:
FAIL: misc/tst-pkey unix/sysv/ linux/tst- pkey.c: 200: pkey_alloc: No space left on device
original exit status 1
error: ../sysdeps/
error: 1 test failures
Running this on a system I got hold onto, I got the same issue.
Likely, this is due to pkey_disabled from arch/powerpc/ include/ asm/pkeys. h:mm_pkey_ alloc, which would be the case as in arch/powerpc/ mm/pkeys. c:pkey_ initialize:
if (!pkey_ mmu_enabled( ) || radix_enabled() || !pkeys_total)
static_ branch_ enable( &pkey_disabled) ;
static_ branch_ disable( &pkey_disabled) ;
else
I don't think EINVAL should be returned instead. Returning ENOSPC in such a case seems reasonable, and any pkey code should be able to handle that case. So, one more thing to fixup in the tests expectations.
Cascardo.