phk [Fri, 9 Aug 2002 10:15:48 +0000 (10:15 +0000)]
Introduce a new error return code:
#define EDOFUS 88 /* Programming error */
This can be used to signal error situations which indicate that the
program logic or assumptions is deficient.
jhay [Fri, 9 Aug 2002 07:45:42 +0000 (07:45 +0000)]
Add a third floppy to releases. It will only be built if there is a
release/${TARGET}/drivers.conf file which list drivers that have to
go into the third floppy.
Also shuffle i386/drivers.conf so that the floppies don't overflow
anymore. Anybody with real/better usage statistics is welcome to
shuffle it differently.
obrien [Fri, 9 Aug 2002 05:21:01 +0000 (05:21 +0000)]
Don't auto load ACPI -- it causes trouble with my laptop and is TOTALLY
undocumented how to control its loading and queries to freebsd-current
go unanswered.
rwatson [Fri, 9 Aug 2002 03:09:38 +0000 (03:09 +0000)]
Update TE policy and MAC text conversion routines to support partial
label updates. Biba and MLS already supported this. This permits the
userland library to submit relative updates on MAC labels, rather
than submitting an entire label to replace the current label. This
also requires changes to the MAC modules, which are forthcoming.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
iedowse [Fri, 9 Aug 2002 01:21:03 +0000 (01:21 +0000)]
Improve the code for detecting UID ranges so that usernames such
as "2-xhibit" are not considered as a range. Fix a problem where
the code would forget to increment argv.
alc [Thu, 8 Aug 2002 19:12:36 +0000 (19:12 +0000)]
o Use pmap_page_is_mapped() in vm_page_protect() rather than the PG_MAPPED
flag. (This is the only place in the entire kernel where the PG_MAPPED
flag is tested. It will be removed soon.)
yar [Thu, 8 Aug 2002 17:53:52 +0000 (17:53 +0000)]
Rework storing files thoroughly. This includes:
o Remove the race between stat(2) & fopen(3) when creating
a unique file.
o Improve bound checking when generating a unique name from
a given pathname.
o Ignore REST marker on APPE. No RFC specifies this case,
but the idea of resuming APPE's implies this.
o By default, deny upload resumes and appends by anonymous users.
Previously these commands were translated to STOU silently,
which led to broken files on server without any notification
to the user.
o Add an option, -m, to allow anonymous users to modify
existing files (e.g., to resume uploads) if filesystem
permissions permit.
kan [Thu, 8 Aug 2002 17:28:07 +0000 (17:28 +0000)]
Use '_end' symbol instead of 'end' to initialize minbrk and curbrk
variables. Both symbols are set to the same value by the linker,
and _end symbol has less chances to clash with application defined
global symbols.
alpha, ia64 and sparc64 ports already use _end, i386 is now
consistent with them.
jdp [Thu, 8 Aug 2002 15:53:23 +0000 (15:53 +0000)]
Don't acquire the writer lock in rtld_exit when clearing the shared
objects' reference counts. This function is called by the atexit
mechanism at program shutdown. I don't think the locking is necessary
here. It caused OpenOffice builds to hang more often than not.
Credit to Martin Blapp and Matt Dillon for helping to diagnose this
problem and for testing the fix.
The intent in rev. 1.299 was to make the CPUTYPE assignment type check
bother "only those who attempts to set it to a different value". This
got broken in rev. 1.300 (that fixed another race).
bmilekic [Thu, 8 Aug 2002 13:29:32 +0000 (13:29 +0000)]
YIKES, I take the pointy-hat for a really big braino here. I
appologize to those of you who may have been seeing crashes in
code that uses sendfile(2) or other types of external buffers
with mbufs.
Pointed out by, and provided trace:
Niels Chr. Bank-Pedersen <ncbp at bank-pedersen.dk>
rwatson [Thu, 8 Aug 2002 12:45:30 +0000 (12:45 +0000)]
Due to layering problems, remove the MAC checks from vn_rdwr() -- this
VOP wrapper is called from within file systems so can result in odd
loopback effects when MAC enforcement is use with the active (as
opposed to saved) credential. These checks will be moved elsewhere.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
sos [Thu, 8 Aug 2002 07:59:24 +0000 (07:59 +0000)]
Add DVD+RW support to the ATA driver and burncd. This also closes
PR40430 by "Peter Haight <peterh@sapros.com>" that has semilar patches
included and which I merged with my own work.
HW sponsored by: FreeBSD Foundation & FreeBSD Mall Inc
julian [Thu, 8 Aug 2002 06:18:41 +0000 (06:18 +0000)]
Do some work on keeping better track of stopped/continued state.
I'm not sure what happenned to the original setting of the P_CONTINUED
flag. it appears to have been lost in the paper shuffling...
ache [Thu, 8 Aug 2002 05:51:54 +0000 (05:51 +0000)]
Rewrite locale loading procedures, so any load failure will not affect
currently cached data. It allows a number of nice things, like: removing
fallback code from single locale loading, remove memory leak when LC_CTYPE
data loaded again and again, efficient cache use, not only for
setlocale(locale1); setlocale(locale1), but for setlocale(locale1);
setlocale("C"); setlocale(locale1) too (i.e. data file loaded only once).
ambrisko [Wed, 7 Aug 2002 22:31:27 +0000 (22:31 +0000)]
Fixes for the D-Link DFE-580 card.
This is pretty much fixes any issue I can find:
- Watchdog timeouts were due to starting the TX DMA engine
before we had a packet ready for it. So the first packet
sent never got out only if we sent more then one packet
at a time did the others make it out and not blow up.
Of course reseting the chip then caused us not to transmit
the first packet again ie. catch-22. This required logic changes.
- Combine interrupts on TX packets being queued up.
- Don't keep running around the RX ring since we might get
out of sync so only go around once per receive
- Let the RX engine recover via the poll interface which is
similar to the TX interface. This way the chip wakes
up with no effort when we read enough packets.
- Do better hand-shaking on RX & TX packets so they don't
start of to soon.
- Force a duplex setting when the link comes up after
an ste_init or it will default to half-duplex and be
really slow. This only happens on subsequent ste_init.
The first one worked.
- Don't call stat_update for every overflow. We only monitor
the collisions so the tick interval is good enough for that.
Just read in the collision stats to minimize bus reads.
- Don't read the miibus every tick since it uses delays and
delays are not good for performance.
- Tie link events directly to the miibus code so the port
gets set correctly if someone changes the port settings.
- Reduce the extreme number of {R,T}FD's. They would consume
130K of kernel memory for each NIC.
- Set the TX_THRESH to wait for the DMA engine to complete
before running the TX FIFO. This hurts peak TX performance
but under bi-directional load the DMA engine can't keep up
with the FIFO. Testing shows that we end up in the case
anyways (a la dc(4) issues but worse since the RX engine hogs
everything).
- When stopping the card do a reset since the reset verifies the
card has stopped. Otherwise on heavy RX load the RX DMA engine
is still stuffing packets into memory. If that happens after
we free the DMA area memory bits get scribled in memory and
bad things happen.
This card still has seemingly unfixable issues under heavy RX load in
which the card takes over the PCI bus.
ambrisko [Wed, 7 Aug 2002 22:18:33 +0000 (22:18 +0000)]
Only attach one PHY device to a controller. NetBSD has similar code.
The D-Link DFE-580 card will otherwise show 2 miibuses for each controller
and therefore 2 ukphy's.
rwatson [Wed, 7 Aug 2002 20:15:29 +0000 (20:15 +0000)]
Correct a bug introduced in 1.26: M_PKTHDR is set in the 'flags'
argument, not the 'type' argument. As a result of the buf, the
MAC label on some packet header mbufs might not be set in mbufs
allocated using m_getcl(), resulting in a page fault.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
rwatson [Wed, 7 Aug 2002 19:30:16 +0000 (19:30 +0000)]
Cache the credential provided during accton() for use in later accounting
vnode operations. This permits the rights of the user (typically root)
used to turn on accounting to be used when writing out accounting entries,
rather than the credentials of the process generating the accounting
record. This fixes accounting in a number of environments, including
file systems that offer revocation support, MAC environments, some
securelevel scenarios, and in some NFS environments.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
rwatson [Wed, 7 Aug 2002 17:53:31 +0000 (17:53 +0000)]
Refresh the credential on the first initproc thread following divorcing
the initproc credential from the proc0 credential. Otherwise, the
proc0 credential is used instead of initproc's credentil when authorizing
start_init() activities prior to initproc hitting userland for the
first time. This could result in the incorrect credential being used
to authorize mounting of the root file system, which could in turn cause
problems for NFS when used in combination with uid/gid ipfw rules, or
with MAC.
luigi [Wed, 7 Aug 2002 16:08:54 +0000 (16:08 +0000)]
Use new interface for ether_input().
Remove some unnecessary assignments to mbuf fields in sis_newbuf(),
the "length" fields are of no use while the mbuf is in the receive ring.
Makefile.inc1 may eventually be merged with Makefile, so fix an
endless recursion bug similar to the one that has been fixed in
release/Makefile,v 1.698, in advance. A related fix to make(1)
has been committed in make/main.c,v 1.68.
iwasaki [Wed, 7 Aug 2002 12:48:28 +0000 (12:48 +0000)]
Improve stack manipulation code of ACPI wakeup routine.
The new code just override stack top value with saved return address
rather than pop/push operation.
iedowse [Tue, 6 Aug 2002 19:31:04 +0000 (19:31 +0000)]
Our awk does not implement the ARGIND variable, so we were attempting
to parse the binary .kld file as a list of symbols. Fix this by
simply deleting the unwanted argument from the ARGV[] array instead
of trying to skip over it.
alc [Tue, 6 Aug 2002 19:01:08 +0000 (19:01 +0000)]
Set the ident field of the struct kevent that is registered by _aio_aqueue()
to the address of the user's aiocb rather than the kernel's aiocb. (In other
words, prior to this change, the ident field returned by kevent(2) on
completion of an AIO was effectively garbage.)
jake [Tue, 6 Aug 2002 18:56:41 +0000 (18:56 +0000)]
Remove new console devices with cnremove before initializing them in
cninit. This allows a console driver to replace the existing console
by calling cninit again, eg during the device probe. Otherwise the
multiple console code sends output to both, which is unfortunate if
they're using the same hardware.
truckman [Tue, 6 Aug 2002 11:28:09 +0000 (11:28 +0000)]
Don't automagically call vslock() from SYSCTL_OUT(). Instead, complain
about calls to SYSCTL_OUT() made with locks held if the buffer has not
been pre-wired. SYSCTL_OUT() should not be called while holding locks,
but if this is not possible, the buffer should be wired by calling
sysctl_wire_old_buffer() before grabbing any locks.
grog [Mon, 5 Aug 2002 23:54:22 +0000 (23:54 +0000)]
Remove Australia from list of locations supposedly having a bank
holiday on 6 August. Since this claim isn't dependent on the weekday,
I have my strong doubts about the other locations too, but I can't
confirm, so I'm leaving them in.