255754 Commits

Author SHA1 Message Date
knakahara
0d3459cf8b fix "intrctl list" panic when ACPI is disabled.
reviewed by cherry@n.o and tested by msaitoh@n.o, thanks.
2018-01-04 01:01:59 +00:00
khorben
db8ce746e1 Fix off-by-one when calling snprintf(9) in hdafg_getdev()
This is actually harmless, since:
- the offset is too short rather than too long (no overflow)
- the struct audio_device comes from userland (no information leak)

"looks good to me" nat@
2018-01-04 00:09:12 +00:00
maxv
9b24abb72f style 2018-01-03 09:46:41 +00:00
maxv
085a67f389 simplify 2018-01-03 09:38:23 +00:00
maxv
c51e5bf395 Stop sharing the double-fault stack. It is embedded in .data, and we won't
want that in the future. This has always been wrong anyway, even if it is
unlikely that two CPUs will double fault at the same time.
2018-01-02 18:54:26 +00:00
maxv
0dfa4374f2 Use decimal numbering - hex is just misleading -, use ZTRAP_NJ for NMIs,
and declare intrspurious independently.
2018-01-02 18:41:14 +00:00
pgoyette
b0ab52e7b1 Now that watchdog support has been added, make sure that a modular driver
requires the sysmon_wdog module.
2018-01-02 00:47:14 +00:00
christos
9c08206436 PR/52887: HITOSHI Osada: wbsio needs sysmon_wdog. 2018-01-02 00:25:35 +00:00
christos
ff1a7c8cc8 Only FLUSH if we are ending libedit; DRAIN if we suspend for readline.
This allows pasting multiline buffers (Gerry Swislow)
2018-01-01 22:32:46 +00:00
christos
ccde5fbf0d remove this, it was just to compile-test the drivers. 2018-01-01 17:33:23 +00:00
skrll
68242f6396 Remove unnecessary #includE 2018-01-01 17:03:25 +00:00
christos
13c9c3f43b pass the lwp for the register calls. 2018-01-01 16:28:14 +00:00
christos
f7805b6647 Remove comment now that the getsockopt code passes the size. 2018-01-01 16:14:30 +00:00
jmcneill
c084cd00f4 Set and clear IFF_OACTIVE as necessary, and add support for queueing
multiple packets before performing a PKO doorbell write.
2018-01-01 13:25:22 +00:00
wiz
db390c267e Remove trailing comma from SYNOPSIS.
Try improving markup.
2018-01-01 12:46:49 +00:00
wiz
2f0bc98493 Use more markup. 2018-01-01 12:45:07 +00:00
maxv
de57d40f77 Remove MFREE. 2018-01-01 12:36:26 +00:00
maxv
ef672d88d0 Detect use-after-frees on mbufs with external storage, too. This is done
even when the refcount is > 1.

Again, this code is enabled by default, because it is fast and quite
useful.
2018-01-01 12:22:59 +00:00
maxv
2aa063ae41 Don't use macros, rather inline, much clearer.
For the record, I was partly mistaken in my previous commit: even though
the macros were local, the function names were still the ones of the real
callers.

However, setting the name in m_data was not a good thing; this was a
valid pointer, and the kernel could execute a long time before figuring
out the mbuf was already freed - therefore making debugging more difficult.
And information on the caller can be obtained via ddb anyway.
2018-01-01 12:09:56 +00:00
roy
140453bcff Note import of dhcpcd-7.0.0 2018-01-01 11:52:45 +00:00
roy
094d397286 Sync 2018-01-01 11:50:56 +00:00
roy
d92ae095f2 Import dhcpcd-7.0.0 with the following changes:
*  dhcp: when unicasting on L3, unicast on L2 as well
  *  dhcp: when rebooting, don't set cidaddr
  *  dhcp6: don't listen on IPv6 addresses when not using DHCPv6
  *  dhcp: only set probe state when probing (fixes REBOOT reason)
  *  ipv6: disable kernel RA if interface is active
  *  hooks: set protocol to link for link layer events
2018-01-01 11:48:51 +00:00
skrll
33ae4756b0 Need to map 512MB for some RPIs 2018-01-01 11:28:33 +00:00
jnemeth
6e0fe2c664 PR/52885 - Shinichi Doyashiki -- typo in comment 2018-01-01 08:33:28 +00:00
maxv
e8221aea54 Compile the prekern entry point only under KASLR. 2018-01-01 08:14:13 +00:00
maxv
98ae6a49f7 Use the default %cs, and mask the other segregs. 2018-01-01 08:03:43 +00:00
maya
f076331dd4 Build less of the test code if there's no linker ifunc support.
r1.6 changed the code in such a way that it was hitting a BFD assert on
MIPS, causing the builds to fail.

we were hitting the assert at binutils/dist/bfd/elfxx-mips.c:10879
2018-01-01 06:34:13 +00:00
jakllsch
a4d86e7ef5 Update for 2018 new year 2018-01-01 01:26:06 +00:00
christos
724f412f5b new sentence-new line 2018-01-01 01:02:11 +00:00
christos
645664bc7b 1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo
2018-01-01 00:51:36 +00:00
christos
fe1f2b747b make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)
2018-01-01 00:45:12 +00:00
christos
1a420d5882 pass valsize for getsockopt like we do for setsockopt 2017-12-31 19:39:57 +00:00
maxv
073afb1d6c Ah, finally found you. Fix two bugs in pmap_remap_largepages(), that
could cause KASLR kernels to crash early during the boot procedure.

pmap_remap_largepages assumes that the kernel is far from the end of
the VM space, but this assumption does not hold with KASLR, since the
kernel sections are allowed to reside in the very last page of the VM
space.

Doing +NBPD_L2 or roundup() in such cases caused an integer overflow,
which caused a page fault when touching &L2_BASE, which in turn caused
an immediate CPU reset and a reboot.

Took me a while to reproduce and debug this issue.
2017-12-31 15:41:05 +00:00
martin
c9526096cc PR port-alpha/52520: provide float64 -> uint64 conversion and use
that when converting positive numbers.
2017-12-31 11:43:42 +00:00
skrll
6745c449f0 Don't take the mutex in extent_print if EX_EARLY 2017-12-31 09:25:19 +00:00
maxv
30ec1abe9d Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.

It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.

Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.
2017-12-31 08:29:38 +00:00
maxv
4ee9da629f gc unused 2017-12-31 07:23:09 +00:00
dholland
9f8d4ee3ee Fix plurals. 2017-12-31 07:22:55 +00:00
maxv
e8bf64df9d Check MT_FREE by default, and not just under DEBUG (or DIAGNOSTIC). This
code is fast, with an nonexistent overhead - and we already take care of
setting MT_FREE, so why not check it.

In addition, stop registering the function name, that's not helpful since
the MBUFFREE macro is local. Instead, set m_data to NULL, so that any
access to a freed mbuf's data after mtod() or similar will page fault.

The combination of these two changes provides a fast and efficient way of
detecting use-after-frees in the network stack.
2017-12-31 06:57:12 +00:00
christos
10f8130dcb explain that a.out never shipped on x86_64 and put back compat_nomid 2017-12-31 03:38:06 +00:00
christos
262138d20e rename some "cmdline" stuff now that it is used to print environment too 2017-12-31 03:29:18 +00:00
christos
7eaaf56ed8 add trivial handling for DW_ATE_UTF, does not work. 2017-12-31 03:08:49 +00:00
christos
09f2d229ee factor out common code from Poul-Henning Kamp. 2017-12-31 03:04:44 +00:00
christos
878c60d1ba Add an environ node 2017-12-31 03:02:23 +00:00
jakllsch
20595f832f Enable Gigabit Ethernet on Nano Pi Neo Plus 2. 2017-12-31 00:53:29 +00:00
kre
13689a6c8a In addition to previous the which fixed a (harmless) MSAN detected ref
of uninit'd field also fix a couple more (still harmless) related
technical C usage bugs.

Explaining why these issues were harmless would take too long to include here.
2017-12-30 23:24:19 +00:00
gson
ea958a7e2f Use the default ATF timeout instead of a reduced one of 5 seconds,
which isn't enough for pmax under gxemul on babylon5.netbsd.org.
2017-12-30 22:02:34 +00:00
christos
d27db487e5 initialize just used and prev_job 2017-12-30 20:42:28 +00:00
martin
5e52dad13c Fix usage of sysarch(ALPHA_FPGETMASK) 2017-12-30 17:59:24 +00:00
martin
35cce3cf1f Double the nanosleep() time to make the test work more reliably on my
dual CPU alpha (where previously we sometimes ended up with no delay
at all).
2017-12-30 17:06:27 +00:00