Commit Graph

139927 Commits

Author SHA1 Message Date
maxv 02dd989063 Fix inverted arguments in m_gethdr(). 2018-04-26 19:33:02 +00:00
maxv 3c78537229 Fix inverted arguments in MGET(). 2018-04-26 19:27:04 +00:00
maxv de9cefcf44 Remove unused mbuf argument from sbsavetimestamp. 2018-04-26 19:22:17 +00:00
maxv a3e322b567 Change MCLGET, so that it calls m_clget instead of doing the work in a
macro. Macros are inefficient when they contain too many instructions and
are used too often, because of cache coherency (and also register use).

This change saves 32KB of kernel .text.
2018-04-26 19:13:34 +00:00
alnsn 6ae79384f8 Add KAUTH_MACHDEP_SVS_DISABLE and add support to secmodel_securelevel(9).
Disabling SVS is denied at securelevel 1 and above.
2018-04-26 18:54:09 +00:00
macallan 416a4792c2 bump message buffer size 2018-04-26 18:33:02 +00:00
scole 098fbe0974 Update some of the _UC_MACHINE* macros even though gregs[] aren't tied to anything yet 2018-04-26 18:06:25 +00:00
maxv ce89a5e39f Rename
m_copyback0 -> m_copyback_internal
	M_COPYBACK0_* -> CB_*

That's a lot less misleading. While here, fix a bunch of panic messages.
2018-04-26 08:31:36 +00:00
maxv af1cee9c55 Stop adding '0's in parameter and function names, that's just misleading.
Some remain, they need more investigation.
2018-04-26 08:13:30 +00:00
roy e3e276e2f2 Test for valid interface for ioctls that demand it.
Thanks to Robert Swindells for the patch.
2018-04-26 08:11:18 +00:00
maxv a2f5e53a1f Change comment, to clearly say that m_prepend should not be used directly. 2018-04-26 07:46:24 +00:00
maxv e64bc0451a Use M_UNWRITABLE, no functional change. 2018-04-26 07:28:21 +00:00
maxv 1cf079b88f Move the address checks into one function, ip6_badaddr(). In this function,
reinstate the "IPv4-compatible IPv6 addresses" check; these addresses are
deprecated by RFC4291 (2006).
2018-04-26 07:01:38 +00:00
ragge 1cb48e477a Enable CPU_IN_CKSUM. 2018-04-25 11:12:55 +00:00
ragge 09fcb8c02e Add cpu_in_cksum.S. 2018-04-25 11:08:21 +00:00
ragge 6c80cbc78d VAX version of cpu_in_checksum(). Increases network performance significantly. 2018-04-25 11:06:49 +00:00
ragge 9e14291720 Extract M_DATA, M_LEN, M_NEXT. 2018-04-25 09:28:42 +00:00
ragge 9b168bab66 Add __KERNEL_RCSID() macro. 2018-04-25 09:23:00 +00:00
msaitoh d1f63c06dc Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

 One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

 Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

 I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
2018-04-25 08:46:19 +00:00
yamaguchi bb9c38f4bf Use spin mutex to fix a panic
The GPIO part of wbsio(4) has a lock to keep the register access
order. In addition to the lock, gpio(4) has a look to prevent
multiple control through gpio_pin_ctl(). Those locks hold at
once when gpio_pin_ctl() is called, and the lock of gpio(4) hold
before that of wbsio(4).

Therefore, the wbsio(4) has to use spin lock if gpio(4) uses
spin lock.
2018-04-25 08:29:45 +00:00
ozaki-r 9a87af0fbd Fix a deadlock (rt_free vs. route_intr on rt_so_mtx)
It occurs only if NET_MPSAFE is enabled.
2018-04-25 03:49:57 +00:00
ozaki-r 144c8d0724 Remove a unnecessary wrong cast (fix build of ALL) 2018-04-25 03:45:21 +00:00
kamil b66fa58d9d Remove unused code branch in the signal code
Remove the ppsig argument from proc_stop_done() and from sigswitch().

This functionality was used in now gone filesystem tracing feature (/proc).
It prevented emitting signal child signals to a debugging program, namely
with the SIGCHLD signal.

The modern solution to perform tracing without signals in a debugger is
to spawn a debugging server and outsource the tracing functionality to it.
This is done in software like gdb-server, lldb-server etc.

No functional change intended.

Sponsored by <The NetBSD Foundation>
2018-04-24 18:34:46 +00:00
maya ddb8613d0a rtsx(4): Add support for RT525A, from openbsd.
ok rkujawa
2018-04-24 18:34:30 +00:00
maya a0726d2ee5 regen 2018-04-24 18:10:32 +00:00
maya 0cdc8d3cf3 add realtek RT525A PCI-E card reader
found in my Dell XPS 15 9550.
2018-04-24 18:08:56 +00:00
jakllsch 0e522444a9 In uvm_page_recolor(), kmem_free() old size rather than new size.
From Yaniv Abraham-Rabinovitch in PR kern/53208.
2018-04-24 16:35:53 +00:00
maxv 906d782918 Remove nullcheck, m is not allowed to be null. 2018-04-24 08:22:16 +00:00
maxv da0a3b88c3 Change/Improve the comments, so that the definitions fit one line. 2018-04-24 08:10:32 +00:00
maxv 3e02f4fab8 Remove the M_AUTHIPDGM flag. It is equivalent to M_AUTHIPHDR, both
are set in IPsec-AH, and they are always handled together.
2018-04-24 08:07:05 +00:00
maxv b5d4b113f7 Add code 3 of paramprob, part of RFC7112: "IPv6 First Fragment has
incomplete IPv6 Header Chain". Handle this code in ping6.
2018-04-24 07:22:32 +00:00
knakahara 30b0741c40 Fix sys/netinet/in.c:r1.229 problem. I have missed FALLTHROUGH, sorry. 2018-04-24 01:32:30 +00:00
joerg 5bd6bf38e4 Adjust Xsyscall_svs to not use movq for 64bit immediates either. 2018-04-23 22:53:04 +00:00
jdolecek 0adb3c0bc1 enable code to only trigger usb processing when EINT is set, to
avoid misinterpreting shared interrupt for another device

when clearing USBSTS, actually preserve the bits which spec requires to
preserve, and actually clear bit 1, which should be actually always
cleared to zero by spec

also #ifdef XHCI_DEBUG some unnecessary register reads

this should finally resolve PR kern/53066 also for Martin
2018-04-23 19:55:00 +00:00
christos ce1a532448 PR/kern/53202: Kernel hangs running t_ptrace_wait:resume1 test, revert
previous.
2018-04-23 15:51:00 +00:00
christos 2370736b4d PR/53206: David Binderman: fix array bounds comparison in KASSERT. 2018-04-23 15:40:33 +00:00
christos b83c46adf8 PR/53207: David Binderman: Use logical and 2018-04-23 15:36:30 +00:00
maxv 64956f36ba Remove the kernel RH0 code. RH0 is deprecated by RFC5095, for security
reasons. RH0 was already removed in the kernel's input path, but some
parts were still present in the output path: they are now removed.

Sent on tech-net@ a few days ago.
2018-04-23 07:22:54 +00:00
msaitoh 6b2bbe1c2b - Backout if_wm.c rev.1.574 and print "device timeout (lost interrupt)"
when all descriptors in a queue are free. When all descriptors are free after
 wm_txeof(), it's caused by lost interrupt (though I've never seen it). One
 possibility is chip bug and another possibility is software bug. We should
 reset in any cases. If we don't reset and don't print error message, TX
 processing is done intermittently and user might not noticed the problem.

- Rename txq_watchdog to txq_sending to make the meaning clear.
2018-04-23 01:35:25 +00:00
msaitoh d783b83a14 Count timeout correctly. This change reduce timeout value for 80003 as
expected. Reported by mouse@.
2018-04-23 01:29:23 +00:00
christos abc532f391 merge duplicated code, back to logging error. 2018-04-22 20:32:27 +00:00
maxv 48c5ec192c Rename ipip_allow->ipip_spoofcheck, and add net.inet.ipsec.ipip_spoofcheck.
Makes it simpler, and also fixes PR/39919.
2018-04-22 10:25:40 +00:00
jdolecek 3996bedd21 trigger the softint processing on that child bus which is not detached yet
fixes PR kern/53066 by Martin Husemann
2018-04-22 07:47:14 +00:00
joerg ad8ea1d746 Do not use movq for loading arbitrary 64bit immediates. The ISA
restricts it to 32bit immediates.
2018-04-21 23:25:01 +00:00
christos d8a004726c downgrade error to debug. 2018-04-21 18:07:23 +00:00
jdolecek 1c4f101001 add KASSERT() that sc_child* is set to NULL after child detach; just for
readability, it's not immediatelly obvious this is done in xhci_childdet()

no functional changes
2018-04-21 15:53:24 +00:00
mlelstv f3a7ac8991 Fix an ancient typo, instead of setting the base address, the size
value is written leaving the autoconf setting (-1) as the address.
The value is only used for printing an attach message, the actual
pcdisplay_init code uses hard coded base addresses again.
2018-04-21 15:10:28 +00:00
maxv 2b3801633e Remove #ifndef __vax__.
The check enforces a 4-byte-aligned size for the option mbuf. If the size
is not multiple of 4, the computation of ip_hl gets truncated in the
output path. There is no reason for this check not to be present on VAX.

While here add a KASSERT in ip_insertoptions to enforce the assumption.

Discussed briefly on tech-net@
2018-04-21 13:22:06 +00:00
rin 2cb2455506 Remove unused variable since previous revision. 2018-04-21 08:30:19 +00:00
christos 0693e96ee0 It was not gcc's fault for correctly detecting an uninitialized variable.
Fix the uninitialized variable issues by error checking things.
2018-04-20 21:03:00 +00:00