Commit Graph

257605 Commits

Author SHA1 Message Date
macallan 037a72025f don't map more PCI space than needed, avoid overlap with snapper so this has
a chance of working on G5
2018-03-29 06:28:12 +00:00
snj 0dd5024cb4 remove lingering x11 (xfree86) entries. 2018-03-29 04:43:55 +00:00
snj 84c9079f95 remove rstart, which hasn't been used since the xfree86 days. 2018-03-29 04:19:54 +00:00
joerg d3991df102 Bump image to 1550MB to unbreak the LLVM build. 2018-03-28 22:38:47 +00:00
maxv 22cad5de7b The call to svs_lwp_switch can clobber %rdi/%rsi, so restore them before
calling speculation_barrier.
2018-03-28 19:56:40 +00:00
maxv 25792f64b1 oldlwp can be NULL, so ensure it isn't. 2018-03-28 19:50:57 +00:00
maxv aa88658bce Add 'break', otherwise we're not gonna go very far. While here use a less
error-prone syntax.
2018-03-28 19:47:54 +00:00
mrg 3e838582ee bump the NetBSD GCC version. both GCC 5 and 6 got x86 spectre
mitigation code, and both are now "nb2 20180327".
2018-03-28 19:30:41 +00:00
mrg 7032fd789a add the spectre mitigation options for x86:
-mindirect-branch=<choice>
  -mfunction-return=<choice>
  -mindirect-branch-register

the values for 'choice' are "keep" (default, existing behaviour),
"thunk", "thunk-inline", and "thunk-extern".

as taken from the Ubuntu port of these changes in their
ubuntu:gcc-5_5.5.0-8ubuntu1.diff.  i've also included the doc
updates that are missing from ubuntu from gcc itself.


i've tested both i386 and amd64 fairly heavily with these options
enabled in both kernels and userland, atf runs and hundreds of
package builds.

XXX: pullup-8 to gcc/ not gcc.old/
2018-03-28 19:24:52 +00:00
mrg 67e62e9db5 add the spectre mitigation options for x86:
-mindirect-branch=<choice>
  -mfunction-return=<choice>
  -mindirect-branch-register

the values for 'choice' are "keep" (default, existing behaviour),
"thunk", "thunk-inline", and "thunk-extern".

as taken from the Debian port of these changes in their
debian:gcc-6_6.3.0-18+deb9u1.diff.  i've also included the doc
updates that are missing from debian from gcc itself.


i've tested both i386 and amd64 fairly heavily with these options
enabled in both kernels and userland, atf runs and hundreds of
package builds.
2018-03-28 19:22:32 +00:00
maya 94f4c3acd8 Leave TS and RE alone for the benefit of emips, which failed
to boot even earlier after locore.S:1.211.

Do this unconditionally to avoid introducing more ifdefs.
Also tested on ci20 and erlite.
2018-03-28 17:56:52 +00:00
maxv 0223f0c872 Add the IBRS mitigation for SpectreV2 on amd64.
Different operations are performed during context transitions:

	user->kernel: IBRS <- 1
	kernel->user: IBRS <- 0

And during context switches:

	user->user:   IBPB <- 0
	kernel->user: IBPB <- 0
	[user->kernel:IBPB <- 0 this one may not be needed]

We use two macros, IBRS_ENTER and IBRS_LEAVE, to set the IBRS bit. The
thing is hotpatched for better performance, like SVS.

The idea is that IBRS is a "privileged" bit, which is set to 1 in kernel
mode and 0 in user mode. To protect the branch predictor between user
processes (which are of the same privilege), we use the IBPB barrier.

The Intel manual also talks about (MWAIT/HLT)+HyperThreading, and says
that when using either of the two instructions IBRS must be disabled for
better performance on the core. I'm not totally sure about this part, so
I'm not adding it now.

IBRS is available only when the Intel microcode update is applied. The
mitigation must be enabled manually with machdep.spectreV2.mitigated.

Tested by msaitoh a week ago (but I adapted a few things since). Probably
more changes to come.
2018-03-28 16:02:49 +00:00
macallan b1146198e9 be less spammy on i2c errors 2018-03-28 15:34:29 +00:00
macallan 805ab46b90 set WSSCREEN_RESIZE 2018-03-28 15:33:44 +00:00
maxv a8a39a2c27 Move the SpectreV2 mitigation code into a dedicated spectre.c file. The
content of the file is taken from the end of cpu.c, and is copied as-is.
2018-03-28 14:56:59 +00:00
maxv 4cd157e529 Several changes in syn_cache_respond:
* Replace idiotic diagnostic check by KASSERT. max_linkhdr+tlen<=MCLBYTES
   is a widespread assumption.

 * Improve initialization of 'tp'.

 * Put panics in dead branches.

 * Merge two switches.
2018-03-28 14:43:55 +00:00
maxv 9af44f3aed Remove unused variable. 2018-03-28 14:30:42 +00:00
maxv e6c01db74a Remove two unused args from syn_cache_get(). 2018-03-28 14:22:16 +00:00
maxv 0ab063bc85 Dedup: introduce tcp_urp_drop() and use it. 2018-03-28 14:16:59 +00:00
maxv af72517814 Minor changes: style, improve comments (and put them at the correct place),
use NULL for pointers, and add {}s to prevent confusion.
2018-03-28 13:50:14 +00:00
nonaka 68b0b1ed57 Correctly mark the last El Torito section header.
Pointed out by Benno Rice via DM.
2018-03-28 06:48:55 +00:00
joerg 4f6482b106 When trying to decide the status of a weak symbol, resolve any
indirectness first. In the case of various Qt5 libraries, __bss_start
ends up with a Qt5 version, but it has to be resolved first to match the
actual (implicit) definition. This fixes the root cause of pkg/53089.
2018-03-27 23:39:23 +00:00
joerg 9fdc611c5c Mark all files dead that should never have been imported. 2018-03-27 23:11:25 +00:00
sevan 456aa9858b Import regenerated catalog file 2018-03-27 22:51:43 +00:00
sevan 22cc783087 Import regenerated catalog files 2018-03-27 22:47:00 +00:00
nonaka c4b5d3036e efiboot: Added serial console support. 2018-03-27 14:15:05 +00:00
martin 4e1ffbe979 Add missing alias for ldexpl on ! __HAVE_LONG_DOUBLE architectures.
Pointed out by Hal Murray on port-arm.
2018-03-27 11:59:49 +00:00
roy 9e6815ae57 Note import of dhcpcd-7.0.2 2018-03-27 06:34:25 +00:00
roy 2072b910b9 Add support for setproctitle(3) 2018-03-27 06:18:40 +00:00
roy adc6b41097 Sync 2018-03-27 06:16:34 +00:00
roy ac9a05d6dd Import dhcpcd-7.0.2 with the following changes:
*  Added support for setproctitle(3)
  *  Kernel RA is no longer disabled when IPv6 is disabled in dhcpcd
  *  DHCPv6 PD is no longer stopped if no Routers are found
  *  If the DHCP leased address is deleted, enter the reboot state
  *  DHCPv6 unicast is no longer performed when not in master mode
  *  dhcpcd will now detect netlink/route socket overflows ad re-sync
2018-03-27 06:14:39 +00:00
jdolecek af45d25bfb mark ubc_winshift and ubc_winsize as __read_mostly, they are used often
so might benefit from cache placement
2018-03-26 21:43:30 +00:00
jdc 88580d2895 Note that EDID is only read on series 2 and 3 cards. 2018-03-26 10:54:31 +00:00
jdc 6492be2a4e Correct a typo in the openprom variable name. 2018-03-26 10:31:10 +00:00
roy 64785daad7 Handle errors better.
Fix test for checking we sent all the data we asked to.
2018-03-26 09:11:15 +00:00
msaitoh e9bdacfb21 - Add link related softint's counter.
- Fix indent.
2018-03-26 06:40:28 +00:00
msaitoh 4e0cda520b Regen. 2018-03-26 02:57:09 +00:00
msaitoh a8eac2f725 Add two VIA xHCI devices from OpenBSD. 2018-03-26 02:56:45 +00:00
knakahara 5dd5690af1 Fix "intrctl list" causes panic while attaching MSI/MSI-X devices.
When there are devices which is already pci_intr_alloc'ed, however is not
established yet, "intrctl list" causes panic. E.g.
    # while true; do intrctl list > /dev/null ; done&
    # drvctl -d ixg0 && drvctl -r pci0

And add some KASSERTMSG to similar but not the same code.

Pointed out by msaitoh@n.o.

XXX pullup-8
2018-03-26 02:30:08 +00:00
joerg 033ffc4d89 Don't skip PLT processing for the main binary. It can still contain
ifunc references.
2018-03-25 18:56:01 +00:00
ryoon f2ea52e7c6 Add extra newline for normal message from uts(4) 2018-03-25 09:34:02 +00:00
ragge f66127f0f0 Fix cpu type printout error. 2018-03-25 08:13:20 +00:00
sevan b20b630e2b Import pkg_install-20180325. 2018-03-25 04:04:36 +00:00
nakayama 6ebbd813f6 Follow the ioctl arg changes of RAIDFRAME_GET_COMPONENT_LABEL and
RAIDFRAME_CHECK_*_STATUS_EXT.

This should fix strange raidctl -s outputs reported in
current-users ML.
2018-03-24 19:41:35 +00:00
jdolecek a7910e25b4 use isa_intr_establish_xname() 2018-03-24 18:34:43 +00:00
jdolecek f0dbcfd378 use pci_intr_establish_xname() 2018-03-24 18:32:13 +00:00
macallan bea393bbca don't poke GPIOs directly, use obio_*() access functions, now this
has a chance of working on G5 where we can't just BAT-map everything with
paddr == busaddr.
Doesn't play audio yet but things like headphone detection work.
2018-03-24 16:22:48 +00:00
roy 8a9420adee Allow a valid sendto .... duh 2018-03-24 15:51:57 +00:00
mlelstv 76e339c2fc Use separate lock to protect internal state and release locks when
calling biodone.
2018-03-24 08:08:19 +00:00
kre 66b36a0ae7 Make this more automated - no longer requires editing the
script before use.   Also update to reflect a few changes
to procedures that have occurred here and there in the past.
2018-03-24 01:54:48 +00:00