[LTP] [PATCH v2 1/8] Refactor mmap03 test

Petr Vorel pvorel@suse.cz
Mon Feb 10 10:41:41 CET 2025


Hi Andrea, all,

...
> - *	07/2001 Ported by Wayne Boyer
> + * With ia64 and PARISC/hppa, an attempt to access the contents of the
> + * mapped region should rise signal SIGSEGV.

You kept this:
 * With ia64 and PARISC/hppa, an attempt to access the contents of the
 * mapped region should rise signal SIGSEGV.

You kept checking SIGSEGV, but not sigsetjmp() which should cause it (IMHO it
will not work).

I wonder if we should care about these old archs. Both ia64 and hppa are
dropped. The only still living arch is __mips__. But looking at change when it
mips was added it's quite recent - 2021:
c7f979b3d ("syscalls/mmap03: Fix SegFault on MIPS")

@Cyril? Should we keep only mips? And I strongly suspect nobody is testing LTP
on mips, but we should probably not kill a still living arch.
If all these archs removed whole fork could be removed.

...
> +	tst_res(TINFO, "Map temporary file in memory with PROT_EXEC");
nit: I would remove it. In case of the problem SAFE_MMAP() will notify,
otherwise not important.

Also, can we move SAFE_MALLOC() to setup and free to cleanup()

data = SAFE_MALLOC(page_sz);

Kind regards,
Petr


More information about the ltp mailing list