[LTP] [PATCH v2] security/stack_clash: Add test for mmap() minding gap

Petr Vorel pvorel@suse.cz
Wed Jun 21 11:43:23 CEST 2023


Hi Rick,

> diff --git a/testcases/cve/stack_clash.c b/testcases/cve/stack_clash.c
...

> +		/* This is not cleaned up. */
> +		SAFE_MMAP((void *)lastend, size, PROT_NONE,
> +			  MAP_ANON|MAP_PRIVATE|MAP_FIXED_NOREPLACE, -1, 0);
MAP_FIXED_NOREPLACE is undeclared on old CentOS 7 we still support,
thus it breaks the build.

Could you please include lapi/mmap.h instead of <sys/mman.h>
(it includes <sys/mman.h>).

Kind regards,
Petr


More information about the ltp mailing list