Commit Graph

3469 Commits

Author SHA1 Message Date
yamt 059404deaf bremfree needs bqueue_slock held. assert it. 2003-09-07 11:57:43 +00:00
manu 83798d2727 Correctly check Mach-O fat header so that fat binaries get launched. 2003-09-07 11:16:59 +00:00
jdolecek 671a5964fa one more sc_pgid change 2003-09-07 09:31:47 +00:00
jdolecek 0eb65eb6f2 for logsoftc.sc_pgid, use negative value for process group and positive
for process ID, to match e.g. how socket code sets things up
2003-09-07 09:30:20 +00:00
christos 1dc335c017 SA_SIGINFO changes. 2003-09-06 22:03:09 +00:00
jdolecek 465f95a5ec Embed information about kernel version and some of used kernel options
into compiled LKMs. Check this information when LKM is loaded into kernel
and refuse LKMs not matching currently running kernel. Provide LMFORCE
ioctl to skip this check for those feeling adventurous.

as discussed on tech-kern@, thanks to feedback from Bill Studenmund and others
2003-09-06 19:08:53 +00:00
wrstuden d9f694842d Adjust struct sockbuf and sorflush() so that we don't zero out
every field; some need to stay around.

Fixes a bug where by calling shutdown() on a socket with knotes
will cause the kernel to panic when the kernel closes the socket.
Other access, such as calling kevent() may also trigger the panic.

Debugged with help from Jason and Allen. Patch reviewed by same plus
Itojun and Matt Thomas.

This problem seems to be the same one that FreeBSD saw in their PR
number 54331.

Kernel version _not_ bumped as we will piggyback the bump earlier today.
2003-09-04 16:44:05 +00:00
matt 12588bd8b6 Adapt to the new calling conventions of unp_connect2 2003-09-04 04:33:49 +00:00
itojun 119a24cbdd clarify comment on m_cat(). 2003-09-04 04:10:32 +00:00
matt d7506a7151 Fix typo. 2003-09-03 22:20:34 +00:00
matt ecf95073f1 Change the behavor of AF_LOCAL connect() to sleep until the server has
accepted the connection.  This can prevent a client from overwhelming a
server.
2003-09-03 21:30:12 +00:00
ragge 412d4e7d1b Use correct basic types when addresses are given in function calls. 2003-09-03 11:36:52 +00:00
ragge 76d3da2d68 Do correct pointer casts. 2003-09-03 11:13:14 +00:00
ragge d13eca2ef5 long -> unsigned long. 2003-09-03 10:55:22 +00:00
drochner 98cfd7bc8b also feed getdents/readdir data to KTRACE 2003-09-02 12:31:35 +00:00
yamt b3d9c9a976 remove an obsolete comment. pointed by enami@ 2003-09-01 12:13:55 +00:00
fvdl 6c4d7c0fee Fix error in previous commit: the first vaddr_t argument to uvm_km_suballoc
is in/out, so it must be zeroed out before passing it, otherwise the
uvm_km_suballoc call would get stack garbage, and fail randomly.
2003-08-31 12:59:05 +00:00
ragge b20fe4bd92 Do not cast a pointer to a pointer with different basic type when given
as function argument. It makes assumptions about pointer internals
that do not necessarily have to be true.
2003-08-30 07:54:32 +00:00
enami 02a34f5f66 Use VM_DEFAULT_ADDRESS as a hint to map sigcode instead of an equivalent
value of !TOPDOWN_VM case.
2003-08-29 13:29:32 +00:00
junyoung d532b6f4e6 Expand NEW_VMCMD() macro to a real function new_vmcmd() for the
non-debugging case as well, rather than expanding it inline. This saves
a bunch of kernel bits, e.g. 4kB from GENERIC on i386.
2003-08-29 01:44:02 +00:00
enami 2340975258 Use vm_map_{min,max}() rather than accessing struct vm_map.header.{start,end}
directly.
2003-08-28 14:54:32 +00:00
manu e3ce76f536 Added a malloc freelist sanity check function, for debugging purposes 2003-08-26 21:48:53 +00:00
cb 5f734a1850 fix a race condition between path resolution in userland
and the subsequent namei(): inform the kernel portion of
valid filenames and then disallow symlink lookups for
those filenames by means of a hook in namei().
with suggestions from provos@

also, add (currently unused) seqnr field to struct
systrace_replace, from provos@
2003-08-25 09:12:42 +00:00
atatat 2768d776d4 Use pfind() in proc_sysctl() to find the target process instead of a
home-grown routine.  Remove defcorenamelen, since it's not used
anywhere.
2003-08-24 19:20:40 +00:00
chs 939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
itojun e5255bfd47 make proc.curproc.* check more strict. atatat 2003-08-24 06:11:19 +00:00
junyoung d366db246b TNF & remove trailing spaces. 2003-08-22 02:01:32 +00:00
yamt a7f9b1d8e0 don't make zero-sized mappings. 2003-08-21 15:17:03 +00:00
yamt 7847549d35 use LSDEAD instead of SDEAD for lwp state. 2003-08-20 14:04:00 +00:00
yamt 611b0b9f15 don't use a space char in wmesg.
it makes outputs of SIGINFO confusing.
2003-08-20 13:54:48 +00:00
yamt be09ed029e fix indent. 2003-08-20 13:50:53 +00:00
dsl 40bac1084c When writing the disklabel:
- Write label to all netbsd (type 169) mbr partitions (even if they don't
  already have a label).
- Update any label found in sector LABELSECTOR and sector 0.
Latter change makes DIOCWDINFO (etc) work on raidframe (fixing bin/22529).
2003-08-19 11:49:24 +00:00
simonb bc73aa40f5 Return NULL instead of 0 for functions that return pointers.
Sprinkle some KNF whitespace.
2003-08-15 02:59:32 +00:00
itojun 95758d3554 avoid oldlenp mixup (in-kernel pointer and userland pointer). from atatat 2003-08-14 05:14:52 +00:00
fvdl 8655b27bf5 SA fixes from Stephan Uphoff. Quoting him:
The patch below (hopefully) improves some signaling problems
found by Nathan.

It also contains some cleanup of the sa_upcall_userret() function
removing any sleep calls using PCATCH.

Unblocked threads now only use an upcall stack after they
acquire the virtual CPU.
This prevents unblocked threads from stealing all available
upcall stacks.


Tested by Nick Hudson.
2003-08-11 21:18:18 +00:00
dsl 3530472a3b Rework VTIME calculations so that they don't hit numeric overflow (ok now
for hz < ~200kHz).  Old code failed VTIME > 214 even with hz=100.
Fixes kern/12285.
2003-08-11 10:49:06 +00:00
pk 9f987d0ac0 Workaround to prevent a lockup in pipelock() in the case that signals are
pending while we must wait for the lock.
2003-08-11 10:24:41 +00:00
yamt a01f6f4ea5 - make this a bit MP friendly.
(although no actual changes under the kernel lock)
- remove a test that isn't meaningful anymore.
2003-08-08 20:19:56 +00:00
yamt 1f08924c29 arrange namecache lru before vget (and releasing namecache_slock)
since our namecache entry can go away during we're sleeping on the vnode.

the bug pointed by enami tsugutomo.
tested by Matthias Scheler.
PR/22363.
2003-08-08 20:18:19 +00:00
christos c3c2f78f98 GC: exec_foo_setup_stack; use exec_setup_stack, and provide a way for
emulations to override it.
2003-08-08 18:53:13 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
jonathan 60cc8ce6f9 (FAST_IPSEC): attach PFKEY socket domain when either (KAME) IPSEC or
FAST_IPSEC is configured. Likewise for sysctl.
2003-08-06 20:34:35 +00:00
jonathan 333cceb477 (FAST_IPSEC): Pull in option header-test for FAST_IPSEC (and IPSEC).
If FAST_IPSEC is configured, attach fast-ipsec transforms after
autoconfiguring devices (perhaps including crypto hardware)
but before starting up network-device packet input.
2003-08-06 20:30:38 +00:00
manu d41feb61a6 Make elf{32|64}_check_header public, as it will be used by irix_elf32_probe.
While we are there, cut to 80 chars, and ANSIfy prototypes
2003-08-06 01:02:26 +00:00
drochner a7a51432eb sy_narg isn't very useful where an argument can span two register_t slots
(as off_t on 32-bit platforms)
see PR kern/22297 by myself
2003-08-04 18:53:06 +00:00
he 69f1e70775 On second thought, callout_stop() should not clear the INVOKING flag. 2003-08-03 19:14:59 +00:00
manu 06da3d32ba Build again with MALLOCLOG 2003-08-02 07:08:02 +00:00
yamt 428f108569 remove remaining v_id. 2003-07-31 15:43:06 +00:00
yamt 2dc3c0a90c for NCHASH, obtain bits from the vnode pointer as well
to achieve a better hash distribution.
2003-07-31 15:14:08 +00:00
yamt 378afd773a when casting a pointer to an integer,
cast it to uintptr_t so that 64-bit archs will be happy.

pointed by Juergen Hannken-Illjes.
2003-07-31 15:13:05 +00:00