Matthew Dillon [Mon, 22 Sep 2003 21:45:44 +0000 (21:45 +0000)]
Add notation on the alignment requirement for the twe driver.
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>
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.
David Rhodus [Sun, 21 Sep 2003 04:27:16 +0000 (04:27 +0000)]
* de-__P()
David Rhodus [Sun, 21 Sep 2003 04:18:34 +0000 (04:18 +0000)]
* de- __P()
David Rhodus [Sun, 21 Sep 2003 04:13:50 +0000 (04:13 +0000)]
* de- __P()
Hiten Pandya [Sat, 20 Sep 2003 15:17:45 +0000 (15:17 +0000)]
Fix IPFW2 build.
Submitted by: qhwt@myrealbox.com
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.
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
Jeffrey Hsu [Thu, 18 Sep 2003 20:05:00 +0000 (20:05 +0000)]
Optimize out an unneeded bzero().
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
Hiten Pandya [Wed, 17 Sep 2003 23:08:13 +0000 (23:08 +0000)]
Add the linux(4) manual page.
Obtained from: FreeBSD
David Rhodus [Wed, 17 Sep 2003 15:58:48 +0000 (15:58 +0000)]
Correct address parsing bug that is believed to be remotely exploitable.
David Rhodus [Wed, 17 Sep 2003 02:07:42 +0000 (02:07 +0000)]
Clean up.
s/^$/\n\/g inside of strings
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.
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>
Jeffrey Hsu [Tue, 16 Sep 2003 18:05:17 +0000 (18:05 +0000)]
Leftover netisr consolidation cleanups.
Submitted by: hmp
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.
Matthew Dillon [Tue, 16 Sep 2003 16:46:28 +0000 (16:46 +0000)]
update version to match FreeBSD after buffer security fix.
David Rhodus [Tue, 16 Sep 2003 16:12:00 +0000 (16:12 +0000)]
Do not record expanded size before attempting to reallocate
associated memory.
Jeffrey Hsu [Tue, 16 Sep 2003 09:14:40 +0000 (09:14 +0000)]
Leftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 06:25:35 +0000 (06:25 +0000)]
Leftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 05:03:13 +0000 (05:03 +0000)]
Leftover netisr consolidation cleanups.
Jeffrey Hsu [Tue, 16 Sep 2003 01:58:00 +0000 (01:58 +0000)]
Add missing interface queue.
Jeffrey Hsu [Mon, 15 Sep 2003 23:38:15 +0000 (23:38 +0000)]
Centralize if queue handling.
Original patch against FreeBSD submitted by Jonathan Lemon.
Reviewed by Matt Dillon.
Matthew Dillon [Sun, 14 Sep 2003 21:14:53 +0000 (21:14 +0000)]
Permanently fix the 'allocating low physmem in early boot' problem which
can prevent device drivers from attaching ISA DMAable memory. New pages
are added bottom-up, alternating between the head and the tail of the
VM page free list, so both normal and zero'd-page requests allocate
free pages with higher physical memory addresses first. This allows
contigmalloc*() to locate free memory at lower physical addresses.
Matthew Dillon [Sun, 14 Sep 2003 16:38:48 +0000 (16:38 +0000)]
Remove unused thread pointers.
Matthew Dillon [Sun, 14 Sep 2003 16:35:58 +0000 (16:35 +0000)]
Change argument from proc to td.
Matthew Dillon [Sat, 13 Sep 2003 18:35:20 +0000 (18:35 +0000)]
Cleanup. Remove unused variable.
Jeffrey Hsu [Fri, 12 Sep 2003 12:26:04 +0000 (12:26 +0000)]
Non-semantic changing cleanups:
remove used variable
remove unneeded splnets
use a stack variable instead of dynamically allocating it.
Request room for one more syncache entry to guarantee
successful allocation later.
Consulted with: Jonathan Lemon <jlemon@flugsvamp.com>
Tested by: drhodus
David P. Reese, Jr. [Fri, 12 Sep 2003 00:43:31 +0000 (00:43 +0000)]
Create an emulation/43bsd directory and move the recently modified
compatibility syscalls there. Any future work on the COMPAT_43 code
should be split from the rest of the kernel and moved here.
Everything in the kernel that explicity uses the osockaddr structure
has been modified to include "emulation/43bsd/43bsd_socket.h".
There was one case where struct osockaddr was used in userland,
talk/talkd. This commit has a temporary fix for talk/talkd.
Robert Garrett [Wed, 10 Sep 2003 22:45:50 +0000 (22:45 +0000)]
allow this to compile
From Joerg Sonnenbergh
Robert Garrett [Wed, 10 Sep 2003 22:43:54 +0000 (22:43 +0000)]
The first a bug in pax and should be commited to FBSD, too.
Further info in OpenBSD's system/3455.
From: Joerg Sonnenberg
Robert Garrett [Wed, 10 Sep 2003 21:35:42 +0000 (21:35 +0000)]
The second fixes a dependency problem if compiling kernels
with ppp after "make depend".
from Joerg Sonnenberger
Matthew Dillon [Tue, 9 Sep 2003 17:02:07 +0000 (17:02 +0000)]
Add a cvsup tag, cvs-dfports
Matthew Dillon [Tue, 9 Sep 2003 16:59:26 +0000 (16:59 +0000)]
rename dport -> dfport
Matthew Dillon [Tue, 9 Sep 2003 16:49:31 +0000 (16:49 +0000)]
rename /usr/dports to /usr/dfports. Includes some CVS surgery.
Jeroen Ruigrok/asmodai [Tue, 9 Sep 2003 05:40:58 +0000 (05:40 +0000)]
Linux emulation has been working well for a while now, remove notice.
Matthew Dillon [Mon, 8 Sep 2003 23:50:34 +0000 (23:50 +0000)]
Add UPDATING note on /usr/dports
Matthew Dillon [Mon, 8 Sep 2003 23:47:21 +0000 (23:47 +0000)]
add relpath to the build Makefile
Matthew Dillon [Mon, 8 Sep 2003 23:39:23 +0000 (23:39 +0000)]
Add bsd.dport.mk, which Makefile's in /usr/dports will use instead of
bsd.port.mk. Modify bsd.port.mk to check for the existance of the same
port in /usr/dports and, if found, to cd into the dport and run the target
there.
NOTE: /usr/bin/relpath is required (see /usr/src/usr.bin/relpath).
Matthew Dillon [Mon, 8 Sep 2003 23:38:44 +0000 (23:38 +0000)]
Add the relpath utility which /usr/share/mk/bsd.port.mk will use to
figure out the relative port path so it can check for an override in
/usr/dports/
Matthew Dillon [Mon, 8 Sep 2003 18:36:04 +0000 (18:36 +0000)]
Cleanup some broken #include's for VESA.
Matthew Dillon [Mon, 8 Sep 2003 18:35:44 +0000 (18:35 +0000)]
Add DIRECTIO to LINT
Matthew Dillon [Mon, 8 Sep 2003 18:26:39 +0000 (18:26 +0000)]
Convert DIRECTIO code to DragonFly.
David P. Reese, Jr. [Sun, 7 Sep 2003 21:40:58 +0000 (21:40 +0000)]
Make the linux emulator use the newly split listen(), getsockname(),
getpeername(), and socketpair() syscalls.
Add a linux_copyout_sockaddr() function to make translation and copyout
of sockaddr structures painless.
David P. Reese, Jr. [Sun, 7 Sep 2003 20:36:11 +0000 (20:36 +0000)]
Change the split syscall naming convention from syscall1() to kern_syscall()
while moving the prototypes from sys/syscall1.h to sys/kern_syscall.h.
Split the listen(), getsockname(), getpeername(), and socketpair() syscalls.
Jeroen Ruigrok/asmodai [Sun, 7 Sep 2003 17:43:12 +0000 (17:43 +0000)]
Make sure a DiskOnKey never sends a sync_cache. This fixes the error
message when using my DiskOnKey.
Incidentally it also fixes FreeBSD/PR: 47793
Hiten Pandya [Sun, 7 Sep 2003 17:04:00 +0000 (17:04 +0000)]
Mdoc cleanup of section 4:
- Remove hard sentence breaks
- Order sections per mdoc(7) manual page
- Correct spellings
Matthew Dillon [Sat, 6 Sep 2003 22:45:08 +0000 (22:45 +0000)]
Make bind1() and accept1() non-static for linux emulator use.
Matt: added fix to long standing bug in getsockaddr() that could allocate
too little space and overrun the structure.
Submitted-by: "David P. Reese Jr." <daver@gomerbud.com>
David Rhodus [Sat, 6 Sep 2003 21:56:30 +0000 (21:56 +0000)]
Add NETNS to the LINT config file.
David Rhodus [Sat, 6 Sep 2003 21:51:12 +0000 (21:51 +0000)]
Inital cleanup work to make NETNS compile again
before someone tries to remove it. 8-)
Also fix a few small bugs and try to make
the code do the right thing.
Matthew Dillon [Sat, 6 Sep 2003 20:36:42 +0000 (20:36 +0000)]
Adjust linux emulation calls for bind and listen to use the new broken-out
kernel-available syscalls rather then simulating BSD syscalls.
Submitted-by: "David P. Reese Jr." <daver@gomerbud.com>
Matthew Dillon [Sat, 6 Sep 2003 20:34:35 +0000 (20:34 +0000)]
Make bind1() and accept1() non-static for linux emulator use.
Matt: added fix to long standing bug in getsockaddr() that could allocate
too little space and overrun the structure.
Submitted-by: "David P. Reese Jr." <daver@gomerbud.com>
Hiten Pandya [Sat, 6 Sep 2003 18:27:57 +0000 (18:27 +0000)]
Add MLINK mount_ufs(8) to mount(8).
Jeroen Ruigrok/asmodai [Sat, 6 Sep 2003 08:19:16 +0000 (08:19 +0000)]
Get rid of __P, the days of K&R support are long past.
Jeroen Ruigrok/asmodai [Sat, 6 Sep 2003 08:10:46 +0000 (08:10 +0000)]
Remove 'register' keyword while I am here.
The days that we could make better guesses about its use than a compiler are
long past us.
Add DragonFly ID to getsubopt.c, heapsort.c, and radixsort.c.
Jeroen Ruigrok/asmodai [Sat, 6 Sep 2003 08:00:07 +0000 (08:00 +0000)]
Fix dependency that long is always 32 bits. This does not work on (I)LP64
platforms.
This works for Itanium and i386, but on x86-64 and sparc64 it gives corrupted
values.
Submitted by: Hiroki Sato, FreeBSD PR 56502
Jeffrey Hsu [Fri, 5 Sep 2003 17:46:54 +0000 (17:46 +0000)]
Introduce the DDB_TRACE kernel config option to automatically print a stack
trace on panic. Use this in conjuction with DDB_UNATTENDED on machines
with a serial console to get a stack trace and immediately reboot the
machine on a panic.
Merged from FreeBSD-current.
David Rhodus [Fri, 5 Sep 2003 17:44:58 +0000 (17:44 +0000)]
Add a few more build options.
Hiten Pandya [Thu, 4 Sep 2003 23:46:59 +0000 (23:46 +0000)]
OK, fix build, while I am there, I will get some screw for my head
as well...
Reported by: DragonFly BuildBox
Reminded by: David Rhodus
Hiten Pandya [Thu, 4 Sep 2003 19:42:12 +0000 (19:42 +0000)]
Fix logic, flow and comments for previous (rev 1.9) change.
Reminded by: Bruce Evans and Alfred Perlstein
Hiten Pandya [Thu, 4 Sep 2003 18:56:35 +0000 (18:56 +0000)]
Change my e-mail.
Robert Garrett [Wed, 3 Sep 2003 23:51:48 +0000 (23:51 +0000)]
I am not certain but I believe this is what was intended, this I do know
it fixes the generic kernel build.
basically changed
- events = ap_events &
+ events = ap->a_events &
Matthew Dillon [Wed, 3 Sep 2003 16:30:12 +0000 (16:30 +0000)]
Adding missing '|' from last commit.
Hiten Pandya [Wed, 3 Sep 2003 14:30:57 +0000 (14:30 +0000)]
Check when M_PREPEND returns an empty mbuf.
This is just toe-dipping. There are so many instances like this
across the source base that more work needs to be done on it.
I have added /* XXX-MBUF */ comments in places where I could not
add checks for empty mbufs; this is helpful for future work because
it is a potential error point.
It is better to put a comment than panic() messages because it can
be used when the mbuf allocator is rewritten or is taught how to
handle memory starvation situations.
Hiten Pandya [Wed, 3 Sep 2003 14:19:06 +0000 (14:19 +0000)]
Pass only one argument to vm_page_hold() as a sane person would do.
Reported by: DragonFly BuildBox
Hiten Pandya [Wed, 3 Sep 2003 13:19:02 +0000 (13:19 +0000)]
Fix style nit.
Hiten Pandya [Wed, 3 Sep 2003 12:58:05 +0000 (12:58 +0000)]
Introduce a new poll operation bit, `POLLINGIGNEOF'. It is used for
ignoring EOFs on a FIFO. POLLIN/POLLRDNORM is converted withing the
FIFO implementation to effect the correct behaviour.
Yes... POLLINIGNEOF flag name is a bit hard on the eyes. :-(
Obtained from: FreeBSD
More information: FreeBSD GNATS (PR #34020)
Hiten Pandya [Wed, 3 Sep 2003 11:49:27 +0000 (11:49 +0000)]
Return a more sane error code, EPIPE. The EBADF error code is
misleading, since we have already got this far, and it's not a
bad file descriptor.
Obtained from: FreeBSD
Hiten Pandya [Wed, 3 Sep 2003 11:47:04 +0000 (11:47 +0000)]
Use vm_page_hold() instead of vm_page_wire().
Obtained from: FreeBSD
Matthew Dillon [Tue, 2 Sep 2003 22:25:04 +0000 (22:25 +0000)]
General cleanup, ANSIfication, and documentation. Prep work for the VFS
lookup overhaul. No operational changes.
Matthew Dillon [Tue, 2 Sep 2003 20:11:34 +0000 (20:11 +0000)]
Do a bit of Ansification, add some pmap assertions to catch the
improper use of certain pmap functions from an interrupt, similar to
FreeBSD-5, rewrite a number of comments, and surround some of the
pmap functions which manipulate per-cpu CMAPs with critical sections.
Jeffrey Hsu [Tue, 2 Sep 2003 10:05:52 +0000 (10:05 +0000)]
Differentiate between send and receive window variables.
Jeffrey Hsu [Tue, 2 Sep 2003 10:04:47 +0000 (10:04 +0000)]
Account for when Limited Transmit is not congestion window limited.
Hiten Pandya [Mon, 1 Sep 2003 01:14:55 +0000 (01:14 +0000)]
Respect ps_showallprocs when using the Proc file system.
Obtained from: FreeBSD GNATS (PR #42065) [needed cleanup]
Hiten Pandya [Mon, 1 Sep 2003 00:35:29 +0000 (00:35 +0000)]
1) Add new tunable, kern.syncdelay:
kern.syncdelay can be used to change the delay time between
file system data synchronization. This is useful when you
have notebooks.
2) Document the following sysctls:
kern.dirdelay, kern.metadelay and kern.filedelay
David Rhodus [Sun, 31 Aug 2003 21:32:09 +0000 (21:32 +0000)]
#include reorganization
Matthew Dillon [Sun, 31 Aug 2003 17:24:40 +0000 (17:24 +0000)]
cleanup: remove register keyword, ANSIze procedure arguments.
Matthew Dillon [Sat, 30 Aug 2003 18:49:28 +0000 (18:49 +0000)]
req->r_td can be NULL, remove KKASSERT() and fix check.
Matthew Dillon [Sat, 30 Aug 2003 18:29:23 +0000 (18:29 +0000)]
Fix sendfile() bug introduced by the message passing code. The call to
writev() was extracting the return code from the wrong UAP.
Hiten Pandya [Sat, 30 Aug 2003 16:57:22 +0000 (16:57 +0000)]
Add device identification for Intel 82801EB (ICH5) SMBus Controller.
Hiten Pandya [Sat, 30 Aug 2003 16:51:43 +0000 (16:51 +0000)]
Add device indentification for Intel 82801DC (ICH4) SMBus Controller.
Obtained from: FreeBSD (rev 1.4 of sys/dev/ichsmb/ichsmb_pci.c)
Jeroen Ruigrok/asmodai [Sat, 30 Aug 2003 15:21:57 +0000 (15:21 +0000)]
Add the RIPEMD-160 header file.
Obtained from: OpenBSD-CURRENT
Hiten Pandya [Fri, 29 Aug 2003 18:40:03 +0000 (18:40 +0000)]
Fix sorta critical bugs in fsdb(8); the @mtime and @atime reporting
functions used the value of the @ctime field of the on-disk inode.
Obtained from: FreeBSD GNATS (PR #44343)
Hiten Pandya [Fri, 29 Aug 2003 17:09:33 +0000 (17:09 +0000)]
Fix vmstat(1) diagnostic output.
Submitted by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Matthew Dillon [Thu, 28 Aug 2003 17:24:38 +0000 (17:24 +0000)]
At Jeffrey Hsu's suggestion (who follows USENIX papers far more closely the
I do), change the offset for new allocations out of each new zone we create
in order to spread-out L1/L2 cache use. Without this new allocations will
tend to front-load the cpu caches resulting in non-optimal memory accesses.
Hiten Pandya [Thu, 28 Aug 2003 02:42:00 +0000 (02:42 +0000)]
Fix the case when `-p' option of truss can be passed the pid of
the truss process itself, thus resulting in a deadlock.
Hiten Pandya [Thu, 28 Aug 2003 02:35:54 +0000 (02:35 +0000)]
Add a `-q' option to killall(1). This is helpful when you don't
want the nagging `no matching processes blah found' error message.
Obtained from: FreeBSD GNATS (PR #30542)
Hiten Pandya [Thu, 28 Aug 2003 02:22:38 +0000 (02:22 +0000)]
Optimize split(1) by using dynamic allocation for buffers.
Benchmark:
File: 300M file, 1024k splits
Old: 31.44 real 0.03 user 3.87 sys
New: 28.47 real 0.01 user 4.00 sys
In some cases, I have seen a difference of 10 to 20 for 'real'.
Originated from: FreeBSD GNATS (PR #22442)
Hiten Pandya [Thu, 28 Aug 2003 02:03:18 +0000 (02:03 +0000)]
Use addalias() to track the vnode if it not of a regular type.
This commit fixes the panic that occurs when /dev is mounted
over null, or if any vnode that is not of type VREG is accessed.
Hiten Pandya [Thu, 28 Aug 2003 01:48:18 +0000 (01:48 +0000)]
Fix style issue.
Hiten Pandya [Wed, 27 Aug 2003 17:13:22 +0000 (17:13 +0000)]
Add two useful macros that I have been meaning to add for quite
some time.
__cachealign:
The __cachealign macro can be used for cache line aligning structures
of small to medium size. It aligns the particular structure or
storage type to a system default cache line alignment, thus giving us
a much more better cache utilization by making the hardware work at
its best burst speeds.
__usereg:
The __usereg macro can/should be used when a function contains
arguments not more than 3. It can be very useful to us due to the
message-passing nature of the kernel.
NOTE: I have not modified any other source files to make use of this
macro yet. After I do some analysis, headers in sys/ which contain
small to medium sized structures will be modified to use the
__cachealign macro.
NOTE: No source files have been modified to make use of the __usereg
macro yet. This process can be automated, because the maximum number
of arguments that apply to this macro is 3.
Reviewed by: Matt
Matthew Dillon [Wed, 27 Aug 2003 15:55:18 +0000 (15:55 +0000)]
oops. Forgot a commit.
Hiten Pandya [Wed, 27 Aug 2003 13:49:39 +0000 (13:49 +0000)]
Remove `YOUR'.
David Rhodus [Wed, 27 Aug 2003 13:27:47 +0000 (13:27 +0000)]
Add USE_SLAB_ALLOCATOR into the config.
Robert Garrett [Wed, 27 Aug 2003 11:42:34 +0000 (11:42 +0000)]
final __P removal commit
there gone....
Robert Garrett [Wed, 27 Aug 2003 11:39:32 +0000 (11:39 +0000)]
fix __P
Robert Garrett [Wed, 27 Aug 2003 11:09:52 +0000 (11:09 +0000)]
fix typo from adding $DragonFly$ keyword
Robert Garrett [Wed, 27 Aug 2003 11:02:14 +0000 (11:02 +0000)]
remove oldstyle __P prototypes