[LTP] [PATCH v2] ioctl10.c: New case test PROCMAP_QUERY ioctl()

Wei Gao wegao@suse.com
Fri Jul 11 17:47:49 CEST 2025


On Thu, Jul 10, 2025 at 05:26:29PM +0200, Cyril Hrubis wrote:
> Hi!
> I've pushed the patch with following changes:
> 
> - removed .needs_root since the test runs fine without root
> 
> - moved the check for ioctl() support into the test setup() and the
>   check for availability is only done on kernels older than 6.11 since
>   it has to be available since that kernel version
> 
> - made use of guarded buffers for the procmap_query structure passed to
>   the syscalls
> 
> What should still be done:
> 
> - we miss a few more 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->qma_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
>   - possibly ESRCH if we attempt to get memory map of a process that did exit and was waited for
> 
> - the invalid tests should be split into a separate test and stored in
>   a tcase structure as we usually do, which makes it easier to add tests
Thanks, i will check it.
> 
> Full diff:
> -- 
> Cyril Hrubis
> chrubis@suse.cz


More information about the ltp mailing list