History log of /freebsd-current/tests/sys/vm/mmap_test.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 766c2466 18-Feb-2022 Arka Sharma <arka_sharma@dell.com>

mmap map_at_zero test: handle W^X

Use kern.elfXX.allow_wx to decide whether to map W+X or W-only memory.

Future work could expand this test to add an "allow_wx" axis to the
test matrix, but I would argue that a separate test should be written,
since that's orthogonal to map_at_zero.

MFC after: 1 week
Sponsored by: Dell EMC Isilon


# f56a08c8 13-Oct-2020 Andrew Turner <andrew@FreeBSD.org>

Fix write only mappings on arm64

When trapping on a wrote access to a buffer the kernel has mapped as write
only we should only pass the VM_PROT_WRITE flag. Previously the call to
vm_fault_trap as the VM_PROT_READ flag was unexpected.

Reported by: manu
Sponsored by: Innovate UK


# 374d7f62 11-Feb-2017 Enji Cooper <ngie@FreeBSD.org>

Revert r313565 -- :mmap__bad_arguments passes again after r313655

PR: 216976
Sponsored by: Dell EMC Isilon


# 28e59198 10-Feb-2017 Enji Cooper <ngie@FreeBSD.org>

Expect :mmap__bad_arguments to fail

Some recent changes to vm related to mmap(2) have broken the prot checks that
would result with an EINVAL with this case

I suspect r313352 is the root-cause the issue

PR: 216976
Sponsored by: Dell EMC Isilon


# 5fea4595 13-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Fix -Wsign-compare warnings

The loop index (i) doesn't need to be size_t as its comparison is signed

MFC after: 1 week
Sponsored by: Dell EMC Isilon


# 410757a4 19-Apr-2016 Enji Cooper <ngie@FreeBSD.org>

Fix leaks and test for getpagesize() returning == -1

- close file descriptors after use.
- Always munmap memory regions after mmap'ing them.
- Make sure getpagesize() returns a value greater than 0 and use a
cached value instead of always calling getpagesize(3).

CID: 1331374-1331377, 1331653-1331662
Differential Revision: https://reviews.freebsd.org/D6011
MFC after: 2 weeks
Reported by: Coverity
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division


# 9695459d 03-Sep-2015 John Baldwin <jhb@FreeBSD.org>

Add more mmap tests related to character devices.
- Add cdev-related tests for bad args.
- Add two simple tests cases for mapping /dev/zero that test for
MAP_ANON-like behavior.

Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3323


# 7f43ee0f 06-Aug-2015 John Baldwin <jhb@FreeBSD.org>

Add various tests to ensure that invalid arguments passed to mmap()
trigger failures.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3269


# 95eee0d4 06-Aug-2015 John Baldwin <jhb@FreeBSD.org>

Convert the map_at_zero test case to ATF. In particular, this will
facilitate adding more mmap() tests.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D3268


# 42484f6f 27-Apr-2015 Enji Cooper <ngie@FreeBSD.org>

Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test

As jhb noted, the actual mmap(2) implementation is under sys/vm, not
sys/kern/, so the correct logical place is tests/sys/vm/, not
tests/sys/kern/

X-MFC with: r282076
MFC after: 6 days