Commit Graph

258184 Commits

Author SHA1 Message Date
maxv
3f23c9efec Move m_align and m_append into iee80211_netbsd.c. They are part of
net80211, and shouldn't be used outside.
2018-04-27 06:56:21 +00:00
ragge
31c431270b Remove the old unneccessary cksum files. 2018-04-27 06:36:32 +00:00
maxv
b68c1786cf Simplify m_copydata, use unsigned int, and change its last argument to
match that of the man page.
2018-04-27 06:36:16 +00:00
maxv
4814d4311b Style and simplify. 2018-04-27 06:27:36 +00:00
ryo
06fef18adc define __HAVE_ATOMIC64_OPS
pointed out by nonaka@, thanks
2018-04-27 06:23:34 +00:00
maxv
85bdc711fa Panic in m_copypacket if no header is present, that's a requirement. 2018-04-27 06:15:49 +00:00
maxv
04ce492590 Improve the documentation of m_copypacket(), to say explicitly that a
header must be present, contrary to m_copym().

While here fix a variable name (from yesterday).
2018-04-27 06:06:43 +00:00
knakahara
f6621122fb Fix "how" argument of MGET(). Pointed out by maxv@n.o, thanks.
MGET() does not have M_ZERO flag, so add memset when it is required.
2018-04-27 00:06:40 +00:00
maxv
2679f01cd0 Hum. This should be M_READONLY, not M_ROMAP.
M_ROMAP tells us whether the mbuf storage is mapped on a read-only page.
But an mbuf can still be read-only in the sense that the storage is
shared with other mbufs.
2018-04-26 20:10:44 +00:00
maxv
ecb801f971 m_copy -> m_copym 2018-04-26 19:56:55 +00:00
maxv
eee3723d53 Stop using m_copy(), use m_copym() directly. m_copy is useless,
undocumented and confusing.
2018-04-26 19:50:09 +00:00
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
8fa5a65e9e Add SVS. It may not be disabled at securelevel 1 and above. 2018-04-26 18:56:18 +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
scole
c4c8c26cd0 Rename "cpu_switch" to "cpu_switchto" 2018-04-26 14:59:11 +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
aaf2c2df36 Remove m_prepend from the man page, it's a helper, and is not supposed to
be part of the API.
2018-04-26 07:48:21 +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
maxv
8ad8ab65b1 Remove ping6_opts_hops, "-g" does not exist anymore (RH0 removed). 2018-04-26 06:23:33 +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
christos
c063173b65 PR/53209: David Shao: lang/llvm BFD (NetBSD Binutils nb1) 2.30 assertion fail elflink.c:2824
switch x86 back to old binutils until it is fixed.
(also non pie binaries have broken relocs)
2018-04-24 23:29:13 +00:00
maya
b9af5002bd Denote RTS525A, bump date 2018-04-24 18:35:56 +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
roy
f8583dbb8c Back out part of the prior commit where we added space for IPV6_HOPLIMIT
to the sending control message buffer.
That code never worked on ERLITE, so I elected to set socket options
instead but forgot to revert this part.
2018-04-24 18:31:48 +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
maxv
519a11ad08 Remove annoying (void) casts. 2018-04-24 07:12:04 +00:00