harti [Wed, 22 Oct 2003 07:35:05 +0000 (07:35 +0000)]
Remove a gcc-ism: declaring a variable array at the end of a structure
as [0] and replace it with the ISO way of writing []. This has caused
warnings with WARNS=6.
mjacob [Tue, 21 Oct 2003 21:52:23 +0000 (21:52 +0000)]
Turn off ISP_SMPLOCK- not to be turned on again.
Until we can have perfect knowledge that all callers above us think it's okay
for us to sleep, releasing *our* locks of course, we don't dare try and sleep.
alc [Tue, 21 Oct 2003 19:36:51 +0000 (19:36 +0000)]
- Assert that the containing vm object is locked in
vm_page_set_validclean(). (This function reads and modifies the
vm page's valid field, which is synchronized by the lock on the
containing vm object.)
sos [Tue, 21 Oct 2003 19:20:37 +0000 (19:20 +0000)]
Fix the DMA problem that most severely hit on the DS3112a SATA chip
in connection with Marvell based SATA->PATA dongles.
The problem was caused by a combination of things working
together to make it hard to spot...
The ATA driver has always started the ATA command, then build
the SG list for DMA and then finally started the DMA engine.
While this is according to specs, it poses a potential
problem as some controllers apparently do not allow for unlimitted
time between starting the ATA command and starting the DMA engine.
At about the same time as ATAng was committed there were lots
of other changes applied, some of which was locking in parts
that causes the busdma load functions to take significantly
longer to load the SG list.
This pushed the time spent between starting the ATA command and
starting the DMA engine over the hill for some controllers
(especially the Silicon Image DS3112a) and caused what looked
like lost interrupts.
The solution is to get all the SG list work or rather all
busdma related stuff done before we even try to start anything.
This has the nice side effect of seperating busdma out the
way it should be, so the working of the ATA machinery is not
cluttered up with busdma droppings, making the code easier
to read and understand.
imp [Tue, 21 Oct 2003 19:15:29 +0000 (19:15 +0000)]
Modernize examples/usage. Kill 1200/300 baud modem entries and
instead use 14.4kbps and faster modems as examples. Separate line
speed and baud rate and be careful when talking of one verses the
other.
silby [Tue, 21 Oct 2003 18:28:36 +0000 (18:28 +0000)]
Change all SYSCTLS which are readonly and have a related TUNABLE
from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide
more useful error messages.
tjr [Tue, 21 Oct 2003 11:00:33 +0000 (11:00 +0000)]
Reject negative ngrp arguments in linux_setgroups() and linux_setgroups16();
stops users being able to cause setgroups to clobber the kernel stack by
copying in data past the end of the linux_gidset array.
scottl [Tue, 21 Oct 2003 07:03:27 +0000 (07:03 +0000)]
Don peril-sensitive sunglasses and mark pipe(2) as MPSAFE. I've beaten up
on it for the last 15 hours with no signs of problems. It gives a small
(1%) gain on buildworld since pipe_read/pipe_write are already free of Giant.
phk [Tue, 21 Oct 2003 06:58:58 +0000 (06:58 +0000)]
Retire bio_caller2 (alias for b_io.bio_caller2), this field is reserved
for dev_strategy() use.
Retire bio_driver[12] (aliases for b_io.bio_driver[12]) these fields are
reserved for device driver use and can as such never have any interest
in the buf end of things.
imp [Tue, 21 Oct 2003 03:22:49 +0000 (03:22 +0000)]
baud rate and bit rate were horribly confused in this document. Baud
rate is how fast modems exchange symbols. Bit rate is how many bits
per second the serial port nominally communicates at. Try to use bit
rate consistently where that's what is ment. The default data rate is
now 9600 baud. 300 baud being default pre-dates 4.4-LITE1. Document
that tip doesn't respect the system default rate for a given channel.
Sorry guys, but no ucbvax, kremvax or kgbvax added to the example.
phk [Mon, 20 Oct 2003 20:13:50 +0000 (20:13 +0000)]
When a numeric field overflows its width, try formatting the number in
'kilo' or 'mega' with appropriate suffix instead of filling the field
with stars.
alc [Mon, 20 Oct 2003 18:24:38 +0000 (18:24 +0000)]
Initialize the buf's b_object in pbgetvp(). Clear it in pbrelvp(). (This
facilitates synchronization of the vm page's valid field using the
vm object's lock.)
dds [Mon, 20 Oct 2003 13:52:22 +0000 (13:52 +0000)]
Bring the description of st_[cma]time modification conditions a bit
closer to reality. More work remains to be done. st_mtime should
be the most complete based on IEEE Std 1003.1, 2003 Edition, a
review of ufs_vnops.c, and some experimentation.
tjr [Mon, 20 Oct 2003 10:38:48 +0000 (10:38 +0000)]
Fix some security bugs in the SVR4 emulator:
- Return NULL instead of returning memory outside of the stackgap
in stackgap_alloc() (FreeBSD-SA-00:42.linux)
- Check for stackgap_alloc() returning NULL in svr4_emul_find(),
and clean_pipe().
- Avoid integer overflow on large nfds argument in svr4_sys_poll()
- Reject negative nbytes argument in svr4_sys_getdents()
- Don't copy out past the end of the struct componentname
pathname buffer in svr4_sys_resolvepath()
- Reject out-of-range signal numbers in svr4_sys_sigaction(),
svr4_sys_signal(), and svr4_sys_kill().
- Don't malloc() user-specified lengths in show_ioc() and
show_strbuf(), place arbitrary limits instead.
- Range-check lengths in si_listen(), ti_getinfo(), ti_bind(),
svr4_do_putmsg(), svr4_do_getmsg(), svr4_stream_ti_ioctl().
imp [Mon, 20 Oct 2003 10:26:54 +0000 (10:26 +0000)]
Update to using a 56k modem connection, plus add some verbage about
what the entry does for people that are not used to reading
/etc/remote files every day. Keep arpavax, because it is a cool name,
but remove the phone number listed. arpavax hasn't been answering
that number for a while :-)
phk [Mon, 20 Oct 2003 07:04:09 +0000 (07:04 +0000)]
When a driver successfully created a device on demand, we can directly
pick up the DEVFS inode number from the dev_t and find our directory
entry from that, we don't need to scan the directory to find it.
This also solves an issue with on-demand devices in subdirectories.
marcel [Mon, 20 Oct 2003 05:34:10 +0000 (05:34 +0000)]
Put the RSE backing store at a fixed address. This change is triggered
by libguile that needs to know the base of the RSE backing store. We
currently do not export the fixed address to userland by means of a
sysctl so user code needs to hardcode it for now. This will be revisited
later.
The RSE backing store is now at the bottom of region 4. The memory stack
is at the top of region 4. This means that the whole region is usable
for the stacks, giving a 61-bit stack space.
silby [Sun, 19 Oct 2003 23:05:19 +0000 (23:05 +0000)]
Fix a problem where m_defrag would allocate a new mbuf to replace the
chain passed into dc_encap, which dc_start was unaware of. This caused
the old (now invalid) mbuf to be passed to BPF_MTAP.
phk [Sun, 19 Oct 2003 22:12:23 +0000 (22:12 +0000)]
Add a testcase which validates that the same buffer can be passed to
rijndael_blockDecrypt() as both input and output.
This property is important because inside rijndael we can get away
with allocating just a 16 byte "work" buffer on the stack (which
is very cheap), whereas the calling code would need to allocate the
full sized buffer, and in all likelyhood would have to do so with
an expensive malloc(9).
iedowse [Sun, 19 Oct 2003 21:49:44 +0000 (21:49 +0000)]
Change the default mode for lost+found from 01777 to 0700. The
original intention of the less restrictive permissions was to allow
users to move or delete recovered files that they own. However, it
is better to not create world-writable directories by default; the
administrator can always pre-create lost+found if different permissions
are desired.
ume [Sun, 19 Oct 2003 21:28:34 +0000 (21:28 +0000)]
- revert to old rijndael code. new rijndael code broke gbde.
- since aes-xcbc-mac and aes-ctr require functions in new
rijndael code, aes-xcbc-mac and aes-ctr are disabled for now.
dwmalone [Sun, 19 Oct 2003 20:41:07 +0000 (20:41 +0000)]
falloc allocates a file structure and adds it to the file descriptor
table, acquiring the necessary locks as it works. It usually returns
two references to the new descriptor: one in the descriptor table
and one via a pointer argument.
As falloc releases the FILEDESC lock before returning, there is a
potential for a process to close the reference in the file descriptor
table before falloc's caller gets to use the file. I don't think this
can happen in practice at the moment, because Giant indirectly protects
closes.
To stop the file being completly closed in this situation, this change
makes falloc set the refcount to two when both references are returned.
This makes life easier for several of falloc's callers, because the
first thing they previously did was grab an extra reference on the
file.
alc [Sun, 19 Oct 2003 20:39:06 +0000 (20:39 +0000)]
- Add vm object locking to vfs_clean_pages() and vfs_bio_set_validclean().
This is to synchronize access to the vm page's valid field by
vm_page_set_validclean().
cognet [Sun, 19 Oct 2003 02:09:36 +0000 (02:09 +0000)]
Fix broken su -m behaviour :
chshell must return 0 if the shell is not a standard shell, or else it is
possible to use an account without a valid shell.
davidxu [Sun, 19 Oct 2003 00:57:10 +0000 (00:57 +0000)]
Use npxdrop in cpu_thread_exit to save some cycles.
Clear FPU pcb flags for new upcall thread, these flags needn't
be inherited, the new thread should start from clean FPU status.
gshapiro [Sun, 19 Oct 2003 00:31:50 +0000 (00:31 +0000)]
Before trying to restart/stop the MTA or MSP queue runner, make sure
we are configured to use an MTA or MSP queue runner. Otherwise the
script used to complain about the missing PID file.
gshapiro [Sun, 19 Oct 2003 00:03:13 +0000 (00:03 +0000)]
Adding WorkAroundBrokenAAAA seems a necessity even in the submit.mc given
the number of broken DNS servers out there in the world. Since we are
diverging from the sendmail.org submit.mc, it's time to make our own
freebsd.submit.mc.
njl [Sat, 18 Oct 2003 22:25:07 +0000 (22:25 +0000)]
Add the cpu_idle_hook() function pointer so that other idlers can be
hooked at runtime. Make C1 sleep (e.g., HLT) be the default. This
prepares the way for further ACPI sleep states.
alc [Sat, 18 Oct 2003 21:09:21 +0000 (21:09 +0000)]
- Increase the object lock's scope in vm_contig_launder() so that access
to the object's type field and the call to vm_pageout_flush() are
synchronized.
- The above change allows for the eliminaton of the last parameter
to vm_pageout_flush().
- Synchronize access to the page's valid field in vm_pageout_flush()
using the containing object's lock.