Go to file
maxv b7edd3d132 Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us
to detect race conditions at runtime. It is a variation of TSan that is
easy to implement and more suited to kernel internals, albeit theoretically
less precise than TSan's happens-before.

We do basically two things:

 - On every KCSAN_NACCESSES (=2000) memory accesses, we create a cell
   describing the access, and delay the calling CPU (10ms).

 - On all memory accesses, we verify if the memory we're reading/writing
   is referenced in a cell already.

The combination of the two means that, if for example cpu0 does a read that
is selected and cpu1 does a write at the same address, kCSan will fire,
because cpu1's write collides with cpu0's read cell.

The coverage of the instrumentation is the same as that of kASan. Also, the
code is organized in a way similar to kASan, so it is easy to add support
for more architectures than amd64. kCSan is compatible with KCOV.

Reviewed by Kamil.
2019-11-05 20:19:17 +00:00
bin Avoid arithmetics on strings. 2019-10-29 16:19:59 +00:00
common uubsan: Implement function_type_mismatch_v1 2019-11-01 14:54:07 +00:00
compat 1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and 2019-10-24 18:46:20 +00:00
crypto Merge 85acd57c8a288ce92f42bcf62737eebe385bce90 from Heimdal on Github: 2019-10-28 18:12:54 +00:00
dist/pf grammar 2019-09-21 19:48:15 +00:00
distrib bump for gcc8 2019-11-04 00:59:05 +00:00
doc evbarm: Update TI OMAP3 SoC support to use FDT based configuration. 2019-11-04 09:11:00 +00:00
etc Remove commented out IGEPV2 entry 2019-11-03 12:16:35 +00:00
external regen powerpc64 2019-11-05 20:07:20 +00:00
extsrc
games Gcc-8 bug confusion with restrict on sh3 2019-10-29 21:30:42 +00:00
include Switch the iconv(3) prototype to the POSIX conformant variation 2019-10-24 18:17:14 +00:00
lib PR 54093: Align static TLS area to max_align_t. 2019-11-04 12:45:10 +00:00
libexec PR 54093: Align static TLS area to max_align_t. 2019-11-04 12:45:10 +00:00
regress Eliminate regress/libexec/ld.elf_so/expand 2019-04-06 16:25:52 +00:00
rescue Remove ldconfig from /rescue, and mark it MI obsolete. 2019-10-02 09:45:10 +00:00
sbin inode.c needs -O0 for vax 2019-10-28 22:52:43 +00:00
share Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us 2019-11-05 20:19:17 +00:00
sys Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us 2019-11-05 20:19:17 +00:00
tests Avoid warnings about tautological left shifts as conditional. 2019-10-28 18:10:22 +00:00
tools Don't escape ", GNU awk 5 warns about it. 2019-10-29 23:33:06 +00:00
usr.bin PR 54093: Align static TLS area to max_align_t. 2019-11-04 12:45:10 +00:00
usr.sbin PR/54670: Azuma OKAMOTO: Consistently use 'W' for TH_CWN, and bump buffer 2019-11-01 13:58:32 +00:00
build.sh Fix long-term broken pattern match when determining if uname -p output is 2019-06-07 15:49:20 +00:00
BUILDING Fix a typo 2019-05-08 14:03:57 +00:00
Makefile Enhance the support of LLVM sanitizers 2019-08-27 22:48:53 +00:00
Makefile.inc Re-add files that were accidentally deleted in my previous commit. 2018-05-02 07:34:44 +00:00
README.md Tidy up a bit. 2018-10-23 15:44:42 +00:00
UPDATING Add note for GCC 8 builds (see PR 54644) 2019-10-23 16:26:42 +00:00

NetBSD

NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.

Building

You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:

./build.sh -U -u -j4 -m amd64 -O ~/obj release

Additional build information available in the BUILDING file.

Binaries

Testing

On a running NetBSD system:

cd /usr/tests; atf-run | atf-report

Troubleshooting

Latest sources

To fetch the main CVS repository:

cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src

To work in the Git mirror, which is updated every few hours from CVS:

git clone https://github.com/NetBSD/src.git