258041 Commits

Author SHA1 Message Date
mlelstv
929f587429 Make sys/pmf.h available to userland (again).
The recently exposed device.h internals to _KMEMUSER also require
exposing details about pmf.

The current build works without this as the only user is crash(8)
which partially uses kernel sources and is compiled with the
additional kernel include path.
2018-04-18 08:58:41 +00:00
knakahara
a6a926ede8 Fix sending PADT to unexpected hosts when net.pppoe.term_unknown is enabled. 2018-04-18 07:40:40 +00:00
maxv
e294edec3f Remove unused malloc.h include. 2018-04-18 07:38:02 +00:00
knakahara
d0a346b782 net.pppoe.term_unknown can be written safely now. 2018-04-18 07:36:26 +00:00
maxv
66077ec001 Style, and remove unused MALLOC_DECLARE. 2018-04-18 07:32:44 +00:00
maxv
e62bbe6865 Remove unused netipsec/xform.h includes. 2018-04-18 07:17:49 +00:00
maxv
4fbb7668fe Remove dead code.
ok ozaki-r@
2018-04-18 06:57:39 +00:00
maxv
1e45b2f110 style 2018-04-18 06:43:10 +00:00
ozaki-r
f811c85e06 Add missing PSLIST_ENTRY_INIT and PSLIST_ENTRY_DESTROY 2018-04-18 06:37:17 +00:00
maxv
c667608838 Style, and remove another misleading comment. 2018-04-18 06:22:47 +00:00
maxv
1da467ec29 Remove misleading comments. 2018-04-18 06:17:43 +00:00
maxv
7f6566cd4e Remove the
net.inet6.esp6
	net.inet6.ipcomp6
	net.inet6.ah6

subtrees. They are aliases to net.inet6.ipsec6, but they are not
consistent with the original intended naming. (eg there was
net.inet6.esp6.esp_trans_deflev instead of net.inet6.esp6.trans_deflev).
2018-04-18 06:13:23 +00:00
ozaki-r
ca1f3d844f Get rid of a unnecessary semicolon
Pointed out by kamil@
2018-04-18 06:04:03 +00:00
maxv
1a0e0fc19a Remove duplicate sysctls:
net.inet.esp.trans_deflev = net.inet.ipsec.esp_trans_deflev
	net.inet.esp.net_deflev   = net.inet.ipsec.esp_net_deflev
	net.inet.ah.cleartos      = net.inet.ipsec.ah_cleartos
	net.inet.ah.offsetmask    = net.inet.ipsec.ah_offsetmask
	net.inet.ah.trans_deflev  = net.inet.ipsec.ah_trans_deflev
	net.inet.ah.net_deflev    = net.inet.ipsec.ah_net_deflev

Use the convention on the right. Discussed a month ago on tech-net@.
2018-04-18 06:03:36 +00:00
martin
ac1539438e Cosmetics: default to dmesg -t when writing /var/run/dmesg.boot -
the timestamps at boot time are mostly useless.
2018-04-18 04:27:47 +00:00
ozaki-r
0be59150b6 Add a test that checks if brconfig flush surely removes all entries 2018-04-18 04:03:12 +00:00
ozaki-r
7a003d614d bridge: use pslist(9) for rtlist and rthash
The change fixes race conditions on list operations.  One example is that a
reader may see invalid pointers on a looking item in a list due to lack of
membar_producer.
2018-04-18 04:01:58 +00:00
ozaki-r
5cf068d7e4 Simplify bridge_rtnode_insert (NFC) 2018-04-18 03:49:44 +00:00
ozaki-r
adc61740ae Remove obsolete NULL checks 2018-04-18 03:47:28 +00:00
christos
f6f2143a7d __noreturn__ does in the header. 2018-04-18 01:18:16 +00:00
christos
0d11799cf0 add __noreturn__ attribute to file_err{,x} 2018-04-18 01:17:42 +00:00
maxv
3233810064 fix comments 2018-04-17 17:56:08 +00:00
maxv
55d4a29846 Add XXX. If this code really does something, it should use MCHTYPE. 2018-04-17 17:47:05 +00:00
maxv
25be83d544 Style, add XXX (about the mtu that goes negative), and remove #ifdef inet. 2018-04-17 17:40:38 +00:00
nonaka
605c860b16 nvmectl(8): fix wdc command usage. 2018-04-17 15:31:00 +00:00
christos
169d9d570d CVE-2018-0737: Set constant time for rsa computation:
https://www.openssl.org/news/vulnerabilities.html
This needs to be pulled up to -8 using:
    349a41da1a
2018-04-17 14:48:48 +00:00
jakllsch
cbdb990355 sprinkle #ifdef __dead \n __dead \n #endif for clang 2018-04-17 12:34:04 +00:00
maya
43018fddb4 Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.
2018-04-17 10:08:54 +00:00
maya
ddc0f89203 Apply upstream commit:
From: ppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 27 Apr 2016 21:18:05 +0000
Subject: [PATCH] Reduce nesting of parentheses in conditionals generated by
 genattrtab

gcc/ChangeLog:

	* genattrtab.c (write_test_expr): New parameter EMIT_PARENS
	which defaults to true.  Emit an outer pair of parentheses only if
	EMIT_PARENS.  When continuing a chain of && or || (or & or |),
	don't emit parentheses for the right-hand operand.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235536

gcc/arm generates so many parens it hits a bracket depth limited which is
enforced by clang. This reduces the number of parens generated and avoids the
need to increase bracket depth.

Fixes PR toolchain/53178 properly.
2018-04-17 10:02:49 +00:00
maxv
03bb22c3ac Fix a pretty bad mistake, that has always been there.
m_adj(m1, -(m1->m_len - roff));
		if (m1 != m)
			m->m_pkthdr.len -= (m1->m_len - roff);

This is wrong: m_adj will modify m1->m_len, so we're using a wrong value
when manually adjusting m->m_pkthdr.len.

Because of that, it is possible to exploit the attack I described in
uipc_mbuf.c::rev1.182. The exploit is more complicated, but works 100%
reliably.
2018-04-17 09:06:33 +00:00
nonaka
1f5086ec4f nvmectl(8): Sync with FreeBSD nvmecontrol(8) r328763. 2018-04-17 08:54:35 +00:00
nonaka
cb9f942e0a regen 2018-04-17 08:47:43 +00:00
nonaka
1c26c0b8e5 Added some NVMe devices. 2018-04-17 08:47:19 +00:00
msaitoh
87090e013e Remove unused structure entries. No functional change. 2018-04-17 08:38:05 +00:00
maxv
3da4020fbc change the comment 2018-04-17 07:58:31 +00:00
maxv
4f03308fb7 If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.
2018-04-17 07:41:34 +00:00
maxv
cc059e555f Don't assume M_PKTHDR is set only on the first mbuf of the chain. It
should, but it looks like there are several places that can put M_PKTHDR
on secondary mbufs (PR/53189), so drop this assumption right now to
prevent further bugs.

The check is replaced by (m1 != m), which is equivalent to the previous
code: we want to modify m->m_pkthdr.len only when 'm' was not passed in
m_adj().
2018-04-17 06:23:30 +00:00
knakahara
11b471795e Fix panic when "sysctl -w hw.ixg0.txrx_workqueue=[01]" while there is traffic.
The operation is not supported, however causing panic is problem.
2018-04-17 05:23:58 +00:00
yamaguchi
a83f891441 Fix panic of SADB when the state of sav is changed in timeout
pointed out by ozaki-r@n.o, thanks
2018-04-17 04:22:58 +00:00
christos
622f49cc74 Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@
2018-04-17 02:03:56 +00:00
jdolecek
1a388484b9 remove superfluous semicolon 2018-04-16 22:33:28 +00:00
hannken
12bfd1b42c Change procfs_revoke_vnodes() to use vrecycle()/vgone() instead
of VOP_REVOKE().

Gets rid of a bunch of suspensions on /proc as vrecycle() will
succeed most time and we suspend at most once per call.
2018-04-16 20:27:38 +00:00
hannken
eba426546b Function pserialize_perform() usually succeeds after two cross calls
so defer kpause() to iterations three and above.

Speeds up VOP_REVOKE() on /proc/XXX/status by a factor of ~12.

Ok: core@
2018-04-16 20:25:21 +00:00
maxv
adff91e18b Disable the M_PKTHDR check for now. It causes PR/53189 (which is also
reproducible on i386).

It seems that someone is giving looutput a malformed chain.
2018-04-16 19:19:51 +00:00
maxv
2f7eef4b1d Remove dead code.
ok ozaki-r@
2018-04-16 17:32:34 +00:00
christos
4f1477379d According to:
https://sourceforge.net/p/predef/wiki/Libraries/
The macro used for old glibc is __GNU_LIBRARY__ and the new one is __GLIBC__.
Try to fix linux compilation by detecting both.
2018-04-16 16:11:40 +00:00
kamil
b91714d723 Revert previous glob.c change
It broke on !GLIBC.
2018-04-16 16:02:57 +00:00
wiz
f326c99a7e Merge EAGAIN descriptions. 2018-04-16 15:02:37 +00:00
kamil
d20c39ee39 Remove the rnewprocp argument from fork1(9)
It's now unused and it can cause use-after-free scenarios as noted by
<Mateusz Guzik>.

Reference: http://mail-index.netbsd.org/tech-kern/2017/09/08/msg022267.html

Sponsored by <The NetBSD Foundation>
2018-04-16 14:51:59 +00:00
kamil
3c41a2b898 Fix build of gmake (in tools) on new GLIBC systems
Reported on Debian and Fedora.

Reference for similar fix:
https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00020.html

Tested by <Mateusz Guzik> on Fedora.
Tested by <Mandacaru Cascavel> on Debian.
2018-04-16 14:39:19 +00:00