Commit Graph

259574 Commits

Author SHA1 Message Date
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
jmcneill
2eda98bd15 Match generic arm,arm-v8 compatible string 2018-06-22 23:46:04 +00:00
christos
0461c2a5a3 Handle more Vortex CPU's from Andrius V.
While here refactor the code to make it smaller.
2018-06-22 23:00:54 +00:00
jdolecek
c8af0e8068 fix free() on unitialized value for list -c when there are no
assigned interrupts
2018-06-22 22:50:53 +00:00
christos
d91bf8b52c Explain the -Bstatic -Bdynamic dance. 2018-06-22 20:48:43 +00:00
christos
3306a1539a match our number of registers. 2018-06-22 19:41:40 +00:00
christos
60d5c279c7 use the right emulation 2018-06-22 19:41:16 +00:00
maya
c4e429fc54 Describe something for npf, npfd, blacklistd. 2018-06-22 19:35:25 +00:00
maya
288a6ec8cd Remove documentation references to rtsol. 2018-06-22 19:08:28 +00:00
roy
242d1b355d rtsol(8) and rtsold(8) have been long removed. 2018-06-22 18:23:59 +00:00
kre
b81009ce62 When processing character classes ([:xxx:] inside []), treat a class name
that is longer than we can handle the same way we treat an unknown
class name (as a valid char class which contains nothing, so never
matches).   Previously a "too long" class name invalidated the
class, so [:very-long-name:] would match any of  '[' ':' 'v'  ...
(note: "very-long-name" is not long enough to trigger this, but you
get the idea!)

However, the name itself has a restricted syntax ([[:***:]] is not a
character class, it is a match for one of a '[' ':' or '*', followed by
a ']') which we did not implement - check the syntax of the name before
treating it as a character class (but we do add '_' to alphanumerics
as legal class name characters).
2018-06-22 18:19:41 +00:00
christos
bb417bce75 - Fix groff reproducibility:
- specify mdoc and font paths
    - clear encoding
    - specify pagesize on the command line
XXX: pullup-8
2018-06-22 17:31:24 +00:00
christos
32fa9de216 Don't look in random (legacy) places for fonts. We want reproducible builds
to work.
XXX: pullup-8
2018-06-22 17:28:27 +00:00