christos
39d23ee140
Make ts2timo(9) always return the absolute start time if the start argument
...
is present, and handle the TIMER_ABSTIME case in nanosleep1(9).
2013-05-22 16:00:52 +00:00
bouyer
5e3e8c4055
ts2timo(): if TIMER_ABSTIME is set and start is not NULL, initialize
...
it to 0. Some callers (e.g. nanosleep1()) expect *start to always be
initialized and would use random values from stack otherwise.
While there, remove an always-true conditionnal.
2013-05-21 16:25:55 +00:00
njoly
1f01deacdd
Redo case where buf_map is not yet mapped when buf_memcalc() is called
...
early from pmap_bootstrap(). Makes alpha, and probably others, boot
again.
2013-05-19 11:02:12 +00:00
skrll
08f384533b
KNF
2013-05-11 15:44:46 +00:00
pooka
1fddf4baef
print more diagnostic info in panic message
2013-05-08 11:08:45 +00:00
mlelstv
220e532cc2
fix locking order mountlist_lock -> mnt_unmounting.
...
Set IMNT_GONE early to protect against concurrent dounmount()
and vfs_busy() before the mountpoint is removed from
mount list.
2013-04-28 21:34:31 +00:00
christos
8c31c1cdbd
fix warning
2013-04-27 20:13:16 +00:00
christos
28b4efbeda
turn off debugging
2013-04-27 18:17:37 +00:00
christos
d4724c689e
Add debugging info.
2013-04-27 17:13:50 +00:00
mlelstv
060c06be14
Revert change that allowed rw_tryenter(&lock, RW_READER) to recurse
...
for vfs_busy(). This is no longer necessary.
2013-04-27 08:12:34 +00:00
mlelstv
df5cf9d7a4
Correct umount semantics to return EBUSY when a filesystem is busy
...
instead of failing filesystem operations with EBUSY when attempting
an umount.
This fixes kern/38141.
2013-04-26 22:27:16 +00:00
msaitoh
50699a2b3c
Fix memory leak on the following cases when device attached or detached:
...
- No one open drvctl.
- kmem_alloc() failed in devmon_insert().
XXX pullup to both netbsd-5 and netbsd-6.
2013-04-26 09:04:43 +00:00
yamt
c7784f4d97
- make debug size check more strict
...
- add comments about debug features
2013-04-22 13:22:25 +00:00
yamt
470409eadf
whitespace
2013-04-22 13:13:20 +00:00
uebayasi
38d7d2cac5
Whitespace.
2013-04-21 02:44:15 +00:00
christos
ea4869ad3c
revert previous, you can run on mips 64 bit binaries with a 32 bit kernel.
2013-04-20 22:28:58 +00:00
christos
c91b1193e7
don't attempt to load elf64 on 32 bit machines
2013-04-20 18:04:41 +00:00
para
9c44086af0
addresses PR/47512
...
properly return NULL for failed allocations not 0x8 with size checks enabled.
2013-04-16 21:13:38 +00:00
skrll
38fd17d91a
Fix PAX build.
2013-04-09 07:39:01 +00:00
skrll
94a59cc1db
Remove some set but unused variables
2013-04-08 21:12:33 +00:00
chs
3f6811bc27
don't overwrite the CTF info with the symbol table.
2013-04-07 00:49:45 +00:00
rmind
2540bef8df
xc_highpri: fix assert.
2013-04-07 00:31:40 +00:00
martin
9d0957eba7
Provide binary compatibility for architectures that (erroneously) had
...
a larger MAXPARTITIONS value (and thus larger struct disklabel).
2013-04-04 12:51:39 +00:00
christos
11c04fdfa0
undo previous and move the test to the timeout function since 0,0 means
...
disable timer/interval.
2013-04-01 16:37:22 +00:00
christos
7f7fe0a2eb
do the timeout test centrally.
2013-04-01 15:46:46 +00:00
martin
cf1df18e92
ts2timo: return ETIMEDOUT instead of failing an assertion when the
...
calculated difference to the target time is zero.
2013-04-01 12:31:34 +00:00
christos
2c8702f59e
instead of doing the tests twice fix the *fix() routines to return ETIMEDOUT
...
if seconds are negative. Accorting to TOG, this is not an error as linux
claims. Also make an assert stricter.
2013-03-31 16:46:29 +00:00
christos
463c93b4e7
always return immediately on error, and if we passed negative seconds,
...
return with 0.
2013-03-31 16:45:06 +00:00
martin
573f2396f8
Move clock_gettime1() to subr_time.c (which is included in rump kernels)
2013-03-29 10:34:12 +00:00
christos
698e9d4d95
regen
2013-03-29 01:10:13 +00:00
christos
4cec95f0ea
Centralize the computation of struct timespec to the int timo.
...
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.
2013-03-29 01:08:17 +00:00
tls
88ad351cb1
Re-fix 'fix' for SA-2013-003. Because the original fix evaluated a flag
...
backwards, in low-entropy conditions there was a time interval in which
/dev/urandom could still output bits on an unacceptably short key. Output
from /dev/random was *NOT* impacted.
Eliminate the flag in question -- it's safest to always fill the requested
key buffer with output from the entropy-pool, even if we let the caller
know we couldn't provide bytes with the full entropy it requested.
Advisory will be updated soon with a full worst-case analysis of the
/dev/urandom output path in the presence of either variant of the
SA-2013-003 bug. Fortunately, because a large amount of other input
is mixed in before users can obtain any output, it doesn't look as dangerous
in practice as I'd feared it might be.
2013-03-28 18:06:48 +00:00
christos
fd5d831f1e
downgrade an error to debug.
2013-03-24 22:06:37 +00:00
plunky
5ec364d4d9
C99 section 6.7.2.3 (Tags) Note 3 states that:
...
A type specifier of the form
enum identifier
without an enumerator list shall only appear after the type it
specifies is complete.
which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).
(ok elad@)
2013-03-18 19:35:35 +00:00
para
82aa1e7edd
calculate vnode cache size based on the resource it gets allocated from
...
this stops setting kern.maxvnodes to high so it exhausts available space in kmem
http://mail-index.netbsd.org/tech-kern/2013/03/08/msg015095.html
2013-03-18 13:36:21 +00:00
gdt
de83e1acfd
Add comment questioning lock asymmetry.
2013-03-14 19:13:17 +00:00
yamt
37fc08318c
revert rev.1.37 for now.
...
PR/47634 from Ryo ONODERA.
while i have no idea how this change can break bge,
i don't have hardware and/or time to investigate right now.
2013-03-12 23:16:31 +00:00
pooka
83a2a556bf
In pool_cache_put_slow(), pool_get() can block (it does mutex_enter()),
...
so we need to retry if curlwp took a context switch during the call.
Otherwise, CPU-local invariants can get screwed up:
panic: kernel diagnostic assertion "cur->pcg_avail == cur->pcg_size" failed
This is (was) very easy to reproduce by just running:
while : ; do RUMP_NCPU=32 ./a.out ; done
where a.out only calls rump_init(). But, any situation there's contention
and a pool doesn't have emptygroups would do.
2013-03-11 21:37:54 +00:00
pooka
55246528e8
At least pretend to not leak memory in sysctl initialization.
...
This commit message would be longer if it included opinions about
sysctllog vs. CTLFLAG_PERMANENT ...
2013-03-10 17:55:42 +00:00
christos
38cec6f03a
more detailed/consistent error messages.
2013-03-10 04:25:06 +00:00
apb
f92c0e46b0
Properly differentiate between infinite timeout and zero timeout.
...
Local variable timo = -1 is used for zero timeout (non blocking mode).
Fixes PR 47625 from anthony.mallet
2013-03-08 09:32:59 +00:00
apb
7c5d63e1c6
In the timeout passed to sigtimedwait, NULL means an infinite timeout,
...
and {.tv_sec = 0, .tv_nsec=0} means do not block at all. Add a comment
saying so. The code incorrectly treats them both as an infinite timeout,
and that is not fixed by this commit.
2013-03-08 08:48:38 +00:00
apb
90c6b7a188
also comment on the meaning of timo=0 for cv_timedwait_sig.
2013-03-08 08:36:37 +00:00
apb
e6dad85522
Add comments saying that a cv_timedwait and sleepq_block interpret
...
timo = 0 as an infinite timeout. This is already documented in the
cv_timedwait(9) man page, and there is no sleeq_block(9) man page.
2013-03-08 08:35:09 +00:00
pooka
1578b4b049
make rump kernel syscalls through curproc->p_emul instead of rump_sysent
2013-03-07 19:17:46 +00:00
matt
17f82b93c2
Add a kern.configname sysctl object.
2013-03-07 18:02:54 +00:00
yamt
69f842b1d9
- use scaled calculations for avgcount
...
- sched_balance: account lwp which is currently running
- sched_balance: skip cpus w/o migratable lwps
2013-03-06 11:25:01 +00:00
yamt
0f92d1cdeb
update comments
2013-03-06 11:20:10 +00:00
christos
e5a1aef5b9
remove extra chatty messages
2013-03-05 03:04:00 +00:00
christos
2a0d04a751
more debugging
2013-03-03 16:55:26 +00:00