Commit Graph

257359 Commits

Author SHA1 Message Date
mrg 7e4cdcfd86 add xorgproto srcdir. 2018-03-14 07:35:56 +00:00
mrg 96e436f227 update for libdrm 2.4.91. 2018-03-14 07:23:00 +00:00
mrg c201ebe368 regenerate these for libxcb 1.13. 2018-03-14 06:47:28 +00:00
ryo ddcce67716 fix compile error on evbarm/EXYNOS. platform.h may be included from *.S 2018-03-14 06:35:31 +00:00
mrg ba5804a5a5 build Tekparse.hin VTparse.hin normally. 2018-03-14 06:06:40 +00:00
kamil ce34db38fd Add new ATF tests: kernel/t_zombie
New tests attempting to kill, stop, drop or revive a zombie:
 - signal1 (SIGKILL)
 - signal2 (SIGSTOP)
 - signal3 (SIGABRT)
 - signal4 (SIGHUP)
 - signal5 (SIGCONT)

New test race1 verifying whether there are any kernel races when processing
signals to zombies, executing in a loop for 5 seconds.

These tests were inspired by a kernel unexpected behavior when a lookup
of a dying process could result in two detected entities once as an alive
process and once as a zombie.

race1 is similar to t_ptrace_wait* race1, however without ptrace(2) involved.

Sponsored by <The NetBSD Foundation>
2018-03-14 02:13:47 +00:00
uwe caedaa46ad Try to improve markup in the Built-ins section.
Mostly sprinkle missing .Ic and .Ar
2018-03-13 23:03:21 +00:00
uwe f81efe159b Try to improve markup in the Parameter Expansion section. 2018-03-13 21:49:15 +00:00
uwe 0054fb0db8 Try to improve markup of the redirections definitions. 2018-03-13 21:04:57 +00:00
uwe 08ffbb4888 Fix horrendous markup abuse in the here-document example.
Consistently spell "here-document" in full.
2018-03-13 20:48:00 +00:00
uwe 121a1034cd Spell "here-document" with a hyphen, don't mark it up as a command. 2018-03-13 20:40:52 +00:00
uwe 9453809f25 Mark up "in" (of the "for" command) appropriately. 2018-03-13 20:39:25 +00:00
uwe 194117b0aa Use \(or not \*(Ba when discussing case patterns. 2018-03-13 20:29:13 +00:00
uwe 0bbb85ef5e Use \(em for em-dash 2018-03-13 20:18:16 +00:00
uwe 882c5e3aae Standalone | means \[ba] while we want \[or] so add \& protection to
the few places where it was missing.
2018-03-13 20:08:11 +00:00
uwe 4243789c21 .Dl is a a single line .Bd -literal -offset indent so don't abuse
multiple consecutive .Dl and use proper .Bd instead.
2018-03-13 19:43:52 +00:00
uwe e0885dda62 .Bd expects the display type to come first, so move -compact to the end. 2018-03-13 19:35:46 +00:00
uwe 5e8101b3eb Add missing word. 2018-03-13 19:18:53 +00:00
maxv 54954d76d2 Fix wrong order; first enable WP, then enable interrupts. Otherwise we
might get an interrupt before re-enabling WP, and be rescheduled as a
result. In practice it never happens, because the previous PSL always
has interrupts disabled too.
2018-03-13 16:52:42 +00:00
maxv b454699f28 Mmh, add a missing x86_disable_intr(). My intention there was to ensure
interrupts were disabled before the barriers.
2018-03-13 16:45:52 +00:00
maxv 76b851610b Mmh, put back the RFC6946 check (about dummy fragments), otherwise NPF
is not happy in npf_reassembly, because NPC_IPFRAG is again returned after
the packet was reassembled.

I'm wondering whether it would not be better to just remove the fragment
header in frag6_input directly.
2018-03-13 16:23:40 +00:00
kamil a9dda15d6e ATF: Add new test race1 in t_ptrace_wait*
Reuse the attach1's test body for race1.

Add a new test race1:
  Assert that await_zombie() in attach1 always finds a single
  process and no other error is reported

race1 requires HAVE_PID in wait(2)-like function.

This test is executed in a loop for 5 seconds (16k iterations on Intel i7).
A buggy kernel was asserting an error within this timeframe almost always.

The bug in the kernel is now gone and this test is expected to pass
correctly.

Sponsored by <The NetBSD Foundation>
2018-03-13 14:54:13 +00:00
kamil c6513ba7ad ATF t_ptrace_wait*: Disable debug messages in msg.h
msg.h is a dummy IPC interface.

Disable additional debugging logging here, especially wanted in race*
tests.

Sponsored by <The NetBSD Foundation>
2018-03-13 14:45:36 +00:00
kamil 8fa6ff479d Add a new function in ATF t_ptrace_wait*: await_zombie_raw()
Add await_zombie_raw() that is the same as await_zombie(), whith an
addition of additional "useconds_t ms" parameter indicating delays between
new polling for a zombie process.

This new function will be used for testing a race condition that has been
observed occassionally crashing a test case -- returning duplicate entries
for KERN_PROC_PID.

Sponsored by <The NetBSD Foundation>
2018-03-13 13:34:40 +00:00
maxv 84ba156ea5 Fix two consecutive mistakes.
The first mistake was npf_inet.c rev1.37:

	"Don't reassemble ipv6 fragments, instead treat the first fragment
	as a regular packet (subject to filtering rules), and pass
	subsequent fragments in the same group unconditionally."

Doing this was entirely wrong, because then a packet just had to push
the L4 payload in a secondary fragment, and NPF wouldn't apply rules on
it - meaning any IPv6 packet could bypass >=L4 filtering. This mistake
was supposed to be a fix for the second mistake.

The second mistake was that ip6_reass_packet (in npf_reassembly) was
getting called with npc->npc_hlen. But npc_hlen pointed to the last
encountered header in the IPv6 chain, which was not necessarily the
fragment header. So ip6_reass_packet was given garbage, and would fail,
resulting in the packet getting kicked. So basically IPv6 was broken by
NPF.

The first mistake is reverted, and the second one is fixed by doing:

-			hlen = sizeof(struct ip6_frag);
+			hlen = 0;

Now the iteration stops on the fragment header, and the call to
ip6_reass_packet is valid.

My npf_inet.c rev1.38 is partially reverted: we don't need to worry
about failing properly to advance; once the packet is reassembled
npf_cache_ip gets called again, and this time the whole chain should be
there.

Tested with a simple UDPv6 server - send a 3000-byte-sized buffer, the
packet gets correctly reassembled by NPF now.
2018-03-13 09:04:02 +00:00
ryo 1d7345fd9c fix compile error (variable set but not used) 2018-03-13 06:41:53 +00:00
ryo f3b490eb68 fix build error. add options __HAVE_CPU_UAREA_ALLOC_IDLELWP for MULTIPROCESSOR 2018-03-13 06:21:59 +00:00
ryo 449cb354a6 fix build error. need midi* for umidi 2018-03-13 06:21:22 +00:00
ryo 87501bba52 fix build error. if no usb, don't define USB_DEBUG 2018-03-13 06:20:41 +00:00
ryo 25c58f1dc3 fix compile error (unused variables) 2018-03-13 06:19:30 +00:00
ryo 2baafe6908 fix compile error 2018-03-13 06:18:47 +00:00
ryo 1cb6351b40 fix compile error (printf format) 2018-03-13 06:18:17 +00:00
knakahara a0d17a179a Enhance assertion ipsecif(4) ATF to avoid confusing setkey(8) error message.
When setkey(8) says "syntax error at [-E]", it must mean get_if_ipsec_unique()
failed.
2018-03-13 03:50:26 +00:00
mrg 7b319e81c3 fix the cleanfiles for hooks mechanism 2018-03-13 03:17:01 +00:00
mrg 76c587cf23 add the generated prog.conf.5 to CLEANFILES. 2018-03-13 03:07:51 +00:00
mrg 6e029617f0 add *template.x to CLEANFILES. 2018-03-13 03:06:51 +00:00
mrg c62ada779a include bsd.clean.mk so that we actually clean up the attempted "params" 2018-03-13 03:06:28 +00:00
knakahara e7acdb682b comment out confusing (and incorrect) code and add comment. Pointed out by maxv@n.o, thanks. 2018-03-13 03:05:12 +00:00
mrg f0a3006c1d use CLEANFILES+= not CLEANFILES= to avoid overriding what was already
setup before now.
2018-03-13 03:03:33 +00:00
kamil a1788664a1 Make sysctl_doeproc() more predictable
Swap the order of looking into zombie and all process lists, start now
with the zombie one. This prevents a race observed previously that the
same process could be detected on both lists during a single polling call.

While there:
 - Short-circuit break for KERN_PROC_PID, once a pid has been detected.
 - Removal of redundant "if (kbuf)" and "if (marker)" checks.
 - Update of comments regarding potential optimization, explaining why we
   don't want to it as of now. Performance gain from lookup call vs
   iteration over a list is neglible on a regular system.
 - Return ESRCH when no results have been found. This allows more easily
   to implement a retry or abandon algorithm.

This corrects races observed in the existing ATF ptrace(2) tests, related
to await_zombie(). This function was expecting to check whether a process
has been transformed into a zombie, however it was causing occasional
crashes as it was overflowing the return buffer, returning the same pid
twice: once from allproc list and the second time from zombieproc one.

Fix suggested by <christos>
Short-circuit break suggested by <kre>

Discussed on tech-kern.

Sponsored by <The NetBSD Foundation>
2018-03-13 02:24:26 +00:00
mrg d28ac4e2bc add missing pcfwrite.c. 2018-03-13 02:23:28 +00:00
mrg 0955925eb7 clean up CRUNCHBIN.map 2018-03-13 02:22:43 +00:00
knakahara 51a1e9f49e Fix IPv6 ipsecif(4) ATF regression, sorry.
There must *not* be padding between the src sockaddr and the dst sockaddr
after struct sadb_x_policy.
2018-03-13 02:12:05 +00:00
mrg cbb4749bb3 update for new amdgpu and radeon driver versions. 2018-03-12 18:48:49 +00:00
maxv 473744b505 Remove dead branches, 'npc' can't be NULL (and it is dereferenced
earlier).
2018-03-12 12:45:26 +00:00
pgoyette 2461f62e8b Remove exgtraneous comma 2018-03-12 11:56:34 +00:00
wiz 2458e695f0 Remove Tn. 2018-03-12 09:29:43 +00:00
msaitoh 40af7057a9 AMD L3 cache association bitfield is not 8bit but 4bit like others association
bitfields.
2018-03-12 07:35:45 +00:00
msaitoh d536bc686b s/CLFUSH/CLFLUSH/
No functional change.
2018-03-12 07:12:54 +00:00
msaitoh 928f98ab1c Add 3way and 6way of L2 cache or TLB on AMD CPU. 2018-03-12 06:20:33 +00:00