Commit Graph

3469 Commits

Author SHA1 Message Date
jonathan 460c06b905 Move the initialization of the crypto framework from the userland
pseudo-device to init_main(), so the framework is ready for
registration requests at autoconfiguration time.

Thanks to Quentin Garnier for confirming the change was required, and
for testing a similar fix.
2003-07-30 18:45:31 +00:00
yamt cc104d0635 eliminate v_id. 2003-07-30 12:10:57 +00:00
yamt b0cdf0a26d maintain the list of namecaches attached to the vnode.
it makes vnodes freeable.
2003-07-30 12:09:46 +00:00
matt 79fccc7527 Improve _lwp_wakeup so when it wakes a thread, the target thread thinks
ltsleep has been interrupted and thus the target will not think it was
a spurious wakeup.  (this makes syscalls cancellable for libpthread).
2003-07-28 23:35:20 +00:00
jdolecek b178c0d519 back rev 1.63 (the linux hack) off - no compat specific code
in generic code, please

we need to massage the passed linux cmsg anyway, linux uses different
alignment for CMSG_DATA on at least some architectures
2003-07-24 07:30:48 +00:00
itojun f874ab05b3 backout previous, there was a comment on LINUX_SOL_SOCKET=1 2003-07-23 22:17:54 +00:00
itojun 8e4006214d #define LINUX_SOL_SOCKET 1, so that we can answer "what the hell is this 1?"
at ease.
2003-07-23 21:42:31 +00:00
christos 8c26e4c591 From Todd Vierling: Accept level == 1 for linux compat. 2003-07-23 19:24:48 +00:00
dsl cfb2dd92f0 Fix (and simplify) interaction between check_pty() and pty_maxptys().
Lock setting/clearing of tp->t_oproc to guarantee concurrent opens can't
both suceed and that code in tty.c can't get a NULL t_oproc if the value
is re-read after being checked.
There are still MP issues with pt_flags, pt_send and pt_unctl.
Maybe problems that require TTY_LOCK() to be taken before calling std tty
functions.
2003-07-23 13:10:28 +00:00
nathanw 6b22e87c69 Whitespace. 2003-07-21 22:57:46 +00:00
nathanw f0dee7380d KNF a bit. 2003-07-21 19:21:12 +00:00
he ddef043b97 Temporarily introduce CALLOUT_INVOKING, callout_invoking() and callout_ack()
to make users of the callout facility able to cooperate to work around the
race caused by the callout code lowering interrupt priority level when
invoking callout handlers, something which allows other code to run before
the callout handler gets to it's spl*() call.

This is to enable the workaround for the TCP code found in PR#20390 to be
applied.

This should be backed out once a more comprehensive fix can be put in
place.
2003-07-20 16:25:57 +00:00
fvdl e4f5334745 Unlock kq_lock in the case of a timeout. 2003-07-18 17:34:07 +00:00
matt 0c7a583f3a Add support for storing the priority mask in sched_whichqs in MSB order
(enabled by defining __HAVE_BIGENDIAN_BITOPS in <machine/types.h>).  The
default is still LSB ordering.  This change will allow the powerpc MD
implementations of setrunqueue/remrunqueue to be nuked.
2003-07-18 01:02:31 +00:00
fvdl 091ff13b7b Move nstacks assertion and stack assignment to an earlier time, before
the sa_vp_repossess call. From Stephan Uphoff.
2003-07-17 20:34:41 +00:00
fvdl 84078486a4 Return the value of 'error' instead of always 0. From Christian Limpach. 2003-07-17 19:05:30 +00:00
fvdl 4bd1a8dcf8 Changes from Stephan Uphoff to patch problems with LWPs blocking when they
shouldn't, and MP.
2003-07-17 18:16:58 +00:00
dsl 0e2308c0c0 Add ktrace of env and args during exec. 2003-07-16 22:42:47 +00:00
lukem 09b3191490 add missing __KERNEL_RCSID() 2003-07-14 14:59:01 +00:00
dsl d38f6f3115 MI code to read disklabels from mbr disks. 2003-07-07 13:28:48 +00:00
thorpej 3ce3399c7b Add a dev_propdb to hold device properties. Properties are already being
used in an ad hoc way by a couple of eval board ports, so might as well
tidy it up a little and add some formality.  (And, yes, I need to use it
in another eval board port.)
2003-07-04 00:24:29 +00:00
ragge ef18f28fe4 Make somaxkva modifyable via sysctl (and compile-time) instead of
hardcoding its size.
2003-07-02 20:07:45 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
thorpej a06b275edc Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget().  Turns out
  that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
  and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
  above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
  just to appease the above.
2003-06-29 18:43:21 +00:00
simonb 2bda3187f5 Fix 'struct lwp *' lossage. 2003-06-29 15:14:11 +00:00
martin f62781d485 Intermediate cast to intptr_t when storing a lwp id in a caddr_t variable
for archs where those have different size.
2003-06-29 09:59:59 +00:00
thorpej 927fffff3d Adjust to ktrace/lwp changes. 2003-06-29 02:56:23 +00:00
enami e946a4baa0 Adjust !LKM case for proc * -> lwp * change. 2003-06-29 02:23:19 +00:00
simonb 02c392e820 Remove an unnecessary local variable (and save a read of the "time"
variable if we don't need to use it).
2003-06-28 15:02:24 +00:00
simonb a357272810 Declare ras_pool in <sys/ras.h> instead of an extern declaration in
the file where it's needed.
2003-06-28 14:52:10 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
nathanw 08cf80dc5c Whitespace police. 2003-06-26 02:09:27 +00:00
nathanw 169a6757eb For now, disable voluntary mid-operation preempt() for SA processes;
it doesn't interact well with SA's idea of what's running.
2003-06-26 02:08:19 +00:00
yamt 200e944501 revert rev.1.28. (free -> FREE changes)
pointed by David Laight on source-changes about similar changes.
2003-06-25 14:34:55 +00:00
christos a378776e5a Limit the number of program headers we accept to avoid resource exhaustion
by a hand-crafted elf binary.
2003-06-25 13:48:06 +00:00
jdolecek 7942f6611a add __KERNEL_RCSID() 2003-06-23 13:14:49 +00:00
martin d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
drochner 0256604827 nuke unnecessary #include <sys/dkstat.h> 2003-06-12 14:44:36 +00:00
provos f858b1eac4 allow the kernel to free policies for users; kernel informs userland
which policy has been freed;  replacement is LRU
2003-06-03 05:24:00 +00:00
jdolecek bb940d41a0 Add __KERNEL_RCSID() 2003-06-01 00:03:39 +00:00
nathanw a86930707b Expand the test in itimerfire() to only wake up an idle SA LWP if the
process isn't stopped.
2003-05-28 22:27:57 +00:00
nathanw 998110e1d0 Put the tsleep() call in sa_yield() inside a while loop that tests
whether there is anything to do - almost as if it were a predicate
test outside of a condition wait. This prevents returning to userland
when tsleep() has woken up spuriously, such as from a signal that was
caught and then removed by a tracing process.

Kills off some double-stops in GDB due to signals as well as a couple
of pthread__idle assertions when detaching from a process.

XXX stopping inside tsleep, via CURSIG(), is evil.
2003-05-28 22:17:20 +00:00
dsl cb9a14ea0b Report ioctl read and write the correct way around. 2003-05-28 20:02:59 +00:00
simonb 2a2748044b Fix tyop in a comment. 2003-05-27 09:03:46 +00:00
dbj d225e8e1a7 use %PRIx64 instead of %x to print bp->b_lblkno and bp->b_blkno
in vfs_buf_print
2003-05-23 01:45:07 +00:00
kristerw 7941ff4225 Use 0 instead of NULL for size parameters. 2003-05-21 17:57:21 +00:00
fvdl dd522b0702 Fix a missing namecache_slock unlock. From Stephan Uphoff. 2003-05-21 09:36:06 +00:00
kristerw c71f7e5a4d This program is called genlintstub.awk 2003-05-20 20:25:31 +00:00
nathanw c7ca70e27a Add a ptrace interface for iterating over and collecting information
about LWPs. Loosely inspired by a similar interface in HP-UX ttrace(2).
2003-05-20 18:16:08 +00:00
nathanw 8e02eedcdf Track the LWP ID of a synchronous (trap) signal, and report it in core dumps. 2003-05-20 17:42:51 +00:00
simonb 8ba8e8a81b Sprinkle a little white-space. 2003-05-20 13:48:08 +00:00
nathanw f7905a50d4 Clear L_SA duting sa_upcall_userret(); faults encountered while
reporting an upcall are not of interest and just cause trouble.
2003-05-19 21:02:31 +00:00
dyoung 9d9a86120a Make ppsratecheck conform with its man page, which says, "If maxpps
is set to 0, the function will always return 0 (no packets/events
are permitted)." Before this patch, ppsratecheck returned 1 once
a second when maxpps was 0.
2003-05-19 03:23:37 +00:00
thorpej fcecc153fe Use aprint_normal() for the non-error (and thus non-interative) case
of mounting the root file system.
2003-05-17 22:22:41 +00:00
mjl cf40158777 Typos in comments. 2003-05-17 15:53:42 +00:00
itojun 6213663758 avoid constant, use sizeof
[not sure about string termination here, so leave strncpy untouched]
2003-05-17 03:12:08 +00:00
nakayama b89b148783 Avoid integer constant is too large warnings in gcc 3.3. 2003-05-17 01:50:56 +00:00
itojun 35e21131ac use strlcat 2003-05-16 14:40:41 +00:00
itojun f265a4a4da use strlcpy. [fixed off-by-one in subr_prop.c] 2003-05-16 14:25:02 +00:00
christos 15fab6425c Fix a variety of kernel panics related to unchecked export data:
1. sa_len was not properly checked.
2. sa_family was not properly checked [even used as an array index!]
3. we only know about inet4 and inet6, so make sure that the corresponding
   data is valid before using it.
4. keep reference counts of addresses used (is that necessary?)
2003-05-16 14:01:56 +00:00
christos ade6fba604 add a crcmp() function. 2003-05-16 13:55:18 +00:00
dsl 88b103687c ktrace rval[1] - in order to get both fd numbers for pipe() 2003-05-15 12:56:16 +00:00
dbj 1ce09bdefb fix nits to compile when DEBUG_KGDB is defined 2003-05-13 02:13:14 +00:00
dsl 3a7f8f18f1 ktrace ioctl data buffers
Optimise structure layout for 'struct selinfo' to avoid padding on 64bit
systems.  Use an entire variable for the 'collision' flag for efficiency.
2003-05-12 15:17:36 +00:00
jdolecek d17c485917 make couple ksym functions' arguments const 2003-05-11 08:23:22 +00:00
matt 2de77aeda1 Make we keep track of the file sizes in a size_t, not an int. Also break
out the writing of an lwp's registers to a separate function.  XXX Although
not really the correct way to do this, make the thread that caused the
coredump has it's register set written first so GDB is happy.  (this is a
bridge until TRT is done).
2003-05-08 20:26:40 +00:00
matt d97fd7e0ed In setrunnable, give more infomrmation in the panic message so we can
figure out WTF went wrong.
2003-05-08 02:04:11 +00:00
ragge 4f432cf54f Remove useless entries from the symbol table at load.
Add patricia-tree-style lookup code for symbols (for fast lookups).
2003-05-07 21:28:16 +00:00
fvdl 65770cf2e9 In the KMEMSTATS && DIAGNOSTIC case, add a check for inuse already being 0
at free() time. This will at least catch an alloc/free mismatch early in
boot, rather than having it hang hard because of a wrapped ks_limit.
2003-05-06 18:07:57 +00:00
yamt b2479414be export some of sosend loan routines for nfsd. 2003-05-03 17:53:17 +00:00
fvdl c5b60c55a3 Make gcc3 happy ("label at end of compound statement"). 2003-05-03 15:02:54 +00:00
yamt d056e8ce9a get pointer to v_interlock directly
as we are not interested in the rest of the vnode here.
2003-05-03 11:19:05 +00:00
yamt 7b589d5ebc fix locking. 2003-05-02 12:43:01 +00:00
ragge 87c706341d #ifdef KSYMS_DEBUG should be #if NKSYMS. 2003-05-02 09:34:57 +00:00
tron 74905fd4b6 Fix build problems for kernel configurations without the "ksyms"
pseudo-device.
2003-05-02 09:19:51 +00:00
ragge b16f870314 Enable the ioctl's. 2003-05-01 20:46:20 +00:00
yamt 300627c9c0 - KNF.
- remove unneeded caddr_t casts.
2003-05-01 15:25:06 +00:00
yamt 8565905ff8 use FREE instead of free for MALLOC'ed memory. 2003-05-01 14:59:51 +00:00
yamt 99411362c0 MP locking. 2003-05-01 14:36:43 +00:00
yamt a2e9a85481 remove a part of comment that isn't true anymore. 2003-05-01 13:14:49 +00:00
yamt 31dc0f47c6 ANSIfy. 2003-05-01 13:06:59 +00:00
yamt 4d5238a439 don't export lockf internal functions. 2003-05-01 12:49:16 +00:00
thorpej 8e8114bf55 Fix a logic botch that would cause some unwanted messages in the
AB_SILENT case.
2003-04-29 00:56:52 +00:00
ragge 520c93de28 Make ksymms_init() take void * parameters instead of caddr_t. 2003-04-26 10:24:58 +00:00
ragge cddfd23e42 Mobe the SYMTAB_SPACE stuff to ksyms_init, so that it can be used without
DDB compiled-in.
2003-04-25 20:30:57 +00:00
ragge 0bd41108c4 Explicitly cast printf arg to long, from Tom Spindler. 2003-04-25 07:35:21 +00:00
ragge f5cb3ec885 Teach the lkm code to add loaded module symbols to the in-kernel symbol table.
XXX - The way this works is clumsy, at least. It will be fixed as soon as
the in-kernel linker is in place.
2003-04-24 20:09:43 +00:00
ragge 44305abd0b Basic implementation of in-kernel symbol table manager + /dev/ksyms. 2003-04-24 19:56:43 +00:00
nathanw 68b16f8c13 Patch from Nick Hudson to clean up a couple of cases in proc_unstop(),
as well as improving the comments a bit. Addresses PR kern/20159.
2003-04-23 21:32:10 +00:00
matt 13bf20997a Need to include <sys/sa.h> for <sys/syscall.h> 2003-04-23 17:50:51 +00:00
christos 8906603597 fix wrong calculation. pointed by enami. 2003-04-22 13:11:23 +00:00
manu 0fd8402c80 Some Mach-O libraries do not have a load base address. The Darwin
kernel seems to skip them, letting the dirty job to dyld.
2003-04-21 14:32:25 +00:00
provos 14ea3a1c62 better performance for fast path; simplify for future lwp support. 2003-04-20 20:30:34 +00:00
yamt 9cb95972fa add simple_locks that are missed in the previous. 2003-04-20 07:06:33 +00:00
christos 62d7b4df25 PR/5458: Andrew Brown: acct(2) bug accounting to files marked sappnd 2003-04-20 03:20:18 +00:00
christos cd174e0605 make the copy_statfs_args() function copy all the fields that are not
set by the filesystems. Before my changes, the statfs code depended
on calling it with mp->mnt_stat, and did not explicitly initialize
anything!
2003-04-18 22:44:45 +00:00
simonb 3a00c85d38 Add a KASSERT to make sure that "sizeof(struct mbuf)" is MSIZE.
Extra insurance for Steve Woodford's recent <sys/mbuf.h> patch.
2003-04-18 01:24:20 +00:00
fvdl 2807f6e56a A bit of an ugly workaround to avoid a warning for a larger MSIZE.
Shouldn't make a difference in the generated code.
2003-04-17 13:12:39 +00:00
christos 80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
dsl 8a94d0064f Remember if ntp has adjusted clock rate, hardware RTC may be wrong. 2003-04-16 21:35:07 +00:00