dragonfly.git
20 years agoAugment falloc() to support thread-only file pointers (with no integer file
Matthew Dillon [Mon, 13 Oct 2003 18:01:28 +0000 (18:01 +0000)]
Augment falloc() to support thread-only file pointers (with no integer file
descriptor or process).

Add new generic 'easy to use' fp_*() kernel functions which operate on file
pointers.  This will greatly ease in-kernel functions which must open,
perform I/O, and close files.

Adopted from: other kernel sources and Kip Macy's checkpoint code.

20 years agoAdd bsd.dfport.pre.mk and bsd.dfport.post.mk to the Makefile
Matthew Dillon [Mon, 13 Oct 2003 15:06:58 +0000 (15:06 +0000)]
Add bsd.dfport.pre.mk and bsd.dfport.post.mk to the Makefile

20 years agoadd /usr/share/examples/splash to the mtree, for installworld.
Matthew Dillon [Mon, 13 Oct 2003 08:43:56 +0000 (08:43 +0000)]
add /usr/share/examples/splash to the mtree, for installworld.

20 years agoFix an ordering issue, call vm_map_entry_reserve() prior to locking
Hiten Pandya [Mon, 13 Oct 2003 07:03:40 +0000 (07:03 +0000)]
Fix an ordering issue, call vm_map_entry_reserve() prior to locking
the map.

Noticed by: Matt

20 years agoAMI MegaRAID Crash-Dumps support.
Hiten Pandya [Mon, 13 Oct 2003 06:56:13 +0000 (06:56 +0000)]
AMI MegaRAID Crash-Dumps support.

Special thanks to Paul Saab (ps@FreeBSD.ORG) for providing the patch.

20 years agoImplement socket() and shutdown() using the in-kernel syscalls. This
David P. Reese, Jr. [Mon, 13 Oct 2003 04:58:13 +0000 (04:58 +0000)]
Implement socket() and shutdown() using the in-kernel syscalls.  This
commit completely removes COMPAT_43 and stackgap allocations from
linux_socket.c.

20 years agoFix kldload(2) error return when a module is rejected becaue it is
Hiten Pandya [Mon, 13 Oct 2003 04:16:51 +0000 (04:16 +0000)]
Fix kldload(2) error return when a module is rejected becaue it is
statically linked into the kernel.  This is due to a problem in the
linker code.  The EEXIST code which was returned was not reported
and instead an ENOEXEC was returned incorrectly, thus making stuff
like sysinstall act weirdly.

Obtained from: FreeBSD 5.x

20 years agoAdd a splash example / DragonFly BMP
Matthew Dillon [Mon, 13 Oct 2003 03:15:26 +0000 (03:15 +0000)]
Add a splash example / DragonFly BMP

Supplied-by: Emiel Kollof <coolvibe@hackerheaven.org>
20 years agoFix compile when GUPROF is defined.
Hiten Pandya [Sun, 12 Oct 2003 23:38:53 +0000 (23:38 +0000)]
Fix compile when GUPROF is defined.

I.e. add cpu_ prefix to disable_intr() and enable_intr().

20 years ago* Pull is some security checks from sendmail 8.12.10.
David Rhodus [Sun, 12 Oct 2003 16:56:26 +0000 (16:56 +0000)]
* Pull is some security checks from sendmail 8.12.10.

Discussed with: Greg Shapiro and Matt Dillon

20 years agoMore hacks to support DragonFly port overrides. Deal with ports which
Matthew Dillon [Sun, 12 Oct 2003 01:43:59 +0000 (01:43 +0000)]
More hacks to support DragonFly port overrides.  Deal with ports which
use bsd.port.pre.mk and bsd.port.post.mk.

20 years agoFix bugs introduced from the last commit. The loadav routine somehow got
Matthew Dillon [Sun, 12 Oct 2003 00:52:48 +0000 (00:52 +0000)]
Fix bugs introduced from the last commit.  The loadav routine somehow got
deleted, and other minor things.

20 years agodocument the new fdisk option.
Matthew Dillon [Sun, 12 Oct 2003 00:45:24 +0000 (00:45 +0000)]
document the new fdisk option.

20 years agoAdd a -p option to fdisk that allows it to operate on normal files which
Matthew Dillon [Sun, 12 Oct 2003 00:43:17 +0000 (00:43 +0000)]
Add a -p option to fdisk that allows it to operate on normal files which
represent disk images.

20 years agoUpgrade isc-dhcp, e.g. dhclient.
Matthew Dillon [Sat, 11 Oct 2003 21:14:25 +0000 (21:14 +0000)]
Upgrade isc-dhcp, e.g. dhclient.

Taken-from: FreeBSD-current

20 years agoadd bsd.dfport.pre.mk and bsd.dfport.post.mk, part of the DragonFly ports
Matthew Dillon [Sat, 11 Oct 2003 21:08:33 +0000 (21:08 +0000)]
add bsd.dfport.pre.mk and bsd.dfport.post.mk, part of the DragonFly ports
override mechanism.

20 years ago* Add missing function declaration that was some how
David Rhodus [Sat, 11 Oct 2003 19:30:42 +0000 (19:30 +0000)]
* Add missing function declaration that was some how
missed during inital ACPI import.

20 years ago* Move variable 'p' into a more proper place.
David Rhodus [Sat, 11 Oct 2003 19:04:58 +0000 (19:04 +0000)]
* Move variable 'p' into a more proper place.

20 years ago* Add this nice filesystem testing tool that I've recently
David Rhodus [Sat, 11 Oct 2003 13:37:14 +0000 (13:37 +0000)]
* Add this nice filesystem testing tool that I've recently
missed having close by.

20 years agoCorrect unsafe use of realloc().
Hiten Pandya [Sat, 11 Oct 2003 11:38:44 +0000 (11:38 +0000)]
Correct unsafe use of realloc().

Obtained from: FreeBSD (KAME commit by Hajimu UMEMOTO)

20 years agoSecurity Fix:
Hiten Pandya [Sat, 11 Oct 2003 09:56:48 +0000 (09:56 +0000)]
Security Fix:

     Fix a BSS buffer overflow caused by makeargv() writing past the
     end of margv[] when an input line contains 20 or more space
     separated words.

Obtained from: FreeBSD

20 years agoData reads and writes should not need credentials, and most filesystems
Matthew Dillon [Fri, 10 Oct 2003 22:01:13 +0000 (22:01 +0000)]
Data reads and writes should not need credentials, and most filesystems
ignore the ucred argument.  NFS does, though, and FreeBSD-4.x had some
terrible hacks to associate credentials with data that only 'mostly' worked.
There were VM paging and buffer reconstitution cases which broke the
credentials even in 4.x.  The hacks were removed from DragonFly during
the VFS messaging reorganization.

In DragonFly credentials are checked on open() but no credentials are
required for read and write ops.  I had NFS just use the 'root' credential
for the RPC.  However, this breaks NFS mounts which do not use the -maproot
(server side) directive.  Really the bug is on the server side, but to
maintain general compatibility with NFS servers we have to provide a
non-root credential if root did not issue the I/O.  This commit hacks up
the NFS code (rather then hacking up the rest of the kernel) to restore
the hacks that were previously removed from the kernel.  Unfortunately it
can lead to a proliferation of ucred structures (FreeBSD-4.x did as well),
but that's the price we have to pay for now.

Report-by: Galen Sampson <galen_sampson@yahoo.com>
20 years agonamecache work stage 3a: Adjust the VFS APIs to include a namecache pointer
Matthew Dillon [Thu, 9 Oct 2003 22:27:27 +0000 (22:27 +0000)]
namecache work stage 3a: Adjust the VFS APIs to include a namecache pointer
where necessary.  For the moment we pass NULL for these parameters (the old
'dvp' vnode pointer's cannot be ripped out quite yet).

20 years agoSync with FreeBSD-5, fix-up the use of certain flags variables.
Matthew Dillon [Thu, 9 Oct 2003 15:39:36 +0000 (15:39 +0000)]
Sync with FreeBSD-5, fix-up the use of certain flags variables.

20 years agoUse the _KERNEL_STRUCTURES define to allow userland to bring in kernel
Matthew Dillon [Thu, 9 Oct 2003 03:31:33 +0000 (03:31 +0000)]
Use the _KERNEL_STRUCTURES define to allow userland to bring in kernel
structures without also bringing in kernel prototypes.

20 years agoDefine _KERNEL_STRUCTURES instead of _KERNEL to get just the
Matthew Dillon [Wed, 8 Oct 2003 20:06:15 +0000 (20:06 +0000)]
Define _KERNEL_STRUCTURES instead of _KERNEL to get just the
kernel structures without the kernel prototype pollution.

20 years agoAdd _KERNEL_STRUCTURES support for userland use of this header file.
Matthew Dillon [Wed, 8 Oct 2003 20:05:39 +0000 (20:05 +0000)]
Add _KERNEL_STRUCTURES support for userland use of this header file.

20 years agoFix a bug in the last commit where sendfile() would forget to drop a file
David P. Reese, Jr. [Wed, 8 Oct 2003 03:21:26 +0000 (03:21 +0000)]
Fix a bug in the last commit where sendfile() would forget to drop a file
pointer if the file wasn't of type DTYPE_VNODE.

20 years agoIntroduce the function iovec_copyin() and it's friend iovec_free().
David P. Reese, Jr. [Wed, 8 Oct 2003 01:30:32 +0000 (01:30 +0000)]
Introduce the function iovec_copyin() and it's friend iovec_free().
These remove a great deal of duplicate code in the syscall functions.
For those who like numbers, this patch uses iovec_copyin() four times
in uipc_syscalls.c, two times in linux_socket.c and two times in
43bsd_socket.c.  Would somebody please comment on the inclusion of
sys/malloc.h in sys/uio.h?

Remove sockargs() which was used once in the svr4 emulation code.  It
is replaced with a small piece of code that gets an mbuf and copyin()'s
to it's data region.

Remove the osendfile() syscall which was inapropriately named and placed
in the COMPAT_43 code where it doesn't belong.

Split the socket(), shutdown() and sendfile() syscalls.  All of the
syscalls in kern/uipc_syscalls.c are now split.

Prevent a panic due to m_freem()'ing a dangling pointer in recvmsg(),
orecvmsg(), linux_recvmsg().

This patch completely removes COMPAT_43 from kern/uipc_syscalls.c.

20 years agoDisable background bitmap writes. They appear to cause at least two race
Matthew Dillon [Wed, 8 Oct 2003 00:10:56 +0000 (00:10 +0000)]
Disable background bitmap writes.  They appear to cause at least two race
conditions:  First, on MP systems even an LK_NOWAIT lock may block,
invalidating flags checks done just prior to the lock attempt.  Second, on
both MP and UP systems, the original buffer (origbp) may be modified during
the completion of a background write without its lock being held and these
modifications can race against mainline code that is also modifying the same
buffer with the lock held.

Eventually the problem background bitmap writes solved will be solved more
generally by implementing page COWing durign device I/O to avoid stalls on
pages undergoing write I/O.

20 years agoThe splash_bmp and splash_pcx builds were missing some symbols, add the
Matthew Dillon [Mon, 6 Oct 2003 17:19:38 +0000 (17:19 +0000)]
The splash_bmp and splash_pcx builds were missing some symbols, add the
appropriate files to the Makefile.

20 years agoUnroll obfuscated loop.
Jeffrey Hsu [Mon, 6 Oct 2003 06:08:23 +0000 (06:08 +0000)]
Unroll obfuscated loop.

20 years agoThe CMOV family of instructions do not work across all cpu families. In
Matthew Dillon [Sun, 5 Oct 2003 23:06:45 +0000 (23:06 +0000)]
The CMOV family of instructions do not work across all cpu families.  In
particular they do not work on some of the oldest pentiums or 486's, and
probably do not work on some non-intel cpus either.

Replace the cmovcl in the preload code's inline assembly with a jnc/movl
combination.

Located by the persistence of:  Galen Sampson <galen_sampson@yahoo.com>

20 years ago* Fix a typo that was introduced from the last change.
David Rhodus [Sun, 5 Oct 2003 20:08:41 +0000 (20:08 +0000)]
* Fix a typo that was introduced from the last change.

20 years ago* Correct several integer underflows/overflows in linprocfs
David Rhodus [Sun, 5 Oct 2003 20:04:08 +0000 (20:04 +0000)]
* Correct several integer underflows/overflows in linprocfs
  by making use od the uiomove_frombuf routine.

Reported by:    Joost Pol <joost@pine.nl>

20 years ago* Try to make gencat(1) recognize.
David Rhodus [Sun, 5 Oct 2003 16:51:39 +0000 (16:51 +0000)]
* Try to make gencat(1) recognize.

20 years agoFix a spelling mistake.
Hiten Pandya [Sun, 5 Oct 2003 16:12:00 +0000 (16:12 +0000)]
Fix a spelling mistake.

20 years agoK&R style function removal. Update functions to ANSI style.
Hiten Pandya [Sat, 4 Oct 2003 20:36:55 +0000 (20:36 +0000)]
K&R style function removal.  Update functions to ANSI style.

While I am there, add $DragonFly$ IDs to these files, or the
commit just busts up.  Also fixup C Style comments on the
files.

Patch has been tested by submitter and me.

Submitted by: Eirik Nygaard <eirikn@bluezone.no>
Reviewed by: Hiten Pandya

20 years agoModify linux_{send,recv}msg() and linux_{set,get}sockopt() to use the
David P. Reese, Jr. [Sat, 4 Oct 2003 02:12:51 +0000 (02:12 +0000)]
Modify linux_{send,recv}msg() and linux_{set,get}sockopt() to use the
split syscalls.

Add a sanity check to linux_copyout_sockaddr().

Remove two functions that used stackgap allocations.

20 years agoModify kern_{send,recv}msg() to take struct uio's, not struct msghdr's.
David P. Reese, Jr. [Fri, 3 Oct 2003 00:04:04 +0000 (00:04 +0000)]
Modify kern_{send,recv}msg() to take struct uio's, not struct msghdr's.
Fix up all syscalls which use these functions, including the 43bsd
syscalls.

Also, fix some spots where I forgot to pass the message flags in the
emulation code.

20 years agoAddendum: Many thanks for continuing to Galen Sampson for running such an
Matthew Dillon [Thu, 2 Oct 2003 22:29:15 +0000 (22:29 +0000)]
Addendum:  Many thanks for continuing to Galen Sampson for running such an
old platform, that brought all the bugs found in the prior commit to light.

20 years agoFix a number of interrupt related issues.
Matthew Dillon [Thu, 2 Oct 2003 22:27:00 +0000 (22:27 +0000)]
Fix a number of interrupt related issues.

* Don't access kernel_map in free(), defer such operations to malloc()

* Fix a slab allocator panic due to mishandling of malloc size slab
  limit checks on machines with small amounts of memory (the slab allocator
  reduces the size of the zone on low-memory machines but did not handle the
  reduced size properly).

* Add thread->td_nest_count to prevent splz recursions from underflowing
  the kernel stack.  This can occur because we drop the critical section
  when calling sched_ithd() in order to allow it to preempt.

* Properly adjust intr_nesting_level around FAST interrupts

* Adjust the debugging printf() in lockmgr to only complain about blockable
  lock requests from interrupts.

20 years agoRename:
Hiten Pandya [Thu, 2 Oct 2003 21:00:20 +0000 (21:00 +0000)]
Rename:

- vm_map_pageable() -> vm_map_wire()
- vm_map_user_pageable() -> vm_map_unwire()

20 years ago * Turn on debugging options by default
David Rhodus [Thu, 2 Oct 2003 19:45:40 +0000 (19:45 +0000)]
 * Turn on debugging options by default

20 years agocorrect a comment.
Matthew Dillon [Thu, 2 Oct 2003 19:26:35 +0000 (19:26 +0000)]
correct a comment.

20 years agoDescribe the hw.physmem loader variable.
Matthew Dillon [Thu, 2 Oct 2003 19:24:10 +0000 (19:24 +0000)]
Describe the hw.physmem loader variable.

20 years ago Introduce a uiomove_frombuf helper routine that handles computing and
David Rhodus [Thu, 2 Oct 2003 19:21:06 +0000 (19:21 +0000)]
 Introduce a uiomove_frombuf helper routine that handles computing and
 validating the offset within a given memory buffer before handing the
 real work off to uiomove(9).

 Use uiomove_frombuf in procfs to correct several issues with
 integer arithmetic that could result in underflows/overflows.  As a
 side-effect, the code is significantly simplified.

 Add additional sanity checks when computing a memory allocation size
 in pfs_read.

 Reported by:    Joost Pol <joost@pine.nl>  (integer underflows/overflows)
 Originated from: FreeBSD

20 years agoK&R style function removal. Update functions to ANSI style.
Hiten Pandya [Thu, 2 Oct 2003 17:42:27 +0000 (17:42 +0000)]
K&R style function removal.  Update functions to ANSI style.

Patch has been tested.

Submitted by: Eirik Nygaard <eirikn@bluezone.no>
Reviewed by: Hiten Pandya

20 years ago Correct a case in readv(2) where the file descriptor reference count
David Rhodus [Thu, 2 Oct 2003 16:57:14 +0000 (16:57 +0000)]
  Correct a case in readv(2) where the file descriptor reference count
  should have been decremented but was not.

  Reported by:    Joost Pol <joost@pine.nl>
  Obtained from:  FreeBSD

20 years agoFix a bug in lwkt_trytoken(), it failed to exit its critical section on
Matthew Dillon [Wed, 1 Oct 2003 22:53:44 +0000 (22:53 +0000)]
Fix a bug in lwkt_trytoken(), it failed to exit its critical section on
failure.  It is supposed to return with a critical section held on success.

20 years agoFix a negative cache entry reaping bug, cache_zap() expects ncp's ref count
Matthew Dillon [Wed, 1 Oct 2003 22:51:24 +0000 (22:51 +0000)]
Fix a negative cache entry reaping bug, cache_zap() expects ncp's ref count
to be bumped on call.

20 years agoMove the pst device from dev/misc to dev/raid.
Matthew Dillon [Wed, 1 Oct 2003 18:21:44 +0000 (18:21 +0000)]
Move the pst device from dev/misc to dev/raid.

20 years agoAdd pst to the raid Makefile
Matthew Dillon [Wed, 1 Oct 2003 18:20:33 +0000 (18:20 +0000)]
Add pst to the raid Makefile

20 years agoMove pst from dev/misc to dev/raid, add a Makefile for 'pst'.
Matthew Dillon [Wed, 1 Oct 2003 18:20:07 +0000 (18:20 +0000)]
Move pst from dev/misc to dev/raid, add a Makefile for 'pst'.

20 years ago * Add the Promise Supertrack to the build
David Rhodus [Wed, 1 Oct 2003 14:32:47 +0000 (14:32 +0000)]
 * Add the Promise Supertrack to the build

20 years ago * Add #include <sys/buf2.h>
David Rhodus [Wed, 1 Oct 2003 14:17:56 +0000 (14:17 +0000)]
 * Add #include <sys/buf2.h>
so as to fix the build

20 years agoCleanup: get rid of the CNP_NOFOLLOW pseudo-flag. #define 0'd flags are a
Matthew Dillon [Mon, 29 Sep 2003 18:52:16 +0000 (18:52 +0000)]
Cleanup: get rid of the CNP_NOFOLLOW pseudo-flag.  #define 0'd flags are a
really bad idea.

20 years agoFix L2 internal cache reporting when it is an AMD Duron rev. A0 chip.
Hiten Pandya [Mon, 29 Sep 2003 15:56:42 +0000 (15:56 +0000)]
Fix L2 internal cache reporting when it is an AMD Duron rev. A0 chip.

Obtained from: FreeBSD GNATS (PR #21672)

20 years agoSort Copyright order.
Hiten Pandya [Mon, 29 Sep 2003 15:44:47 +0000 (15:44 +0000)]
Sort Copyright order.

20 years agoSplit getsockopt() and setsockopt().
David P. Reese, Jr. [Mon, 29 Sep 2003 05:34:08 +0000 (05:34 +0000)]
Split getsockopt() and setsockopt().

20 years agoHash the link-check data to improve performance on filesystems containing a
Matthew Dillon [Sun, 28 Sep 2003 17:24:30 +0000 (17:24 +0000)]
Hash the link-check data to improve performance on filesystems containing a
lot of hard links.

Submitted-by: Hiten Pandya <hmp@backplane.com>
20 years agoK&R style function removal. Update functions to ANSI style.
Hiten Pandya [Sun, 28 Sep 2003 14:39:22 +0000 (14:39 +0000)]
K&R style function removal.  Update functions to ANSI style.

Patch has been tested.

Submitted by: Eirik Nygaard
Reviewed by: Hiten Pandya

20 years agonamecache work stage 2: move struct namecache to its own header file and
Matthew Dillon [Sun, 28 Sep 2003 03:44:09 +0000 (03:44 +0000)]
namecache work stage 2: move struct namecache to its own header file and
have vnode.h include it for now.  Re-engineer the namecache topology to make
it possible to track different parent directories and to make it possible
to namei/lookup paths using the namecache structure as the primary placeholder
rather then a directory vnode.  Add a few minor hacks to stabilize the system
that will be removed (no longer be necessary) in stage 3.  Get rid of the
leafonly sysctl and make its effect the default, but in order to avoid
doing too much in this stage it is still possible to disassociate a vnode
from its namecache entry, which a lot of filesystems (e.g. NFS) depend on
as a poor-man's way of invalidating entries.  The namecache topology itself,
however, will be left intact even if a vnode is disassociated in the middle
of a path.

20 years agoTry to generate more debugging information when the critical nesting count
Matthew Dillon [Sun, 28 Sep 2003 03:37:32 +0000 (03:37 +0000)]
Try to generate more debugging information when the critical nesting count
gets too deep (which indicates a crit_enter/exit or lwkt_gettoken/reltoken
mismatch somewhere).

20 years agoRemove the NO_KMEM_MAP and USE_SLAB_ALLOCATOR kernel options. Temporarily
Matthew Dillon [Fri, 26 Sep 2003 19:23:35 +0000 (19:23 +0000)]
Remove the NO_KMEM_MAP and USE_SLAB_ALLOCATOR kernel options.  Temporarily
add the USE_KMEM_MAP and NO_SLAB_ALLOCATOR kernel options, which developers
should generally not use.

We now use the slab allocator (and no kmem_map) by default.

20 years agoRemove the NO_KMEM_MAP and USE_SLAB_ALLOCATOR kernel options. Temporarily
Matthew Dillon [Fri, 26 Sep 2003 19:23:34 +0000 (19:23 +0000)]
Remove the NO_KMEM_MAP and USE_SLAB_ALLOCATOR kernel options.  Temporarily
add the USE_KMEM_MAP and NO_SLAB_ALLOCATOR kernel options, which developers
should generally not use.

We now use the slab allocator (and no kmem_map) by default.

20 years agoAllow unlock and non-blocking lock operations from FAST interrupts.
Matthew Dillon [Thu, 25 Sep 2003 23:52:28 +0000 (23:52 +0000)]
Allow unlock and non-blocking lock operations from FAST interrupts.
For now generate a warning for other operations.  The warning will
turn into a panic in a later commit.

20 years agoFix a number of mp_lock issues. I had outsmarted myself trying to deal with
Matthew Dillon [Thu, 25 Sep 2003 23:49:09 +0000 (23:49 +0000)]
Fix a number of mp_lock issues.  I had outsmarted myself trying to deal with
td->td_mpcount / mp_lock races.  The new rule is: you first modify
td->td_mpcount, then you deal with mp_lock assuming that an interrupt might
have already dealt with it for you, and various other pieces of code
deal with the race if an interrupt occurs in the middle of the above two
data accesses.

20 years agoDo not attempt to access kernel_map in free(). It's a bad idea, and doubly
Matthew Dillon [Thu, 25 Sep 2003 23:44:07 +0000 (23:44 +0000)]
Do not attempt to access kernel_map in free().  It's a bad idea, and doubly
so because free() can be called through a remote IPI.  Instead the slab's
freelist hysteresis has been moved into malloc().

This fixes a number of reported panics.

20 years agoApply FreeBSD Security Advisory FreeBSD-SA-03:14.arp. Fix DOS crash due
Matthew Dillon [Thu, 25 Sep 2003 02:22:23 +0000 (02:22 +0000)]
Apply FreeBSD Security Advisory FreeBSD-SA-03:14.arp.  Fix DOS crash due
to arp starvation.

20 years agoCleanup td_wmesg after a tsleep completes for easier debugging.
Matthew Dillon [Thu, 25 Sep 2003 01:47:56 +0000 (01:47 +0000)]
Cleanup td_wmesg after a tsleep completes for easier debugging.

20 years agooops, remove some namecache leakage that is not ready for prime time yet.
Matthew Dillon [Wed, 24 Sep 2003 18:38:51 +0000 (18:38 +0000)]
oops, remove some namecache leakage that is not ready for prime time yet.

20 years agoClean up thread priority and critical section handling during boot. The
Matthew Dillon [Wed, 24 Sep 2003 18:37:54 +0000 (18:37 +0000)]
Clean up thread priority and critical section handling during boot.  The
initial kernel threads (e.g. thread0/proc0) had a priority lower then userland!
Default them to the minimum kernel thread priority.

Thread0 was also unnecessarily left in a critical section, which prevented
certain device probes, such as the APIC 8254 timer test code, from working.

20 years ago Looks like we can't have comments on the same
David Rhodus [Wed, 24 Sep 2003 04:39:46 +0000 (04:39 +0000)]
Looks like we can't have comments on the same
lines that are being parsed.

20 years agoForgot another one.
David Rhodus [Wed, 24 Sep 2003 03:51:59 +0000 (03:51 +0000)]
Forgot another one.

20 years ago* Finish up last commit.
David Rhodus [Wed, 24 Sep 2003 03:46:00 +0000 (03:46 +0000)]
* Finish up last commit.

20 years ago* Intel ACPI 20030228 distribution with local DragonFly changes.
David Rhodus [Wed, 24 Sep 2003 03:32:17 +0000 (03:32 +0000)]
*  Intel ACPI 20030228 distribution with local DragonFly changes.

*  OSPM ACPI driver.  Note that this driver does not include
   support for PCI interrupt routing or enumeration of ISA bridges or
   Host to PCI bridges.  While functional on some machines, this driver
   should be considered experimental and should be tested prior to being
   deployed in a production environment.

Original work done by John Baldwin
  Sponsored by:   The Weather Channel

20 years agonamecache work stage 1: namespace cleanups. Add a NAMEI_ prefix to
Matthew Dillon [Tue, 23 Sep 2003 05:03:54 +0000 (05:03 +0000)]
namecache work stage 1: namespace cleanups.  Add a NAMEI_ prefix to
CREATE, LOOKUP, DELETE, and RENAME.  Add a CNP_ prefix too all the name
lookup flags (nd_flags) e.g. ISDOTDOT->CNP_ISDOTDOT.

20 years agoAdd notation on the alignment requirement for the twe driver.
Matthew Dillon [Mon, 22 Sep 2003 21:45:44 +0000 (21:45 +0000)]
Add notation on the alignment requirement for the twe driver.

20 years agoThe twe driver requires all requests, including non-data requests, to be
Matthew Dillon [Mon, 22 Sep 2003 21:45:22 +0000 (21:45 +0000)]
The twe driver requires all requests, including non-data requests, to be
512-byte aligned.  The old malloc() code only did this incidentally.  We
have to explicitly size the request to a power-of-2 to get the required
alignment out of the slab allocator.

Report-by: David Rhodus <drhodus@catpa.com>
20 years agoFor performance reasons, kernel sends should not be subject to sockbuf
Jeffrey Hsu [Mon, 22 Sep 2003 20:04:33 +0000 (20:04 +0000)]
For performance reasons, kernel sends should not be subject to sockbuf
limit checks.  This revert FreeBSD rev 1.111.

20 years ago* de-__P()
David Rhodus [Sun, 21 Sep 2003 04:27:16 +0000 (04:27 +0000)]
* de-__P()

20 years ago* de- __P()
David Rhodus [Sun, 21 Sep 2003 04:18:34 +0000 (04:18 +0000)]
* de- __P()

20 years ago* de- __P()
David Rhodus [Sun, 21 Sep 2003 04:13:50 +0000 (04:13 +0000)]
* de- __P()

20 years agoFix IPFW2 build.
Hiten Pandya [Sat, 20 Sep 2003 15:17:45 +0000 (15:17 +0000)]
Fix IPFW2 build.

Submitted by: qhwt@myrealbox.com

20 years agoSeparate all of the send{to,msg} and recv{from,msg} syscalls and create
David P. Reese, Jr. [Fri, 19 Sep 2003 08:02:27 +0000 (08:02 +0000)]
Separate all of the send{to,msg} and recv{from,msg} syscalls and create
kern_sendmsg() and kern_recvmsg().  The functions sendit() and recvit()
are now no more.

Rewrite the related legacy syscalls and place them in the 43bsd emulation
directory.  Also move the definition of omsghdr to the emulation directory.

20 years agoImport prebinding code into DragonFly, based on Matthew N. Dodd's
Matthew Dillon [Thu, 18 Sep 2003 21:23:06 +0000 (21:23 +0000)]
Import prebinding code into DragonFly, based on Matthew N. Dodd's
patch for FreeBSD-5.

Submitted-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
Minor-Security-Additions-by: dillon
20 years agoOptimize out an unneeded bzero().
Jeffrey Hsu [Thu, 18 Sep 2003 20:05:00 +0000 (20:05 +0000)]
Optimize out an unneeded bzero().

20 years agoReset the retransmit counter when setting the timer on a failed
Jeffrey Hsu [Thu, 18 Sep 2003 18:32:55 +0000 (18:32 +0000)]
Reset the retransmit counter when setting the timer on a failed
ip_output().  This prevents ENOBUFS errors from later inadvertently
timing out a connection prematurely.

Switch over to the persist timer while we're at it.

Problem reported by: Jayanth Vijayaraghavan <jayanth@yahoo-inc.com>
Obtained from: BSD/OS

20 years agoAdd the linux(4) manual page.
Hiten Pandya [Wed, 17 Sep 2003 23:08:13 +0000 (23:08 +0000)]
Add the linux(4) manual page.

Obtained from:    FreeBSD

20 years agoCorrect address parsing bug that is believed to be remotely exploitable.
David Rhodus [Wed, 17 Sep 2003 15:58:48 +0000 (15:58 +0000)]
Correct address parsing bug that is believed to be remotely exploitable.

20 years agoClean up.
David Rhodus [Wed, 17 Sep 2003 02:07:42 +0000 (02:07 +0000)]
Clean up.

s/^$/\n\/g inside of strings

20 years agoAdditional ssh patches relating to the same fatal() cleanup issue. They
Matthew Dillon [Wed, 17 Sep 2003 02:01:05 +0000 (02:01 +0000)]
Additional ssh patches relating to the same fatal() cleanup issue.  They
should just fix 'fatal' to not try to clean things up but, oh well.  This
is a slightly modified security fix from 3.7.1.

20 years agoFix a DIAGNOSTIC check in the heavy-weight switch code. A thread's process is
Matthew Dillon [Tue, 16 Sep 2003 20:03:35 +0000 (20:03 +0000)]
Fix a DIAGNOSTIC check in the heavy-weight switch code.  A thread's process is
normally in the SRUN state but can also be preempted while moving into
the SZOMB (zombie) state.

Report-by: "David P. Reese, Jr." <daver@gomerbud.com>
20 years agoLeftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 18:05:17 +0000 (18:05 +0000)]
Leftover netisr consolidation cleanups.

Submitted by: hmp

20 years agoAdditional comments: ssh may attempt to zero and free the buffer from
Matthew Dillon [Tue, 16 Sep 2003 16:59:41 +0000 (16:59 +0000)]
Additional comments: ssh may attempt to zero and free the buffer from
fatal().  The incorrect buffer size at the time fatal() is called will
cause it to zero an area larger then has actually been allocated.  Since
meta-data is not inline with the allocation on FreeBSD (and hence DragonFly)
systems it is believed that the worst that can happen is a crash.  On linux
systems, however, it may be possible to exploit the flaw to gain elevated
privs.

20 years agoupdate version to match FreeBSD after buffer security fix.
Matthew Dillon [Tue, 16 Sep 2003 16:46:28 +0000 (16:46 +0000)]
update version to match FreeBSD after buffer security fix.

20 years ago Do not record expanded size before attempting to reallocate
David Rhodus [Tue, 16 Sep 2003 16:12:00 +0000 (16:12 +0000)]
 Do not record expanded size before attempting to reallocate
 associated memory.

20 years agoLeftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 09:14:40 +0000 (09:14 +0000)]
Leftover netisr consolidation cleanups.

20 years agoLeftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 06:25:35 +0000 (06:25 +0000)]
Leftover netisr consolidation cleanups.