From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] ioctl11.c: New case check PROCMAP_QUERY ioctl() errnos
Date: Tue, 12 Aug 2025 16:07:52 +0200 [thread overview]
Message-ID: <20250812140752.GB861768@pevik> (raw)
In-Reply-To: <20250812061435.21209-1-wegao@suse.com>
Hi Wei, Andrea,
> +/*\
> + * [Description]
nit: we stopped using this. Could it be removed before merge?
> + *
> + * Test PROCMAP_QUERY ioctl() errnos:
> + *
> + * - EINVAL if q->size is too small
> + * - E2BIG if q->size is larger than page size
> + * - EINVAL on invalid q->flags
> + * - EINVAL if only one of q->vma_name_size and q->vma_name_addr is set
> + * - EINVAL if only one of q->build_id_size and q->build_id_addr is set
> + * - ENAMETOOLONG if build_id_size or name_buf_size is too small
> + * - ESRCH if attempt to get memory map of a process that did exit and was waited for
> + *
> + * [1] https://kernelnewbies.org/Linux_6.11#Memory_management
> + * [2] https://kernelnewbies.org/Linux_6.11#Binary_interface_for_.2Fproc.2F.3Cpid.3E.2Fmaps
> + * [3] https://lore.kernel.org/all/20240627170900.1672542-1-andrii@kernel.org/
> + * ed5d583a88a9 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
nit: [1] and other numbers will look ugly in generated doc:
[1] https://kernelnewbies.org/Linux_6.11#Memory_management [2] https://kernelnewbies.org/Linux_6.11#Binary_interface_for_.2Fproc.2F.3Cpid.3E.2Fmaps [3] https://lore.kernel.org/all/20240627170900.1672542-1-andrii@kernel.org/
=> inlined and [1] [2] [3] does not make sense when they refer to nothing.
Instead of
> + * [1] https://kernelnewbies.org/Linux_6.11#Memory_management
> + * [2] https://kernelnewbies.org/Linux_6.11#Binary_interface_for_.2Fproc.2F.3Cpid.3E.2Fmaps
> + * [3] https://lore.kernel.org/all/20240627170900.1672542-1-andrii@kernel.org/
> + * ed5d583a88a9 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
I suggest to change before merge to something like:
PROCMAP_QUERY was introduced in 6.11.
* * https://kernelnewbies.org/Linux_6.11#Binary_interface_for_.2Fproc.2F.3Cpid.3E.2Fmaps
* * ed5d583a88a9 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
Reviewed-by: Petr Vorel <pvorel@suse.cz>
...
> +static void fork_child_setup(void)
> +{
> + int pid = SAFE_FORK();
> +
> + if (pid == 0) {
> + TST_CHECKPOINT_WAKE(0);
> + TST_CHECKPOINT_WAIT(1);
> + exit(0);
> + }
> +
> + TST_CHECKPOINT_WAIT(0);
> +
> + char proc_path[PATH_MAX];
> +
> + snprintf(proc_path, PATH_MAX, "/proc/%d/maps", pid);
> + fd = SAFE_OPEN(proc_path, O_RDONLY);
> +
> + TST_CHECKPOINT_WAKE(1);
Using of the checkpoints LGTM, but hopefully somebody else recheck it.
Kind regards,
Petr
> + SAFE_WAITPID(pid, NULL, 0);
> +}
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-08-12 14:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 13:48 [LTP] [PATCH v1] iocl11.c: New case check PROCMAP_QUERY ioctl() errnos Wei Gao via ltp
2025-08-07 8:36 ` Petr Vorel
2025-08-08 16:30 ` [LTP] [PATCH v2] ioctl11.c: " Wei Gao via ltp
2025-08-12 6:14 ` [LTP] [PATCH v3] " Wei Gao via ltp
2025-08-12 14:07 ` Petr Vorel [this message]
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=20250812140752.GB861768@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.