mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 17:44:17 +01:00
5a7e48dddf
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D41236 MFC after: 1 month
38 lines
714 B
Bash
38 lines
714 B
Bash
#
|
|
# Copyright (c) 2022 Dmitry Chagin <dchagin@FreeBSD.org>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
#
|
|
# Simple test of MAP_32BIT flag w/wo ASLR
|
|
|
|
map_32bit_w_aslr_head()
|
|
{
|
|
atf_set descr "MAP_32BIT with ASLR"
|
|
atf_set require.progs proccontrol
|
|
}
|
|
|
|
map_32bit_w_aslr_body()
|
|
{
|
|
atf_check -s exit:0 -x proccontrol -m aslr -s enable \
|
|
$(atf_get_srcdir)/mmap_map_32bit_helper
|
|
}
|
|
|
|
map_32bit_wo_aslr_head()
|
|
{
|
|
atf_set descr "MAP_32BIT without ASLR"
|
|
atf_set require.progs proccontrol
|
|
}
|
|
|
|
map_32bit_wo_aslr_body()
|
|
{
|
|
atf_check -s exit:0 -x proccontrol -m aslr -s disable \
|
|
$(atf_get_srcdir)/mmap_map_32bit_helper
|
|
}
|
|
|
|
|
|
atf_init_test_cases()
|
|
{
|
|
atf_add_test_case map_32bit_w_aslr
|
|
atf_add_test_case map_32bit_wo_aslr
|
|
}
|