From: Petr Vorel <pvorel@suse.cz>
To: Xiao Yang <ice_yangxiao@163.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] syscalls/{fanotify17, getxattr05}: Fix the ENOSPC error
Date: Mon, 27 Jan 2025 18:14:41 +0100 [thread overview]
Message-ID: <20250127171441.GA304248@pevik> (raw)
In-Reply-To: <20240925084921.16352-1-ice_yangxiao@163.com>
Hi Cyril, Li,
> If the value of max_user_namespaces is set to 10 but more than
> 10 user namspaces are currently used on system. In this case,
> these tests fail with ENOSPC. for example:
> # lsns -t user -n | wc -l
> 17
> # ./fanotify17
> ...
> fanotify17.c:174: TINFO: Test #0: Global groups limit in init user ns
> fanotify17.c:130: TPASS: Created 128 groups - below groups limit (128)
> fanotify17.c:174: TINFO: Test #1: Global groups limit in privileged user ns
> fanotify17.c:154: TFAIL: unshare(CLONE_NEWUSER) failed: ENOSPC (28)
> tst_test.c:452: TBROK: Invalid child (6958) exit value 1
> Try to fix the issue by increasing the default value of
> max_user_namespaces by 10.
How about merging this before release? I was able to reproduce:
https://lore.kernel.org/ltp/20241104163845.GA1417282@pevik/
Kind regards,
Petr
> Signed-off-by: Xiao Yang <ice_yangxiao@163.com>
> ---
> testcases/kernel/syscalls/fanotify/fanotify17.c | 2 +-
> testcases/kernel/syscalls/getxattr/getxattr05.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify17.c b/testcases/kernel/syscalls/fanotify/fanotify17.c
> index 3ecb31b6e..a6206d953 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify17.c
> +++ b/testcases/kernel/syscalls/fanotify/fanotify17.c
> @@ -224,7 +224,7 @@ static void setup(void)
> user_ns_supported = 0;
> } else if (!access(MAX_USERNS, F_OK)) {
> SAFE_FILE_SCANF(MAX_USERNS, "%d", &orig_max_userns);
> - SAFE_FILE_PRINTF(MAX_USERNS, "%d", 10);
> + SAFE_FILE_PRINTF(MAX_USERNS, "%d", orig_max_userns + 10);
> }
> /*
> diff --git a/testcases/kernel/syscalls/getxattr/getxattr05.c b/testcases/kernel/syscalls/getxattr/getxattr05.c
> index d9717a695..f1c8e8391 100644
> --- a/testcases/kernel/syscalls/getxattr/getxattr05.c
> +++ b/testcases/kernel/syscalls/getxattr/getxattr05.c
> @@ -156,7 +156,7 @@ static void setup(void)
> user_ns_supported = 0;
> } else if (!access(MAX_USERNS, F_OK)) {
> SAFE_FILE_SCANF(MAX_USERNS, "%d", &orig_max_userns);
> - SAFE_FILE_PRINTF(MAX_USERNS, "%d", 10);
> + SAFE_FILE_PRINTF(MAX_USERNS, "%d", orig_max_userns + 10);
> }
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-27 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 8:49 [LTP] [PATCH v2] syscalls/{fanotify17, getxattr05}: Fix the ENOSPC error Xiao Yang
2024-09-26 11:18 ` Cyril Hrubis
2024-11-04 16:38 ` Petr Vorel
2024-11-04 16:45 ` Petr Vorel
2025-01-27 17:14 ` Petr Vorel [this message]
2025-04-29 9:47 ` Cyril Hrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250127171441.GA304248@pevik \
--to=pvorel@suse.cz \
--cc=ice_yangxiao@163.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox