Kenneth D. Merry [Sun, 20 Feb 2000 04:42:44 +0000 (04:42 +0000)]
Fix 'camcontrol inquiry'. The inquiry data structure changes (increased to
256 bytes) caused it to break on many devices.
The SCSI spec says that for commands with 8-bit length fields, a value of 0
means 256 bytes. As it turns out, many devices don't deal with that
properly. Some interpret the 0 as 0, and return no data. Others return
more than 256 bytes of data, and cause an overrun.
The fix is to tell the device we've only allocated SHORT_INQUIRY_LENGTH (36
bytes) of inquiry data, instead of sizeof(struct scsi_inquiry_data).
camcontrol.c: Change inq_len in the call to scsi_inquiry() to
SHORT_INQUIRY_LENGTH, and add a long comment
explaining the reason for the change.
scsi_all.h: Add a comment above the definitinon of
SHORT_INQUIRY_LENGTH alerting people that it is
both the initial probe inquiry length, and the
minimum amount of data needed for scsi_print_inquiry()
to function.
scsi_all.c: Add a comment about SHORT_INQUIRY_LENGTH being the
minimum amount of data needed for
scsi_print_inquiry() to function.
Robert Watson [Sun, 20 Feb 2000 02:51:11 +0000 (02:51 +0000)]
- As jail(8) has been almost completely rewritten, prepend another copyright/
BSD-style license, as an add-on to phk's beerware license. Please fedex
some beer to phk.
- Add a ``make depend'' line to the jail-building, which fixes openssl,
among other things. Suggested by: kris
- Add ``newaliases'' to the list of things to do when setting up a new
jail, so that the jailed sendmail doesn't complain.
- Correct references to ``kern.jail.set_hostname_allowed'' which now read
``jail.set_hostname_allowed''.
- Add a reference to sysctl.conf where the sysctl can easily be set in
a persistent way.
Robert Watson [Sun, 20 Feb 2000 01:10:36 +0000 (01:10 +0000)]
Disable chflags() from within jail() so that root within jail can't make
a mess in securelevel environments. Results in one warning during
/etc/rc as it attempts to remove file flags, but this is harmless.
Yoshinobu Inoue [Sat, 19 Feb 2000 16:10:16 +0000 (16:10 +0000)]
Change IPv6 scoped addr format again based on recent standard discussion.
Sorry for the flapping, but no change will be done for 4.0 anymore.
Official standard will be published around April or later.
If different format would be adopted at that time, then support for
the new format will be added to the succeeding FreeBSD 4.x.
Doug Rabson [Sat, 19 Feb 2000 09:44:06 +0000 (09:44 +0000)]
Remove the vga-pci driver. It serves no purpose and it hides the hardware
from useful drivers such as the 3D DRI drivers I will be porting for
hardware accelerated OpenGL. The hardware will still be reported during
boot using the nomatch system.
Søren Schmidt [Fri, 18 Feb 2000 20:57:33 +0000 (20:57 +0000)]
Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)
Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.
Lots of cosmetic fixes here and there.
Sorry for the size of this megapatchfromhell but it was not
possible otherwise...
newbus patches based on work from: dfr (Doug Rabson)
Robert Watson [Fri, 18 Feb 2000 19:02:22 +0000 (19:02 +0000)]
Fix up a few documentation nits in jail(8), as well as improve the
instructions so as to reduce warnings during jail startup, etc.
Add a somewhat bolder warning recommending the use of
kern.jail.set_hostname to limit jail renamining.
Invert the meaning of two questions in the Standard installation so just
whapping "Yes" by default does not turn you into an anonymous FTP-supporting
gateway machine. Those aren't the right "defaults."
Robert Watson [Fri, 18 Feb 2000 05:49:08 +0000 (05:49 +0000)]
Modify MAKEDEV to create four bpf devices instead of one when doing a
MAKEDEV all, making DHCP on multiple interfaces happier, and allowing use
of tcpdump to to debug DHCP, without creating more devices.
(we need devfs)
Modify MAKEDEV to create four tun devices in MAKEDEV all as well, since
we're being gratuitous with network pseudo-devices.
(we need devfs)
Bill Swingle [Fri, 18 Feb 2000 03:36:52 +0000 (03:36 +0000)]
ack. Ignore me. Log should read:
Added references to related man pages that should be under the
"See Also" section. The related PR mentions some missing man pages
that Jason has added to his to do list.
Mike Smith [Thu, 17 Feb 2000 23:33:57 +0000 (23:33 +0000)]
Increase the time we spend waiting for the controller to become ready to
accept a new command; in high load cases it may be too busy for the old
value.
This loop needs something to tie it to real time, rather than just the CPU's
ability to fetch from the L1 data cache, but this hack works for now.
Mike Smith [Thu, 17 Feb 2000 23:32:08 +0000 (23:32 +0000)]
Change the mountroot prompt to something that doesn't look at all like a
firmware prompt. Several sleepy folk mistook the '>>>' for the SRM
prompt, which was never the desired idea.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
Approved by: jkh
Bruce Evans [Thu, 17 Feb 2000 18:37:45 +0000 (18:37 +0000)]
Don't include <machine/ipl.h> in <sys/systm.h> in the i386 case. This
fixes some namespace pollution in general and breakage of modules that
aren't in the sys tree in particular (<machine/ipl.h> includes further
headers that aren't installed under /usr/include).
Reimplemented SPLASSERT() so that it is more machine independent and
less bloated and doesn't require the <machine/ipl.h> include spam.
In particular, don't assume that `cpl' can be printed using %08x
format. The alpha arch doesn't even have `cpl'. SPLASSERT() was
harmless on alphas because it isn't actually used.
Daniel C. Sobral [Thu, 17 Feb 2000 17:59:41 +0000 (17:59 +0000)]
If no distribution file is found, abort the installation. Previous
behavior silently ignored the problem. This affects installations
from a filesystem, and possible other types of media.
Daniel C. Sobral [Thu, 17 Feb 2000 17:57:40 +0000 (17:57 +0000)]
If the installation media disappears in the process of installing
a distribution, recognize it and treat as fatal media error. This
happens in the case of a timeout on FTP installations where the
user chooses not to select another FTP site, and resulted in
segmentation fault.
The default rule in this file actually sent mail to root as its default
action when denying access to a service. Unfortunately, this also makes
a dandy denial-of-service attack possible. Change to just log the event
and shoot a "go away" response back down the socket.
Bill Swingle [Thu, 17 Feb 2000 03:40:21 +0000 (03:40 +0000)]
From the PR:
The description of -X option in csh(1) manpage uses a wording
that references the descriptions of -x, -v and -V. This might
be a little confusing. Changed this to a complete description
that does not reference other paragraphs.
Bill Swingle [Thu, 17 Feb 2000 03:23:39 +0000 (03:23 +0000)]
From the PR:
The first paragraph of "Argument list processing" says that an
argument of - will make csh be a login shell. However, running
csh with only a - as an argument fails with the error message.
Bill Swingle [Thu, 17 Feb 2000 03:17:03 +0000 (03:17 +0000)]
From the PR:
Three minor changes to the manpage of chmod(1).
1. At the description of -H option, I added that symlinks are
not followed _by default_ to show that links can be followed,
but the default chmod behavior is not to do so.
2. Moved a misplaced .Va file command up to the place it belongs.
3. Simplified the grammar that describes symbolic modes.
Robert Watson [Wed, 16 Feb 2000 23:50:43 +0000 (23:50 +0000)]
Modified jail.8 to correct a typo (inetd_flas vs. inetd_flags), and add
a comment to the effect that I'm responsible for the additional
documentation, et al, so that phk gets fewer messages about my errors.
Matthew Dillon [Wed, 16 Feb 2000 21:11:33 +0000 (21:11 +0000)]
Fix null-pointer dereference crash when the system is intentionally
run out of KVM through a mmap()/fork() bomb that allocates hundreds
of thousands of vm_map_entry structures.
Add panic to make null-pointer dereference crash a little more verbose.
Add a new sysctl, vm.max_proc_mmap, which specifies the maximum number
of mmap()'d spaces (discrete vm_map_entry's in the process). The value
defaults to around 9000 for a 128MB machine. The test is scaled for the
number of processes sharing a vmspace (aka linux threads). Setting
the value to 0 disables the feature.
John Baldwin [Wed, 16 Feb 2000 07:00:16 +0000 (07:00 +0000)]
This patch to BTX fixes several small things:
1) Fix a bug in the int15 function 87 emulation where we only copied half
of what the BIOS asked for. This caused the Mylex RAID adapter to go
haywire and start trashing memory when you tried to boot from it.
2) Don't use interrupt 19 to reboot. Instead, set the reboot flag to a warm
boot and jump to the BIOS's reboot handler. int 19 doesn't clear memory
or restore the interrupt vector table, and thus really isn't safe. For
example, when booting off of PXE, the PXE BIOS eats up a chunk of memory
for its internal data and structures. Since we rebooted via int 19,
using the 'reboot' command in the loader resulted in that memory not
being reclaimed by the BIOS. Thus, after a few PXE boots, the system
was out of lower memory.
3) Catch any int 19 calls made by a BTX client or a user pressing
Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly. This
fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting
the user with a BTX fault.
Bill Fenner [Wed, 16 Feb 2000 04:39:00 +0000 (04:39 +0000)]
Fix coredump in gethostbyaddr() when the returned answer is too large to
fit in the static buffer. This fix causes it to look like there is no
data available, which is also wrong but is better than dumping core.
Joerg Wunsch [Tue, 15 Feb 2000 19:23:34 +0000 (19:23 +0000)]
Hide the boring ``not probed (disabled)'' messages behind `bootverbose'.
This unspams the boot messages, concentrating on the drivers that have
actually been probed.
This basically resurrects revision 1.106 from old /sys/i386/isa/isa.c.
Andrew Gallatin [Tue, 15 Feb 2000 18:47:51 +0000 (18:47 +0000)]
o Wilko Bulte has tested our AlphaServer 1000A ("Noritake") support
code & it survives a buildworld. So remove the dire warnings about
Noritake support being untested.
o Remove a disconserting printf() left over from NetBSD
Bruce Evans [Tue, 15 Feb 2000 17:29:09 +0000 (17:29 +0000)]
Fixed regressions in rev.1.274:
1) Non-AST4 multiport cards were broken by bypassing the code that changes
`idev' to the multiport master device.
2) AST4 multiport cards apparently were broken by inverting the test for
the master device having an irq.
3) Error handling for nonexistent master devices was broken by removing a
check for a null pointer.
4) `int' error codes returned by bus_get_resource() were assigned directly
to the boolean variable com->no_irq. Probably harmless, since the
boolean is implemented as a u_char.
Submitted by: part 1) by Chris Radek <cradek@in221.inetnebr.com>
part 2) by yokota
Approved by: jkh
Yoshinobu Inoue [Tue, 15 Feb 2000 15:59:12 +0000 (15:59 +0000)]
Fix bugs in telnet.
Sorry there were still several bugs.
-error retry at af missmatch was incomplete.
-af matching for source addr option was wrong
-socket was not freed at retry.
Yoshinobu Inoue [Tue, 15 Feb 2000 15:11:40 +0000 (15:11 +0000)]
Add -4 and -6 options.
Current getaddrinfo() implemetation has a problem of too much resolving
waiting time on INET6 enabled systems.
-4 and -6 options can limit name resolving address family and is a possible
workaround for the problem.