Commit Graph

246334 Commits

Author SHA1 Message Date
maya
5997445727 switch mfc0_hazard to be superscalar nop, some mips3 are superscalar
and need this to do the right thing
2016-11-11 16:41:32 +00:00
christos
c231d3fa1b Explain rmtp setting. 2016-11-11 16:07:05 +00:00
njoly
2904b2098c New clock_nanosleep(2) testcase. 2016-11-11 15:30:44 +00:00
njoly
a9422942bd Adjust clock_nanosleep(2) to not copyout remaining time struct if
TIMER_ABSTIME flag is set.

Ok Christos.
2016-11-11 15:29:36 +00:00
maxv
606d15137f Remove useless values, and explain where some others come from 2016-11-11 12:06:31 +00:00
kamil
9dd27382de Add new test t_ptrace_attach3 in t_ptrace
Assert that tracer parent can PT_ATTACH to its child.
This test is for all members of the wait(2) family.

Currently it is marked as an explicit failure PR kern/51621.

I faced the following issues (noted and discussed in the bug report):

- PT_ATTACH seems to work, but waiting for stopped status and signal from the
  child results in getting SIGTRAP, not SIGSTOP like in Linux and FreeBSD. This
  might be by design, I'm unsure. However, so far I was getting SIGSTOP from a
  tracer process that was not the parent. SIGSTOP vs SIGTRAP logic also
  complicates the things up as tracer must check whether is a parent for tracee
  or not - this shouldn't be needed.

- PT_CONTINUE seems to have no effect at all, the child hangs. This operation
  works on Linux and FreeBSD and in the end, test passes correctly.

- Debugging this with gdb(1) results in receiving SIGABRT from the GNU
  debugger (in the moment of raising/receiving SIGTRAP). This is making the
  things harder in general.

Sponsored by <The NetBSD Foundation>.
2016-11-11 12:01:14 +00:00
maxv
979460599e Rename xen_pmap_bootstrap to xen_locore, it really has nothing to do with
pmap and is just a C version of what amd64 and i386 do in asm.
2016-11-11 11:34:51 +00:00
maxv
85c922c541 Mmh, I mistakenly removed the lapic page (which is part of another diff),
put it back in.
2016-11-11 11:31:26 +00:00
maxv
748acd38e3 Start simplifying the Xen locore: rename and reorder several things, remove
awful debug messages, use unsigned counters, fix typos and KNF.
2016-11-11 11:12:42 +00:00
maxv
704dbda08c KNF and simplify Xen, and reduce the diff with amd64 a little 2016-11-11 11:00:38 +00:00
hannken
3a541ed229 Fix a "slight tweak" from Rev. 1.121: bap1/bap2 must be valid
before using BAP_ASSIGN().

Prevents NULL pointer dereference when "lastbn >= 0".
2016-11-11 10:50:16 +00:00
maxv
fd92293666 KNF and simplify Xen 2016-11-11 10:40:00 +00:00
maxv
ed2962cbb0 Update the pmap only once 2016-11-11 09:47:18 +00:00
alnsn
0fb91146db Add 3des-cbc tests with 192 bits key. 2016-11-11 07:39:58 +00:00
msaitoh
942fbad289 The MEHE bit in the CTRL register is not bit 17 but 19. 2016-11-11 07:31:03 +00:00
alnsn
34c9574779 Add t_cgd_blowfish. 2016-11-10 23:47:23 +00:00
alnsn
b0f6fce42a Add blowfish-cbc tests for 128, 256 and 448 bits keys. 2016-11-10 23:44:36 +00:00
sjg
46bfaede57 Report node name rather than (null) when modified before src 2016-11-10 23:41:58 +00:00
jdolecek
ad7bde6ea4 stress more that discard is experimental, and explain why; also note that
it's not compatible with log
2016-11-10 22:28:00 +00:00
jdolecek
f9c82ee8e7 disable discard when log is enabled to preserve log consistency promise
PR kern/50725
2016-11-10 22:19:23 +00:00
jdolecek
6f3d24b81e update the wapbl entry - kern/47146 and kern/49175 are fixed 2016-11-10 21:28:15 +00:00
jdolecek
86e8a3aae2 during truncate with wapbl, register deallocation for upper indirect block
before recursing into lower blocks, to make sure that it will be removed after
all its referenced blocks are removed

fixes 'ffs_blkfree_common: freeing free block' panic triggered by
ufs_truncate_retry() when just the upper indirect block registration failed,
code tried to free the lower blocks again after wapbl flush

problem found by hannken@, thank you
2016-11-10 20:56:32 +00:00
jdolecek
6730f31e00 ffs_indirtrunc(): for !wapbl, restore rev 1.117 behavior of writing the zeroed
(indirect) block before freeing the referenced blocks; it's necessary for
fsck to recover the filesystem, if system goes down during truncate

patch courtesy of hannken@ with only sligh tweaks
2016-11-10 19:10:05 +00:00
christos
beba73af79 - Move WUNTRACED outside the _NETBSD_SOURCE ifdef because waitpid()
needs it (kre)
- Reformat the comments
2016-11-10 18:35:17 +00:00
kamil
cb35b27d7a Add new test attach2 in t_ptrace_wait{4,6,id,pid}
This test asserts that any tracer sees process termination before its
parent.

This test is not applicable for wait(2) and wait(3) as these interfaces
cannot get specified process id argument (PID).

Sponsored by <The NetBSD Foundation>.
2016-11-10 18:33:52 +00:00
christos
588764e869 Reflect current reality about the wait options and standards. 2016-11-10 17:32:50 +00:00
christos
50d1e6ecfe Document WNOZOMBIE 2016-11-10 17:08:31 +00:00
christos
b2924f399d GC WOPTSCHECKED, define macros for the select opts and all the valid opts.
The linux compat flags are not part of X/Open.
2016-11-10 17:07:14 +00:00
christos
e67c618e35 GC WOPTSCHECKED 2016-11-10 17:00:51 +00:00
hauke
a664a38e53 Add entry for Intel Centrino Advanced-N 6235 bluetooth piggy-back
Add entry for Validity Sensors, Inc. VFS491
2016-11-10 15:38:51 +00:00
knakahara
bca5eda0a9 fix: extend waittime to avoid unintended fail at high cpu load. 2016-11-10 10:32:59 +00:00
msaitoh
466c55b2a6 - Move I219 DMA workaround into wm_flush_desc_rings() and call it before
wm_reset().
- Rewite I219 TX DMA workaround based on OpenBSD's one.
- Add I219 RX DMA workaroud from OpenBSD.
2016-11-10 08:35:24 +00:00
msaitoh
48429bc512 Call wm_enable_phy_wakeup() on PCH2 and newer, too. Now these devices
can do WOL. Tested with Thinkpad X220(PCH2).
2016-11-10 06:57:15 +00:00
macallan
16321ec172 weed out BUS_SPACE_MAP_PREFETCHABLE in resp. _map() and _mmap() methods
it works with UPA graphics cards and at least some psycho but causes problems
on these
2016-11-10 06:44:35 +00:00
ozaki-r
d0432711b6 Tidy up in6_select*
This change tidies up in6_select* functions, especially
selectroute.

selectroute is annoying because:
- It returns both/either of a rtentry and/or an ifp
  - Yes, it may return only an ifp!
    - It is valid but selectroute shouldn't handle the case
  - Such conditional behavior makes it difficult
    to apply locking/psref thingy
- It may return a rtentry even if error
- It may use opt->ip6po_nextroute rtcache implicitly
  - The caller can know if it is used
    by rtcache_validate(&opt->ip6po_nextroute)
    but it's racy in MP-safe world
  - Even if it uses opt->ip6po_nextroute, it may
    return a rtentry that isn't derived from the rtcache

The change includes:
- Rename selectroute to in6_selectroute
  - Let a remaining caller of selectroute, in6_selectif,
    use in6_selectroute instead
- Let in6_selectroute return only an rtentry
  - If error, it doesn't return an rtentry
  - A caller gets an ifp from a returned rtentry
- Allow in6_selectroute to modify a passed rtcache
  and a caller can know if opt->ip6po_nextroute is
  used via the rtcache
- Let callers (ip6_output and in6_selectif) handle
  the case that only an ifp is required

Inspired by OpenBSD
Proposed on tech-kern and tech-net
LGTM by roy@
2016-11-10 04:13:53 +00:00
ozaki-r
e956baf9d4 Fix a breakout of loops
As the comment "find first available ipv4 address" indicates,
if an IP address is found, we need to leave the two nested loops,
a loop for an interface list and a loop for IP addresses of
an interface. However, the original code broke away only from
the inner loop.

The original (wrong) behavior was non-critical, which just
returned a non-first IP address. Unfortunately, after applying
psref, the behavior may call psref_acquire twice to a target
with the same psref object, resulting in a kernel panic eventually.
2016-11-10 03:32:04 +00:00
alnsn
911f4379f3 Add aes-cbc tests. 2016-11-09 22:01:15 +00:00
macallan
695edcefa4 - use bus_space_mmap()
- pass the right colour depth in ioctl()
should fix PR49639
2016-11-09 19:54:25 +00:00
kamil
fac432862c Add new tests in t_wait_noproc and t_wait_noproc to test more options types
Add new tests:
 - waitpid_options
 - waitid_options
 - wait3_options
 - wait4_options
 - wait6_options

These tests are included in t_wait_noproc and t_wait_noproc_wnohang.

waitpid_options, wait3_options, wait4_options test combinations of options
of: bit for WALLSIG, WALTSIG, __WALL, __WCLONE and later a full combination
mask of WNOWAIT, WEXITED, WUNTRACED, WSTOPPED, WTRAPPED and WCONTINUED.

waitid and wait6 test full combination mask of WNOWAIT, WEXITED, WUNTRACED,
WSTOPPED, WTRAPPED and WCONTINUED -- excluded empty value and singular
WNOWAIT.

For compatibility reasons alter waitid and wait6 to test against options
WEXITED | WTRAPPED, as it's equivalent to waitpid, wait3, wait4.

The intention for these tests it to catch any possible issues with slighty
changed behavior of wait(2)-like functions in terms of valid options
values.

All tests pass successfully.

Sponsored by <The NetBSD Foundation>
2016-11-09 17:50:19 +00:00
kre
120ea00cee PR standards/51600
These tests are no longer expected to fail when called with WNOHANG
(which is actually the t_wait_noproc_wnohang test but the sources are here.)
2016-11-09 12:44:29 +00:00
maya
9c53bef583 Move MFC0_HAZARD definition to asm.h instead of defining it twice 2016-11-09 11:50:09 +00:00
ozaki-r
8db944330d Add a new sanity check to psref
It checks if a target being acquired is already acquired with
the same psref. It is usable but not lightweight, so enabled
only if DEBUG.
2016-11-09 09:00:46 +00:00
rin
1626404a42 Add myself 2016-11-09 08:18:56 +00:00
dholland
7b5c072bc8 Apply ufs_extattr.c 1.48:
Explain why the lock in here needs to be recursive. Related to PR 46997.

ufs_extattr 1.47 was also committed directly here, so this file is still
fully synced with it.
2016-11-09 05:44:42 +00:00
dholland
5cbfa154c2 Explain why the lock in here needs to be recursive. Related to PR 46997. 2016-11-09 05:08:35 +00:00
dholland
1fd0461870 ufs_makeinode is declared file-static at the top of the file; mark it
at its definition too, for consistency and to avoid misleading casual
passersby.
2016-11-09 04:12:55 +00:00
ozaki-r
fbb7e30d1e Reduce the number of return points of frag6_input
No functional change.
2016-11-09 03:49:38 +00:00
ozaki-r
fe91c59d38 Cleanup/KNF tcp6_mtudisc
No functional change.
2016-11-09 03:33:30 +00:00
kre
b6732360dd PR kern/51600 ; PR standards/51606
Revert 1.264 - that was intended to fix 51600, but didn't, it just
hid the problem, and caused 51606.  This fixes 51606.

Handle waiting on a process that has been detatched from its parent
because of being ptrace'd by some other process.  This fixes 51600.
("handle" here means that the wait() hangs, or with WNOHANG, returns 0,
we cannot actually wait on a process that is not currently an attached
child.)

Note: the detatched process waiting is not yet perfect (it fails to
take account of options like WALLSIG and WALTSIG) - suport for those
(that is, ignoring a detatched child that one of those options will
later cause to be ignored when the process is re-attached.)

For now, for ither than when waiting for a specific process ID, when
a process does a wait() sys call (any of them), has no applicable
children attached that can be returned, and has at least one detatched
child, then we do a linear search of all processes to look for a
suitable detatched child.  This is likely to be slow - but very rare.
Eventually it might be better to keep a list of detatched children
per process.
2016-11-09 00:30:17 +00:00
kamil
258bb686f9 Switch ATF_REQUIRE() to more appropriate ATF_REQUIRE_ERRNO()
Simplify the code of t_wait_noproc

Sponsored by <The NetBSD Foundation>
2016-11-08 15:21:34 +00:00