about summary refs log tree commit diff
path: root/sysdeps/x86_64/_mcount.S
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2022-06-28 18:44:03 +0800
committerDJ Delorie <dj@redhat.com>2022-07-05 22:34:51 -0400
commitbd0b58837c7df091046e7531642f379a52e1e157 (patch)
tree44ddeab7eddc6c7ee2e44de31522dda1b3a658ae /sysdeps/x86_64/_mcount.S
parentae308947ff0fa950431d53bcc90c875295d57715 (diff)
downloadglibc-bd0b58837c7df091046e7531642f379a52e1e157.tar.gz
glibc-bd0b58837c7df091046e7531642f379a52e1e157.tar.xz
glibc-bd0b58837c7df091046e7531642f379a52e1e157.zip
test-container: return UNSUPPORTED for ENOSPC on clone()
Since Linux 4.9, the kernel provides
/proc/sys/user/max_{mnt,pid,user}_namespace as a limitation of number of
namespaces.  Some distros (for example, Slint Linux 14.2.1) set them (or
only max_user_namespace) to zero as a "security policy" for disabling
namespaces.

The clone() call will set errno to ENOSPC under such a limitation.  We
didn't check ENOSPC in the code so the test will FAIL, and report:

    unable to unshare user/fs: No space left on device

This message is, unfortunately, very unhelpful.  It leads people to
check the memory or disk space, instead of finding the real issue.

To improve the situation, we should check for ENOSPC and return
UNSUPPORTED as the test result.  Also refactor check_for_unshare_hints()
to emit a proper message telling people how to make the test work, if
they really need to run the namespaced tests.

Reported-by: Philippe Delavalade <philippe.delavalade@orange.fr>
URL: https://lists.linuxfromscratch.org/sympa/arc/lfs-support/2022-06/msg00022.html
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'sysdeps/x86_64/_mcount.S')
0 files changed, 0 insertions, 0 deletions