Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/tests



Module Name:    src
Committed By:   kamil
Date:           Wed May 30 17:31:34 UTC 2018

Modified Files:
        src/tests/kernel: h_segv.c
        src/tests/lib/libc/sys: t_ptrace_wait.h

Log Message:
Make the trigger_bus() test compatible with more CPUs (at least ALPHA)

If we write a byte character into a pointer, a compiler can emit a
read-modify-write operation, especially when a CPU cannot access directly
a character wide address.

In this scenario calling mmap(2) with PROT_WRITE, without PROT_READ will
emit unexpected trap.

There are two possible workarounds for this issue:
 - write register wide memory without rmw sequence,
 - mark the region with additional protection PROT_READ

Both work for NetBSD/alpha.

Go for the latter as perhaps more safe for dump compilers emitting rmw
sequences.

Investigated by <martin>


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/kernel/h_segv.c
cvs rdiff -u -r1.9 -r1.10 src/tests/lib/libc/sys/t_ptrace_wait.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index