Commit Graph

259586 Commits

Author SHA1 Message Date
dholland
bc382992a0 Describe what this actually does. Bump date. 2018-06-25 01:21:21 +00:00
christos
f0907ab569 Fix the rest of the functions that have been made visible by xopen5,
posix 2017, and c99.
2018-06-24 23:55:29 +00:00
christos
9dd3d50e00 PR/53393: coypu: move rint to the right section. 2018-06-24 22:07:46 +00:00
kamil
7d11bff33f Enhance the documentation of MKSANITIZER in bsd.README
Note that the list of sanitizer features is just a selection, not a
complete list. Include there LSan and Scudo. Missing: hwmsan, esan,
ubsan_minimal etc.

Explain that USE_SANITIZER is an argument passed to -fsanitize= and it can
contain multiple options.

Mention SANITIZERFLAGS to pass even more sanitizer arguments.

Stop tracking in this file what compiler compiles what features. Just note
that the selection of supported features depends on a compiler version and
target CPU architecture.
2018-06-24 20:40:58 +00:00
jdolecek
8c3f655828 mark with XXXSMP all remaining spl*() and tsleep() calls 2018-06-24 20:28:57 +00:00
jdolecek
555482fa99 similar treatment as xennetback_xenbus.c:
- protect instance list with mutex
- mark more local variables static
- mark with XXXSMP what looks suspicious
- in pciback.c use kmem_zalloc() et.al to allocate the device structures
2018-06-24 20:15:00 +00:00
jdolecek
464130e376 fix panic of DOM0 in xennetback_xenbus_destroy() on xl destroy of
DOMU with created, but non CONNECTED xennet (such as when DOMU
panics during boot); only try to disestablish the intr if it was
actually setup

while here protect xnetback_instances with mutex, and switch to use
kmem_zalloc() + KM_SLEEP / kmem_free() like xbdback_xenbus.c; add XXXSMP
to the other global variables, and at least mark them static
2018-06-24 19:53:50 +00:00
christos
fe2acef404 Revert previous, fix iteration loops to be consistent:
All sets that have an id >= SET_LAST have NULL name, so use that like the
loop just below.
2018-06-24 19:53:35 +00:00
sevan
9e7e3cac9b typo 2018-06-24 19:48:46 +00:00
sevan
421010cd47 Add GDI, NeWS, PRAM, PS, RIP, WDM, WDDM 2018-06-24 19:47:20 +00:00
kamil
07c0d23991 Reset SANITIZERFLAGS when specified NOSANITIZER / MKSANITIZER=no
This allows passing additional sanitizer specifig flags from the ./build.sh
level, like: -V SANITIZERFLAGS="-fsanitize-memory-track-origins" for MSan.
2018-06-24 19:35:12 +00:00
kamil
ff37330f94 Fix typo in previous
The -Wno-format-extra-args argument to Clang/LLVM needs trailing 's'.

Noted by <joerg>
2018-06-24 19:27:26 +00:00
ryo
255e8f796a fixed a case of gtmr_cntvct_stable_read() is returning the same value as before. 2018-06-24 19:04:30 +00:00
maxv
2bb1a63369 Sync the ld scripts:
* Force a PAGE_SIZE alignment of .bss on i386. Normally that's not
   required since the bootloader ensures page alignment, but let's be
   safe. Same on Xen-i386.

 * Fill the .text section padding with int3 instructions on Xen kernels,
   to prevent FALLTHROUGHs if a pointer goes crazy, same as native.
2018-06-24 18:24:53 +00:00
jdolecek
6127cb3089 follow change in rev. 1.22 of kern.ldscript and apply same fix for xen
ldscript too, but using just regular PAGE_ALIGN alignment:

"""
Fix a pretty dumb mistake I made in r1.22: the alignment needs to be in the
bss, otherwise the bootloader will use memory before __kernel_end and give
a wrong start pa to the kernel.
"""

this got broke by amd64/locore.S rev. 1.141 which removed an unused variable
which forced the alignment

this fixes ps/bt in ddb to be able to find symbols and hence PR port-xen/53056
2018-06-24 17:11:57 +00:00
christos
9c2395c2ef Since now we are called from cleanup_exit() make sure that we have a state
to work with. Found by ASAN.
2018-06-24 15:36:31 +00:00
jdolecek
f216ec15d7 add support for kern.intr.list aka intrctl(8) 'list' for xen
event_set_handler() and pirq_establish() now have extra intrname
parameter; shared intr_create_intrid() is used to provide the value

xen drivers were changed to pass the specific driver instance
name as the xname, e.g.  'vcpu0 clock' instead just 'clock', or
'xencons0' instead of 'xencons'

associated evcnt is now changed to use intrname - this matches native x86
2018-06-24 13:35:32 +00:00
mrg
240adcf578 fix the previous. the code was right, just badly formatted before.
should fix infinite loops reported in some cases.
2018-06-24 12:55:36 +00:00
jdolecek
dd26fc5ed7 use isa_intr_establish_xname() so this passes the device name 2018-06-24 12:25:33 +00:00
kamil
e111561b93 Prevent signed integer left shift UB in FD_SET(), FD_CLR(), FD_ISSET()
Set the type of shifted integer 1 to unsigned int.

Detected with MKSANITIZER/UBSan in sysinst(8).
2018-06-24 12:05:40 +00:00
jdolecek
081e12698b provide pci_intr_establish_xname() on x86 independantly from MSI,
so it's available on XEN too; change also the stub to use weak
symbol instead #ifdef
2018-06-24 11:51:15 +00:00
leot
a04d8edaee Fix a typo 2018-06-24 09:38:45 +00:00
kamil
171790efcf Fix stack use after scope in libutil/pty
The pt variable's elements are used after the end of the pt scope.
A move of pt to outer scope fixes this.

Detected with MKSANITIZER/ASan with tmux(1), a forkpty(3) user.
2018-06-24 09:30:26 +00:00
martin
9fa6cbad23 Document debug sets and kernel module directory. 2018-06-24 09:17:58 +00:00
kamil
b2b644497e Prevent underflow buffer read in trim_whitespace() in libutil/passwd.c
If a string is empty or contains only white characters, the algorithm of
removal of white characters at the end of the passed string will read
buffer at index -1 and keep iterating backward.

Detected with MKSANITIZER/ASan when executing passwd(1).
2018-06-24 01:53:14 +00:00
kamil
ed22e03d7d Enlarge the set_status[] array by a single element
In the get_and_unpack_sets() function there is accessed the
set_status[SET_GROUP_END] element in the array. The array is allocated on
the stack with SET_GROUP_END elements. This means that it is 1 element too
short.

This has been reported with MKSANITIZER=yes with Address Sanitizer.
2018-06-23 22:35:29 +00:00
kamil
64bc8aa106 Specify -Wno-format-extra-args for Clang/LLVM in gpl2/gettext
This is needed with Clang v. 7svn (HEAD) 2018-06-23 snapshot.
2018-06-23 20:15:23 +00:00
sevan
dd442d50f4 Add MDC, MDI, MDI-X, MDIO 2018-06-23 19:40:59 +00:00
snj
f7010c71e1 remove core list, portmaster list, releng list, and developer list.
...as proposed several times in several places back in 2009/2010.

this info can all be found on the website (where it's more accurate) and
has no place in a document describing the installation of netbsd.
2018-06-23 17:46:00 +00:00
jakllsch
81948059ff Disable all contemporary mode 1 quirks. 2018-06-23 16:09:53 +00:00
jakllsch
16b7bb25ad If mode 1 enable check fails, give mode 1 a second chance by trying to
use it to locate a PCI Host Bridge or device from vendor that produced
a chipset lacking a Host Bridge class device.

Should allow us to remove most all the mode 1 quirks added in the last
two decades.
2018-06-23 16:05:05 +00:00
jdolecek
5ebfdbc062 make compile without DDB
PR port-xen/50282
2018-06-23 15:53:14 +00:00
sevan
0969941113 The s in AST is system.
Add RC and common use of IPL, previous entry was from the world of s/360
2018-06-23 15:00:22 +00:00
jakllsch
b853854c44 add a kobj_error() to a recently added error case 2018-06-23 14:22:30 +00:00
kamil
49b4c5f864 Fix integer overflow in installboot(8)
Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.
2018-06-23 14:15:57 +00:00
jakllsch
80a3fb5363 Add acpiecdt* at acpi?. 2018-06-23 14:14:42 +00:00
jdolecek
adfdc752f1 remove the xen XSAVE entry, needs more work before it can be enabled 2018-06-23 11:54:06 +00:00
jdolecek
5dfdf5bea8 fix intrctl_io_firstline() to properly return NULL if there are no records
to show
2018-06-23 11:11:00 +00:00
jdolecek
908b4d8725 re-do the XEN XSAVE support, this time to leave all probe code in
cpu_probe_fpu(), and have XEN cpu_init() just act

the xen probe is now guarded by XEN_USE_XSAVE option and XSAVE
support is thus still disabled by default (same as before), so it
wouldn't interfere with maxv's eager fpu rototil, while still
allowing testing for others

PR kern/50332
2018-06-23 10:30:22 +00:00
maxv
7f824e92ac Add XXX in fpuinit_mxcsr_mask. 2018-06-23 10:06:02 +00:00
maxv
921b2a6c45 Reorder the code a little. On Xen, return earlier, we don't need to do
the XSAVE-related initialization if we don't support XSAVE.
2018-06-23 10:02:39 +00:00
maxv
5f77c369ae Revert the rest of jdolecek's changes. This puts us back in a clean,
sensical state.
2018-06-23 09:51:34 +00:00
gson
4828bdca7d No semicolon after macro do ... while (0) wrapper. 2018-06-23 07:21:00 +00:00
maxv
6655fcaaf5 constify 2018-06-23 06:57:24 +00:00
maxv
a7dd46e24f constify 2018-06-23 06:40:43 +00:00
christos
d2ef544d72 Add some debugging in case someone else wants to debug gdb... 2018-06-23 03:32:48 +00:00
nat
fdbb1a553d Add all encoding supported by the mixer.
Addresses PR kern/52585.
2018-06-23 03:18:49 +00:00
christos
18b55cf995 Fix thread debugging. 2018-06-23 03:15:55 +00:00
jakllsch
884be20bcc locore.S is a MD_SFILES.
This keeps the dependency handling in the loop, so rebuilds after
changing options, say EARLYCONS, don't fail.
2018-06-23 01:51:03 +00:00
maya
4a24ae9634 Remove commented out MATH_EMULATE from kernel configs that got it
by copying an older i386 config.
2018-06-23 01:23:27 +00:00