Comment 2 for bug 1776967

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

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.

Cascardo.