Go to file
riastradh 31edf7b5b5 virtio(4): Fix sizing of virtqueue allocation.
vq->vq_avail[0].ring is a zero-length array, and thus sizeof is zero;
likewise vq->vq_used[0].ring.

Use vq->vq_avail[0].ring[0] and vq->vq_used[0].ring[0] to fix this
and restore the previous allocation sizing logic.

XXX We shouldn't use zero-length arrays here -- they are asking for
trouble like this, and C99 has a standard way to express what we're
actually trying to get at it, flexible array members.

PR kern/57304

Reported-by: syzbot+7fb1047f5dfa33b26331@syzkaller.appspotmail.com
2023-03-29 09:44:25 +00:00
bin Use "sigjmp_buf loc" after switch to sigsetjmp()/siglongjmp(). 2023-03-21 08:31:30 +00:00
common fix various typos in documentation, comments and sysctl device description. 2023-03-26 19:10:32 +00:00
compat fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
crypto cast to the correct message structure (rt_msghdr instead of if_msghdr) 2023-02-27 13:39:09 +00:00
dist/pf Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
distrib lint: warn about 'extern' declarations inside function bodies 2023-03-28 20:04:51 +00:00
doc fix various typos in documentation, comments and sysctl device description. 2023-03-26 19:10:32 +00:00
etc Handle missing auth file. 2023-02-18 07:51:52 +00:00
external Actually make the only changes that actually existed in the 2023b update... 2023-03-24 12:46:08 +00:00
games quiz: fix wrong usage of the <ctype.h> functions 2023-01-22 17:19:11 +00:00
include scandir(3) and alphasort(3) are part of POSIX-2008, so don't require 2022-12-28 11:51:21 +00:00
lib lint: warn about extern declarations outside headers 2023-03-28 14:44:34 +00:00
libexec Alignment. NFCI. 2023-02-10 08:12:48 +00:00
regress fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
rescue remove threads; size constraints and behavioral change 2022-05-16 14:55:56 +00:00
sbin Apply this commit from FreeBSD: 2023-03-27 22:53:37 +00:00
share +ALPN (application-layer protocol negotiation; a TLS extension) 2023-03-23 18:22:15 +00:00
sys virtio(4): Fix sizing of virtqueue allocation. 2023-03-29 09:44:25 +00:00
tests lint: warn about 'extern' declarations inside function bodies 2023-03-28 20:04:51 +00:00
tools remap arm directory names, the same way the source does. 2023-02-07 20:37:30 +00:00
usr.bin lint: warn about 'extern' declarations inside function bodies 2023-03-28 20:04:51 +00:00
usr.sbin fix various typos in documentation, comments and sysctl device description. 2023-03-26 19:10:32 +00:00
BUILDING fix documentation for MKLINT 2022-10-01 08:55:45 +00:00
Makefile Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC 2022-08-21 07:10:03 +00:00
Makefile.inc
README.md README: use https for man.NetBSD.org 2021-09-05 12:45:44 +00:00
UPDATING add a note about how to fix missing ./usr/lib/libisns* files. 2023-03-23 07:15:08 +00:00
build.sh Avoid the dependency on a populated tooldir (or building the tools) 2023-03-13 11:52:29 +00:00

README.md

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