Commit Graph

7913 Commits

Author SHA1 Message Date
martin
c5ba0125cf Enhance a panic message slightly 2011-08-27 19:52:22 +00:00
reinoud
7c13e88609 Also fix DPRINTF()'s for DEBUG_EXEC 2011-08-27 18:11:48 +00:00
reinoud
14ad4e1152 Fix DPRINTF()'s missing the extra parenteses 2011-08-27 18:07:10 +00:00
reinoud
f64aeb0d94 In execve1(), don't assume VM_MIN_ADDRESS is 0 for PIE executables. 2011-08-27 17:53:21 +00:00
reinoud
4db0d938ff Enhance EXEC_DEBUG by also printing the UVM commands 2011-08-27 17:51:38 +00:00
christos
262ad41ded Add an optional pglist argument to uvm_obj_wirepages, to be
filled with the list of pages that were wired.
2011-08-27 09:11:52 +00:00
jmcneill
1501db31c9 defflag DEBUG_EXEC 2011-08-26 19:07:13 +00:00
jmcneill
6051688a5b Fix a typo in r1.243: test for STACKALIGN not STACKLALIGN:
"If STACKALIGN is defined, use it instead of ALIGN.  Some arches need a
 stack more aligned that ALIGN will give."
2011-08-26 12:52:01 +00:00
reinoud
a6fda0ea96 Provide a better fix for the checks 2011-08-26 09:29:16 +00:00
reinoud
a6debd8fb7 Change aprint_verbose() to a normal printf() surrounded by #ifdef DIAGNOSTIC 2011-08-26 09:13:08 +00:00
reinoud
e5fe2f455a Fix check for VM_MIN_ADDRESS since it doesn't need to be a constant 2011-08-26 09:07:48 +00:00
christos
012b2b9c3c fix compilation for VM_MIN_ADDRESS == 0 2011-08-26 06:56:11 +00:00
reinoud
336984324e Move debug -> verbose 2011-08-25 19:54:30 +00:00
reinoud
f6a2add8fe On a verbose kernel boot show why executables are denied due to their start
adresses. This will hardly ever occure in real-life.
2011-08-25 19:14:07 +00:00
dyoung
64311e1f9d Introduce a couple of new constants, VMEM_ADDR_MIN (the least possible
address in a vmem(9) arena, 0) and VMEM_ADDR_MAX (the maximum possible
address, currently 0xFFFFFFFF).  Modify several boundary conditions so
that a vmem(9) arena can allocate ranges including VMEM_ADDR_MAX.
Update documentation and tests.

These changes pass the tests in sys/kern/subr_vmem.c.  To compile the
and run the test program, run "cd sys/kern/ && gcc -DVMEM_SANITY -o
subr_vmem ./subr_vmem.c && ./subr_vmem".
2011-08-23 22:00:57 +00:00
christos
28ab15e044 don't use lwp_setprivate in fork, but copy the private lwp member directly
because userland might have messed with the TLS register without letting
the kernel know. This fixes fork() on amd64. Thanks chuq!
2011-08-23 13:01:25 +00:00
enami
39dd5517da Remove return statement which can't be reached. 2011-08-22 22:12:34 +00:00
enami
9d6dd8515a When both nanoseconds fields of futimens/utimensat call are set
to UTIMES_NOW, act as if NULL is passed to second argument, i.e.,
do same permission check and set exactly same value to both access
and modification time.
2011-08-22 22:09:07 +00:00
manu
bf2e0cc4e9 Fix utimes/futimes after utimensat/futimens addition 2011-08-18 19:34:47 +00:00
manu
91009c117a Missing bit in previous commit: do_sys_utimens prototype in the right
place.
2011-08-17 09:29:59 +00:00
martin
e9d191bffa add missing prototype 2011-08-17 08:31:27 +00:00
manu
86bd0b1953 regen 2011-08-17 07:26:16 +00:00
manu
5b61306f9b Add futimens(2) and part of utimnsat(2) 2011-08-17 07:22:33 +00:00
dyoung
a32744d895 Protect against bugs by using __strict_weak_alias() for
bus_space_is_equal() and bus_space_handle_is_equal().
2011-08-16 23:32:15 +00:00
yamt
64916d590e vn_close: add an assertion 2011-08-16 22:33:38 +00:00
christos
b866ba6e1a fix sign-compare warnings 2011-08-14 12:37:09 +00:00
christos
ec97828f5a Always provide a meaningful short name for the kobj in the error message,
as well as the function name and the linenumber, without extra line feeds.
2011-08-13 21:04:05 +00:00
riastradh
f9b524691c Handle absolute symlinks to the root.
Fixes panic on `ln -s / foo && cd foo' found by ober by trying to run
wine.

ok dholland
2011-08-13 19:40:02 +00:00
dholland
8225acd644 Revert previous, it breaks nullfs. (And I guess there are no tests for
nullfs?)
2011-08-10 05:42:32 +00:00
dholland
9c377dcfe1 Fail namei immediately if searchdir is unlinked / has been rmdir'd.
Do this by checking if v_size == 0. Should fix PR 44658 (and PR 32661).
2011-08-09 23:46:05 +00:00
dholland
8d4d585132 Include missing part of previous commit to this file. (sigh) 2011-08-09 23:16:17 +00:00
dyoung
e04563cb82 Correct a comment on config_found_sm_loc(). 2011-08-09 21:07:14 +00:00
dholland
943b2f8eb3 Simplify handling of slashes. Provides a proper fix for PR 44961. 2011-08-09 18:37:56 +00:00
hannken
d5d9d4928f No need to lock the selcluster in selscan() if either
NO_DIRECT_SELECT is defined or all polls return an event.
2011-08-09 06:36:51 +00:00
dyoung
f77a583767 Miscellaneous mbuf changes:
1 Add some protection against double-freeing mbufs in DIAGNOSTIC kernels.

2 Add a m_defrag() that's derived from
  sys/dev/pci/if_vge.c:vge_m_defrag().  This one copies the packet
  header.

3 Constify m_tag_find().
2011-08-08 19:10:33 +00:00
manu
c817bc5d19 regen 2011-08-08 12:17:27 +00:00
manu
9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
enami
a154f93a37 Bounds process's stack size with max_stack_size so that 32bit
binary works regardless of stack size limit setting.
2011-08-08 06:30:43 +00:00
rmind
e71c0035e7 - Add an argument to kcpuset_create() for zeroing.
- Add kcpuset_atomic_set(), kcpuset_atomic_clear() and kcpuset_merge().
2011-08-07 21:38:32 +00:00
rmind
501dd321fb Remove LW_AFFINITY flag and fix some bugs affinity mask handling. 2011-08-07 21:13:05 +00:00
rmind
a0ffc02ab8 Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN. 2011-08-07 14:03:15 +00:00
rmind
52b220e91d Add kcpuset(9) - a reworked dynamic CPU set implementation for kernel.
Suitable for use during the early boot.  MD and other implementations
should be replaced with this interface.

Discussed on: tech-kern@
2011-08-07 13:33:01 +00:00
hannken
7403908422 Fix the races of direct select()/poll():
- When sel_do_scan() restarts do a full initialization with selclear() so
  we start from an empty set without registered events.  Defer the
  evaluation of l_selret after selclear() and add the count of direct events
  to the count of events.

- For selscan()/pollscan() zero the output descriptors before we poll and
  for selscan() take the sc_lock before we change them.

- Change sel_setevents() to not count events already set.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>

Should fix PR #44763 (select/poll direct-set optimization seems racy)
       and PR #45187 (select(2) sometimes doesn't wakeup)
2011-08-06 11:04:25 +00:00
mbalmer
d1912e7839 Do not not look for modules in the current working directory first. This is
to prevent from accidentally loading ./module.kmod when we actually wanted to
load module from the system module area.

To load a module from a filesystem path, the module name must contain at
least on path separator character (/), to load a module from the system
module areas, the name must not contain a path separator character:

modload ./mymod.kmod      # loads mymod.kmod from the curren directory
modload mymod             # loads mymod.kmod from the system module area
2011-08-06 08:11:09 +00:00
jmcneill
b993a69649 Re-add include of "drvctl.h", as its removal a year and a half ago broke
drvctl DRVGETEVENT.
2011-08-02 21:23:24 +00:00
christos
3bcfc66d27 Add SuSE note 2011-08-02 16:44:01 +00:00
he
7508af7127 Need to include <sys/evcnt.h> explicitly to build this on at least amiga. 2011-08-01 15:26:31 +00:00
drochner
ee07511cd0 modify parsing of device names so that it can deal with names which
have numbers is it, eg "i915drm*"
2011-08-01 10:33:26 +00:00
uebayasi
7a93829794 Revert previous; s/kmem(9)/uvm_km(9)/ and comment why done so. Per request
from rmind@.
2011-07-31 13:41:30 +00:00
christos
44968cba76 Add an implementation of passive serialization as described in expired
US patent 4809168. This is a reader / writer synchronization mechanism,
designed for lock-less read operations.
2011-07-30 17:01:04 +00:00