Commit Graph

246334 Commits

Author SHA1 Message Date
pgoyette
7918249e30 One more move of bufq_free() to outside of critical section. 2016-11-20 03:30:11 +00:00
kamil
57fc5895ae Catch up with correct pt_magic reads in td_thr_{getname,suspend,resume}
The pt_magic field is not the first one in the pthread_t structure.

Sponsored by <The NetBSD Foundation>
2016-11-20 03:11:32 +00:00
pgoyette
9300beb87f Avoid calling bufq_free() from critical code sections. 2016-11-20 02:38:24 +00:00
pgoyette
e38abff020 Avoid calling bufq_free() from critical section. 2016-11-20 02:34:27 +00:00
kamil
1d6ebe4f76 Fix pt_magic (part of pthread_t) read in td_thr_info()
The pt_magic field is not the first one in the pthread_t structure.
After this fix, this code is confirmed to work and function td_thr_info()
is functional.

Sponsored by <The NetBSD Foundation>
2016-11-20 02:27:56 +00:00
mrg
38ac2f14f5 regen all gdb platforms. 2016-11-20 00:19:55 +00:00
wiz
39a1754c2e Bump date for previous.
Use more and more appropriate markup while here.
2016-11-19 23:37:33 +00:00
christos
ecb08d7cca Add FALLTHROUGH commit 2016-11-19 19:06:12 +00:00
maya
ff60e9d727 Lock the manager and not just the node for inserting/removing nodes
should fix/help PR kern/50349: radeondrmkms vt-switching crash

ok riastradh
2016-11-19 17:19:59 +00:00
kamil
e8b564dc88 Remove atf_tx_expect_fail from lib/libpthread_dbg/ tests
The following PR are now resolved and are reported to be properly fixed:
PR lib/51635 td_thr_iter in <pthread_dbg.h> seems broken
PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable

Sponsored by <The NetBSD Foundation>
2016-11-19 15:13:46 +00:00
njoly
4c2d33e4a7 Make fstat(2) work on AF_LINK socket descriptors. 2016-11-19 14:44:00 +00:00
skrll
d86dfd8c85 Pull across various locking and reference counting fixes from nick-nhusb. 2016-11-19 09:49:20 +00:00
mrg
98abf92201 s/#/$/ in a $NetBSD$ so it actually expands 2016-11-19 09:46:58 +00:00
maxv
f228a924a9 Put a one-page redzone between userland and the PTE space on amd64 and
i386.

The PTE space is a critical region that maps the page tree, and bugs have
been found in both amd64 and i386 where the kernel would wrongly overflow
userland data on this area. This kind of bug is terrible, since it allows
userland to overwrite some entries of the page tree, which makes it easy
to patch the kernel text and get ring0 privileges.
2016-11-19 09:22:03 +00:00
skrll
0efd40303c mknative re-run 2016-11-19 09:10:33 +00:00
skrll
99abbf6f20 Optimise the interrupt vector a litte. From matt@ 2016-11-19 09:05:50 +00:00
skrll
8d8621a4bd Real mknative re-run 2016-11-19 08:46:03 +00:00
flxd
b0be1b67cd Add "getrealloc" and "setrealloc" commands to get/set automatic reallocation
parameters/enables for error recovery, similar to {get,set}cache.
Many old SCSI disks shipped with reallocation disabled, albeit supporting it.
Minor (cosmetic) fixup of scsi_disk_pages while there.
Based upon code in PR bin/29165 by Greg A. Woods.
OK christos@
2016-11-19 08:43:40 +00:00
skrll
56b555c863 Mark the alpha options use_secureplt as false... we don't do secure plt
on alpha (yet)
2016-11-19 07:54:19 +00:00
skrll
c7af765c8e Add in netbsd-core.lo for all arm/mips 2016-11-19 07:52:49 +00:00
kamil
535c2378f3 Fix basic_proc_read in pthread_dbg functions
Source and destination were swapped. The source of this confusion was that
running these tests under gdb(1) will generate false positives as it will
initialize pthread__dbg to PID of the debugger. This means that it is
currently not possible to debug pthread_dbg code under a full-stack
debugger using NetBSD debugging library for threads.

This should address:
PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable
PR lib/51635: td_thr_iter in <pthread_dbg.h> seems broken

After applying the fix I'm able to run all pthread_dbg tests without
indeterminism. The indeterminism was caused by overwritting source of data
with trash.

Sponsored by <The NetBSD Foundation>
2016-11-19 02:30:54 +00:00
kre
8ad774dbf7 Undo change to a comment made when I thought another change to the
script was needed ... the unnecessary script change was never committed,
but the comment that described it was...    No functional change.
2016-11-19 01:14:58 +00:00
kre
1675d6af19 The config file is not required to exist (unless specified via -d).
(reported by rhialto@falu.nl)  Don't fail to start if it doesn't.

Make sure the directory for the config file exists inside the chroot before
attempting to copy into it ("confdir" was calculated, but never used...)

While here, fix getopts usage (obviously only ever previously tested when
the -c arg was the first option...) and don't use test(1)'s -o operator
(especially not when one of the other args is an unknown string).
If -c is given (and we will chroot), require filename to be full path.

Misc minor style cleanups.
2016-11-18 23:10:05 +00:00
pgoyette
01ce88d0f3 More clean-up of #includes 2016-11-18 22:58:08 +00:00
kamil
0a225098cc Add new test file lib/libpthread_dbg/t_threads
This test contains threads1 test that:
    Asserts that td_thr_iter() call without extra logic works

This tests fails and is linked with gnats:
PR lib/51635: td_thr_iter in <pthread_dbg.h> seems broken

Sponsored by <The NetBSD Foundation>
2016-11-18 22:50:19 +00:00
pgoyette
f8afa79068 Add the initial module(9) infrastructure 2016-11-18 22:41:18 +00:00
pgoyette
c68a82788b Clean up some #includes 2016-11-18 22:37:50 +00:00
skrll
1f089c9791 Sprinkle MFC0_HAZARD for previous and PARANOIA 2016-11-18 16:23:40 +00:00
macallan
1865df3d11 don't blindly zero STATUS in order to disable interrupts, instead take care
to preserve bits like KX in case we catch an interrupt between mtc0 and the
write actually taking effect
now n32 kernels on my O2 are (mostly) stable again
ok skrll@
2016-11-18 13:50:36 +00:00
skrll
f958ae60d4 (simulate) mknative re-run 2016-11-18 12:42:10 +00:00
abhinav
cac7393582 Oops, it should be Aq Mt email@address
(Thanks again wiz :-)
2016-11-18 12:16:48 +00:00
joerg
0640809ae6 Remove extra pair of braces. 2016-11-18 11:46:04 +00:00
knakahara
92613f0abe We must use PSLIST_ENTRY_DESTROY after PSLIST_WRITER_REMOVE and waiting all readers done.
And then, if we want to re-insert the removed pslist element, we need to
call PSLIST_ENTERY_INIT again.

advised by riastradh@n.o and reviewed by ozaki-r@n.o, thanks.
2016-11-18 10:38:55 +00:00
abhinav
739865b984 Use .An -nosplit
Also, use Mt for email addresses.

(Thanks wiz)
2016-11-18 10:11:34 +00:00
pgoyette
34f2d232eb Clean up after the import auto-generate.
At least now it doesn't cause config(1) any problems.
2016-11-18 09:58:38 +00:00
skrll
3a5e17dcb9 Provide a generic nbsd_skip_solib_resolver and use it in alpha and arm.
Others should follow suit.

I even tested it.
2016-11-18 09:52:33 +00:00
abhinav
5644a41214 Use more markup and complete a sentence. 2016-11-18 09:06:35 +00:00
pgoyette
2d39560c47 Resolve conflicts 2016-11-18 08:31:29 +00:00
wiz
3d5157a1a4 Use more markup. 2016-11-18 08:29:43 +00:00
knakahara
b93b57bdab if_register() must be called after ifp->if_dl initialized.
There may be similar problems. I will fix step by step...
2016-11-18 08:13:02 +00:00
pgoyette
e81f0ea2ca Update to FreeBSD revision 308975 ( approx 2016-11-18 07:30 UTC)
If I'm going to try to get this working, I should at least start with
the most recent code available.
2016-11-18 07:49:10 +00:00
msaitoh
85f6e15ba0 Fix WOL related setting of the WUC register for other than PCH*
in wm_enable_wakeup(). Tested with 82567V(ICH8) and 82583V.
2016-11-18 06:55:00 +00:00
knakahara
2526d8f639 fix: "ifconfig destory" can stalls when "ifconfig" is done parallel.
This problem occurs only if NET_MPSAFE on.

ifconfig destroy side:
    kernel entry point is ifioctl => if_clone_destroy.
    pr_purgeif() acquires softnet_lock, and then ifa_remove() calls
    pserialize_perform() holding softnet_lock.
ifconfig side:
    kernel entry point is socreate.
    pr_attach()(udp_attach_wrapper()) calls sosetlock(). In this call path,
    sosetlock() try to acquire softnet_lock.
These can cause dead lock.
2016-11-18 06:50:04 +00:00
riastradh
b094eba6ab Explain why we don't touch the next pointer of the removed entry. 2016-11-18 06:41:52 +00:00
pgoyette
f48fa2dcc1 By popular request, don't bother initializing a static pointer to NULL. 2016-11-18 02:37:33 +00:00
macallan
47581dbf57 KASSERT that MIPS_SR_KX is set when entering interrupt handler in !o32 2016-11-17 23:46:52 +00:00
pgoyette
a99ecc4a30 In addition to initializing the bufq subsystem, we also need to init
the individual strategy modules.
2016-11-17 23:15:38 +00:00
kamil
452c3956fa Mark dummy2 and dummy3 in lib/libpthread_dbg/t_dummy with expected fail
The dummy2 test reports failures on i386 releng machines.

The same with dummy3, but it's also reproducible sometimes on my amd64
setup. It's not always broken, neither always functional - once a while it
reports failure. So far I have not reproduced failure in dummy2.

PR lib/51633 tests/lib/libpthread_dbg/t_dummy unreliable

Sponsored by <The NetBSD Foundation>
2016-11-17 17:30:22 +00:00
maxv
c998f797d2 Unmap tmpva once we are done using it, not to pollute the page tree. 2016-11-17 16:32:06 +00:00
maxv
c3b2da209a Remap the pages with G until kern_end, and not just the preloaded modules.
This way the bootstrap tables, proc0's stack and the I/O mem area don't get
flushed each time userland needs a TLB shootdown.
2016-11-17 16:26:07 +00:00