Commit graph

78599 commits

Author SHA1 Message Date
John Polstra 0df23e4bd5 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.
2002-08-08 15:53:23 +00:00
Warner Losh fd78f7e0f3 Don't bogusly depend on pcic. pccard should be enough.
Noticed by: jhay
Forgotten  about for two years by: imp
2002-08-08 15:52:55 +00:00
Ruslan Ermilov d4f7b113f1 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).

Reported by:	ache
2002-08-08 15:43:23 +00:00
Bosko Milekic 850be9af25 Only my brain can fart while fixing a previous brain fart. 2002-08-08 13:31:57 +00:00
Bosko Milekic 0584320e56 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>
2002-08-08 13:29:32 +00:00
Robert Watson 92e35b6006 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
2002-08-08 12:45:30 +00:00
Josef Karthauser 3b7efc56d0 Use the hw.usb sysctl tree instead of debug.usb.
Requested by:	imp
2002-08-08 12:05:51 +00:00
Søren Schmidt b2e73852e5 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

Enjoy!
2002-08-08 07:59:24 +00:00
Julian Elischer 6933e3c12b 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...

Submitted by:	David Xu <bsddiy@yahoo.com>
2002-08-08 06:18:41 +00:00
Julian Elischer 0f2fe5396f EAK! two status flags in teh proc structure were defined to the
same value!

Picked up by: David Xu <bsddiy@yahoo.com>
2002-08-08 06:09:32 +00:00
Andrey A. Chernov 76692b8025 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).
2002-08-08 05:51:54 +00:00
Mike Barcroft af8c0bce98 Implement POSIX.1-2001 (XSI)'s ulimit(3).
Submitted by:	Kyle Martin <mkm@ieee.org>
2002-08-08 04:50:36 +00:00
Andrey A. Chernov 315009a483 Set errno to ENOMEM for strdup too (due to malloc errno bug) 2002-08-07 23:52:28 +00:00
Doug Ambrisko d44ef39e51 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.

Sponsored by:	Vernier Networks
MFC after:	1 week
2002-08-07 22:31:27 +00:00
Doug Ambrisko 130be1f120 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.

Sponsored by:	Vernier Networks
MFC after:	1 week
2002-08-07 22:18:33 +00:00
Jeff Roberson 780bb93d31 - Adjust locking markup to match the proc markup.
- Add a comment about the current, unfinished, state of vnode locking.

Suggested by:	bde
2002-08-07 22:05:34 +00:00
Andrey A. Chernov cb9772d882 Always set errno to ENOMEM after malloc failed (as workaround).
Our malloc sometimes forget to set errno, f.e. for size overflow case.
2002-08-07 22:03:46 +00:00
Andrey A. Chernov 57473ad215 Reset __mb_cur_max to 1 when "C" or "POSIX" locales loaded after multibyte one 2002-08-07 20:49:25 +00:00
Andrey A. Chernov 45206d5c69 Fix wrong address when EucInfo > "variable" size 2002-08-07 20:20:56 +00:00
Robert Watson 55ac5e1861 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
2002-08-07 20:15:29 +00:00
Archie Cobbs a8ee7a0256 Correct an inaccuracy in this man page regarding detecting empty fields.
MFC after:	2 days
2002-08-07 20:08:50 +00:00
Thomas Moestl d88d37d604 Use the CPU_* OID constants instead of OID_AUTO for the clock-related
sysctls for compatability with old applications.
2002-08-07 19:43:54 +00:00
Alan Cox dde5f1949f o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-07 19:37:22 +00:00
Robert Watson 2d70161756 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
2002-08-07 19:30:16 +00:00
Garrett Wollman 4879739808 Document file descriptor reopening and current standardization status. 2002-08-07 18:03:30 +00:00
Alan Cox 33559722db o Introduce pmap_page_is_mapped(). Its purpose is to obsolete
the PG_MAPPED flag.
2002-08-07 18:03:00 +00:00
Andrey A. Chernov 6892b144e8 Style fixes in preparation for rewritting 2002-08-07 18:02:45 +00:00
Robert Watson 4d1a4bb79f 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.

Discussed with:	julian
2002-08-07 17:53:31 +00:00
Ruslan Ermilov e2f55267f6 Added Russian translation of the .Ex -std macro.
MFC after:	3 days
2002-08-07 17:47:24 +00:00
Ruslan Ermilov db6191194b POSIX.1-2001 says ``man -k'' should produce results equivalent to
the ``grep -Ei'' searching.

MFC after:	3 days
2002-08-07 17:39:35 +00:00
Hajimu UMEMOTO 09b1c35707 Add capability for limiting the maximum number of simultaneous
invocations of each service from a single IP address.

Requested by:	matusita
Reviewed by:	dwmalone
Tested by:	matusita on snapshots.jp.FreeBSD.org
MFC after:	2 weeks
2002-08-07 17:03:14 +00:00
Andrey A. Chernov 1491b31e18 Style fixes 2002-08-07 16:49:20 +00:00
Andrey A. Chernov ecc4c62066 Style fixes in preparation of code rewritting 2002-08-07 16:45:23 +00:00
Luigi Rizzo ffe4fbf0fd 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.

MFC after: 3 days
2002-08-07 16:08:54 +00:00
Ruslan Ermilov 4e17db5b58 We no longer have a COPY. 2002-08-07 16:01:06 +00:00
Ruslan Ermilov 10a6b1ffc9 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.

Requested by:	bde (who has them merged already)
2002-08-07 13:41:46 +00:00
Ruslan Ermilov 19d732af8b Pacify ``make -f /dev/null -V FOO''. 2002-08-07 13:25:51 +00:00
Mitsuru IWASAKI be14b8e7ea 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.

Submitted by:	jhb
2002-08-07 12:48:28 +00:00
Matthew N. Dodd fb034d05ac Remove an unnecessary cast. 2002-08-07 11:35:18 +00:00
Matthew N. Dodd df95311a10 Move code block added in 1.157 to a safer part of fork1().
Submitted by:	 jake
2002-08-07 11:31:45 +00:00
Andrey A. Chernov dfb18183be Close descriptor, if error happens in loadCat() 2002-08-07 07:02:37 +00:00
Andrey A. Chernov 04a0be1f97 Back out workaround of fixing "suspend/fg" by price of breaking "stop $$/fg".
This is real kernel bug (threads) and don't attempt to mask it by
workarounds to increase chances to fix it in the kernel.
2002-08-07 05:44:50 +00:00
Warner Losh 6690540821 Add Intersil and Symbol as vendors for 802.11 cards that the wi driver
supports.

Obtained from: NetBSD
2002-08-07 05:40:34 +00:00
Jens Schweikhardt 5333b7726b Typo: s/seperately/separately
PR:		misc/41235
Submitted by:	Fesskat Tudeer <freebsd-fesskat@fesskat.org>
MFC after:	3 days
2002-08-06 20:36:02 +00:00
Semen Ustimenko 7ed000f774 Fix -o ac(reg|dir)(min|max) options. The appropriate flags weren't
translated from ALTF_* to NFSMNT_* thus these options weren't accepted
by kernel.

PR:		bin/30334
MFC after:	1 week
2002-08-06 20:26:30 +00:00
Ian Dowse ab6fc18e52 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.
2002-08-06 19:31:04 +00:00
Alan Cox b46f1c55f9 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.)

Submitted by:	Romer Gil <rgil@cs.rice.edu>
2002-08-06 19:01:08 +00:00
Jake Burkholder a520b73cdc 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.
2002-08-06 18:56:41 +00:00
Max Khon ae9e184e5e printf() formats fixes 2002-08-06 17:00:02 +00:00
Bruce A. Mah e774a21fd0 New release notes: SA-02:35, SA-02:36, SA-02:37. 2002-08-06 15:44:55 +00:00