rmind
3de401ae19
Make sched_getrq() inline (gcc does not optimize it), avoids call.
2009-02-17 22:00:14 +00:00
ad
81525af92d
Fix min/max confusion that causes a problem with DEBUG on some
...
architectures. Independently spotted by yamt@. /brick ad
2009-02-17 21:54:30 +00:00
enami
fb8633d4a9
Simplify the code; we already have a hint to decide which string to copy.
...
(And at least gcc generates better code.)
2009-02-15 03:52:49 +00:00
enami
60ebbc4e81
The knote objects attached by peer will still be linked in our list
...
if we are closed before the peer. So, remove them. It didn't matter
when pipe objects are directly returned to pool, but nowadays they
are cached.
2009-02-15 00:07:54 +00:00
christos
24587463c9
remove 2038 comment
2009-02-14 20:45:29 +00:00
christos
bd1260c5ff
from enami: Only apply rootdir changes if the chroot dir != /
2009-02-14 17:06:35 +00:00
christos
78a45c73e9
PR/40634: Christoph Badura: "chroot / /sbin/mount" shows only / as mounted
2009-02-14 16:55:25 +00:00
pooka
3e656734b8
cosmetic: don't print empty line at end of init_sysent.c
2009-02-14 16:21:23 +00:00
apb
0cc72e51ac
Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
...
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
christos
160a37667a
Unbreak ssp kernels. The issue here that when the ssp_init() call was deferred,
...
it caused the return from the enclosing function to break, as well as the
ssp return on i386. To fix both issues, split configure in two pieces
the one before calling ssp_init and the one after, and move the ssp_init()
call back in main. Put ssp_init() in its own file, and compile this new file
with -fno-stack-protector. Tested on amd64.
XXX: If we want to have ssp kernels working on 5.0, this change needs to
be pulled up.
2009-02-12 18:24:18 +00:00
enami
d5b0f6df4c
s/NOFOLLOW/FOLLOW/ in NDINIT so that it matches actual behavior
...
which is controlled by NO_FOLLOW bit passed in 2nd arg of vn_open().
2009-02-11 00:32:45 +00:00
enami
7efd6dbe73
Make module (auto)loading under chroot envrionment actually work:
...
- NOCHROOT flag must be assigned to different bit from TRYEMULROOT
since the code expected to be executed is in the else clase of
if (flags & TRYEMULROOT).
- Necessary variables aren't set.
2009-02-11 00:19:11 +00:00
rmind
db4ca04011
dosetrlimit: remove the checks which are no longer needed since rlim_t
...
is unsigned again. Hi <christos>!
2009-02-09 11:13:20 +00:00
pooka
8e52b87ec3
Don't try to fd_putfile() descriptors we didn't manage to fd_getfile().
...
Fixes local DoS panic described in kern/40570.
2009-02-08 16:38:12 +00:00
enami
e3b99073fb
Previous code ususally works since compiler won't put gap between
...
those struct members but there is no reason to rely on that.
While here, I rewrite the loop using an usual idiom. It shaves
both source and object code.
2009-02-06 23:56:26 +00:00
enami
e1be06d405
Instead of missing NULL check in pipe_create, let the pipe_ctor to wait
...
on buffer allocation. The other allocation is simply an optimization,
so leave it as is.
2009-02-06 23:04:57 +00:00
enami
60b229d2eb
Use same expression to decide to use pool cache or not in both
...
kmem_alloc/free.
2009-02-06 22:58:49 +00:00
dyoung
b4f3367acd
Extract a subroutine pmf_device_resume_descendants() from
...
pmf_device_resume_subtree(), for re-use later.
2009-02-06 01:19:33 +00:00
enami
e6aec5115a
Make revoke(2) works as before:
...
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
then-clause and else-clause is swapped. Since then, revoke(2) fails
if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
applied to non-device file and drops kernel into ddb.
2009-02-05 13:37:24 +00:00
ad
2015b56df5
Warn once and no more about backwards monotonic clock.
2009-02-04 21:29:54 +00:00
ad
3c32363107
PR kern/36183 problem with ptrace and multithreaded processes
...
Fix the crashy test case that Thor provided.
2009-02-04 21:17:39 +00:00
haad
07b62696b9
Add support for loading pseudo-device drivers. Try to autoload modules from
...
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.
For now only dm drivervcan be loaded, other pseudo drivers needs more work.
Ok by ad@.
2009-02-02 14:00:27 +00:00
enami
ad526ef003
- An errno is missed in rev. 1.11 while converting return statement to
...
goto statement.
- A local variable still in use is intercepted in rev. 1.6. Define and
use variable of its own.
2009-02-02 11:19:29 +00:00
yamt
5e978bf3b6
remove a non-ascii comment.
2009-02-02 00:10:18 +00:00
yamt
e1146d7ee9
back to malloc for now as wapbl_biodone is called by softint.
2009-02-02 00:07:06 +00:00
ad
c26577a1b0
Apply kmem patch posted to tech-kern.
...
- Add another level of caches, for max quantum cache size -> PAGE_SIZE.
- Add debug code to verify that kmem_free() is given the correct size.
2009-02-01 18:51:07 +00:00
ad
58fb9db514
Apply pipe patch posted to tech-kern, slightly updated:
...
- Cache kva.
- Convert to use mutex_obj_alloc().
- Make better use of pool_cache.
Also:
Disable direct transfers for the moment. I believe there may be a bug that
can cause transfers to stall when switching between direct/buffered access.
I think this has most recently been run into on 'denver' but I have seen it
as far back as 3.1.
(As an aside, direct is a not a clear win on modern systems with large cache
and high TLB invalidation overhead. Particularly so on MP systems, although
micro benchmarks may report otherwise because they typically do not tax the
system. Anyone want to write a decent benchmark?)
2009-02-01 18:23:04 +00:00
yamt
fc774e4e61
settime1: fix a bug i introduced when i made l_stime use monotonic time.
...
from Matthias Drochner on tech-kern@. PR/40511 from Martin Husemann.
2009-01-31 15:53:36 +00:00
yamt
740c75e25d
- malloc -> kmem_alloc
...
- kill WAPBL_UVM_ALLOC.
- kill wapbl_blk_pool to reduce #ifdef.
2009-01-31 09:33:36 +00:00
ad
697e4adf70
timer_intr: hold proc_lock across the loop, otherwise the process we are
...
about to signal could disappear.
2009-01-30 23:11:27 +00:00
pooka
42356a10b5
Quote PR number in XXX comment. No functional change.
2009-01-30 21:16:51 +00:00
agc
276ab299a6
Fix a tyop in the previous commit
2009-01-30 04:09:35 +00:00
drochner
338f42d97e
put back a range check in setrlimit() for now
...
(thanks to Andrew Doran for remembering)
rlim_t _should_ be unsigned, but this needs more work
2009-01-29 22:27:23 +00:00
ad
a9743c2461
- Allow creating timeshard kthreads. To be used to fix the RAIDframe
...
parity rewrite issue.
- Create kthreads in the SCHED_RR class by default, not SCHED_FIFO.
2009-01-29 22:00:26 +00:00
rmind
a487ff992f
sched_pstats: add few checks to catch the problem. OK by <ad>.
2009-01-28 22:59:46 +00:00
reinoud
69f4b23bdc
Don't claim its an ISO partitioning scheme too early in the label. An MBR
...
might me there instead.
2009-01-28 15:26:28 +00:00
njoly
f024404c50
Do not call put_type() but use copyout() when returning the message
...
segments to the user.
ok by rmind.
2009-01-28 00:59:03 +00:00
njoly
122f627e90
Make msgsnd(2)/msgrcv(2) fail with EINVAL for messages larger than
...
SSIZE_MAX. Adjust man pages accordingly.
ok by christos.
2009-01-26 13:08:48 +00:00
pooka
89fa47c428
Tag a few more socket syscalls with RUMP:
...
recvmsg, sendmsg, recvfrom, getpeername, getsockname, sendto,
shutdown, socketpair
2009-01-26 12:20:05 +00:00
yamt
f4fa6bbef9
bump VMEM_HASHSIZE_MAX from 8192 to 65536.
2009-01-25 13:08:56 +00:00
rmind
5a84a46b8c
mutex_vector_enter: few predictions.
2009-01-25 04:45:14 +00:00
rmind
66063c53a6
Set l_psid to PS_NONE for lwp0 (consistency change).
2009-01-24 22:42:32 +00:00
rmind
6d73ddd355
Revert path of modules back to "/stand".
2009-01-24 22:14:44 +00:00
rmind
f0e51651e4
Change path to kernel modules from "/stand" to "/kernel".
...
Needs to go in before 5.0. Proposed on <tech-kern>.
2009-01-24 00:29:12 +00:00
pooka
06abc8c3f9
Remove debug print -- this is what happens when there's several
...
hours between implementation and commit.
2009-01-23 19:29:38 +00:00
pooka
c7e5a8be4e
Remove the "int *error" parameter from rump syscalls. Instead use
...
rumpuser_seterrno() to set the errno for the caller. This makes
the difference between real and rump syscalls way less intrusive
in calling code.
2009-01-23 19:27:18 +00:00
pooka
f6724ea74f
solock() in compat code error branch to avoid panic
2009-01-23 15:40:19 +00:00
rmind
9e43fad609
sys__pset_bind: obviously, sched_takecpu() should take "t" LWP, not "l".
2009-01-23 13:58:08 +00:00
pooka
8b32829eeb
Change VMEM_HASHSIZE_INIT from 1 to 128. This mainly benefits
...
quick-running or non-threaded rump jobs, where the rehash algorithm
does not have a chance to run. For other cases it doesn't make
much difference, since the size will grow or decrease when the
rehash algorithm runs for the first time (t=10*hz currently).
2009-01-23 13:45:06 +00:00
jmmv
f084134ae9
Initialize SYMTAB_SPACE ksyms during ksyms_init. Per PR port-evbarm/40311.
2009-01-23 09:22:25 +00:00