Commit graph

105236 commits

Author SHA1 Message Date
Warner Losh 2eed2482ba Remove ahb, aha, ie, le and wl devices. They are all ISA/EISA only.
I went ahead and left in the ISA cards that also have pccard
attachments.  There's no way that these devices could attach.

OK'd by: peter
2004-07-22 22:29:45 +00:00
Warner Losh 6d1275e568 There is no pcic device on amd64. OLDCARD isn't supported, and
NEWCARD will call it something different.  and there are no ISA add-in
devices.
2004-07-22 22:28:34 +00:00
Robert Watson a6719c82b1 Push Giant acquisition down into fo_stat() from most callers. Acquire
Giant conditional on debug.mpsafenet in the socket soo_stat() routine,
unconditionally in vn_statfile() for VFS, and otherwise don't acquire
Giant.  Accept an unlocked read in kqueue_stat(), and cryptof_stat() is
a no-op.  Don't acquire Giant in fstat() system call.

Note: in fdescfs, fo_stat() is called while holding Giant due to the VFS
stack sitting on top, and therefore there will still be Giant recursion
in this case.
2004-07-22 20:40:23 +00:00
Warner Losh 0ab1b47fd4 More CardBus Bridges supported, o2micro better now 2004-07-22 20:22:36 +00:00
Warner Losh d9975d06e1 Add IDs from TI's web site. Reports from the field and inspection of
the data sheets leads me to believe these will just work.  Those parts
with the various media readers on them may not have the required
FreeBSD drivers that will attach to the subdevices that will be seen
on some of these parts.

PCI 1515, 1530, 1620, 4520, 6411, 6420, 7410, 7510, 7610

Prompted by: Havard Eidnes
2004-07-22 20:19:57 +00:00
Warner Losh e2b194a02d More TI device IDs.
These are from the datasheets downloaded from TI's web site.
They describe the PCI[67]x[12]1 and PCI[67]x20 parts, with and without
the smartcard enabled.
2004-07-22 20:02:16 +00:00
Alan Cox 5285558ac2 - Change uma_zone_set_obj() to call kmem_alloc_nofault() instead of
kmem_alloc_pageable().  The difference between these is that an errant
   memory access to the zone will be detected sooner with
   kmem_alloc_nofault().

The following changes serve to eliminate the following lock-order
reversal reported by witness:

 1st 0xc1a3c084 vm object (vm object) @ vm/swap_pager.c:1311
 2nd 0xc07acb00 swap_pager swhash (swap_pager swhash) @ vm/swap_pager.c:1797
 3rd 0xc1804bdc vm object (vm object) @ vm/uma_core.c:931

There is no potential deadlock in this case.  However, witness is unable
to recognize this because vm objects used by UMA have the same type as
ordinary vm objects.  To remedy this, we make the following changes:

 - Add a mutex type argument to VM_OBJECT_LOCK_INIT().
 - Use the mutex type argument to assign distinct types to special
   vm objects such as the kernel object, kmem object, and UMA objects.
 - Define a static swap zone object for use by UMA.  (Only static
   objects are assigned a special mutex type.)
2004-07-22 19:44:49 +00:00
Robert Watson 1c1ce9253f Push acquisition of Giant from fdrop_closed() into fo_close() so that
individual file object implementations can optionally acquire Giant if
they require it:

- soo_close(): depends on debug.mpsafenet
- pipe_close(): Giant not acquired
- kqueue_close(): Giant required
- vn_close(): Giant required
- cryptof_close(): Giant required (conservative)

Notes:

  Giant is still acquired in close() even when closing MPSAFE objects
  due to kqueue requiring Giant in the calling closef() code.
  Microbenchmarks indicate that this removal of Giant cuts 3%-3% off
  of pipe create/destroy pairs from user space with SMP compiled into
  the kernel.

  The cryptodev and opencrypto code appears MPSAFE, but I'm unable to
  test it extensively and so have left Giant over fo_close().  It can
  probably be removed given some testing and review.
2004-07-22 18:35:43 +00:00
Robert Watson df04411ac4 suser() accepts a thread argument; as suser() dereferences td_ucred, a
thread-local pointer, in practice that thread needs to be curthread.  If
we're running with INVARIANTS, generate a warning if not.  If we have
KDB compiled in, generate a stack trace.  This doesn't fire at all in my
local test environment, but could be irritating if it fires frequently
for someone, so there will be motivation to fix things quickly when it
does.
2004-07-22 17:05:04 +00:00
Robert Watson de592112e1 In devfs_allocv(), rather than assigning 'td = curthread', assert that
the caller passes in a td that is curthread, and consistently pass 'td'
into vget().  Remove some bogus logic that passed in td or curthread
conditional on td being non-NULL, which seems redundant in the face of
the earlier assignment of td to curthread if td is NULL.

In devfs_symlink(), cache the passed thread in 'td' so we don't have
to keep retrieving it from the 'ap' structure, and assert that td is
curthread (since we dereference it to get thread-local td_ucred).  Use
'td' in preference to curthread for later lockmgr calls, since they are
equal.
2004-07-22 17:03:14 +00:00
Scott Long 17ee0667eb Arg! Revert local changes that were accidentlly included in the previous
version.
2004-07-22 15:55:03 +00:00
Scott Long 7c06f85c31 Don't count needed bounce pages if loading a buffer that was created with
bus_dmamem_alloc()

Submitted by: harti
2004-07-22 15:46:51 +00:00
Scott Long 9493183e77 Disable the PREEMPTION-enabled code in critical_exit() that encourages
switching to a different thread.  This is just a hack to try to improve
stability some more, but likely points closer to the real culprit.
2004-07-22 14:32:48 +00:00
Lukas Ertl 6b61c155e6 Make size suffix case insensitive.
PR:            bin/27604
Submitted by:  David Xu <davidx@viasoft.com.cn>
2004-07-22 13:38:10 +00:00
Johan Karlsson aae01d2439 display.c:
- 'savech' is only used if it is set a few lines above where
	  it is used, initialize it to silence warning.

	- 'length' is either -1 or greater than 0, hence it is safe to cast it
	  to unsigned when comparing it here.

odsyntax.c:
	- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
	  char *. 'num' and 'end' are assigned values based on 'p'.
	  Hence use char * instead of unsigned char * for these variables.

	  '&end' as the second argument to strtoll does not need to be casted
	  to char** any more.

	  This solves a
	  'dereferencing type-punned pointer will break strict-aliasing rules'
	  warning when compiling with -O2.

parse.c:
	- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
	  when 'prec' is assigned. Hence 'prec' is not used uninitialized,
	  initialize it to silence warning.

	- The code involving 'nextpr' is hard to follow, but I belive
	  'nextpr' will not be used unless it is initialized.
	  Anyway, IF 'nextpr' is used uninitialized it is better to
	  get a consistant error (seg fault, when dereferencing a NULL pointer)
	  than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by:	CFLAGS='-O2 -pipe' make universe
2004-07-22 13:14:42 +00:00
Hartmut Brandt 19a7439edd Fix handling of comments on .elif lines. The patch given in a followup
to the PR failed, because the line skipping function is actually called
from two places in the code to do quite different things (this should
be two functions probably): in a false .if to skip to the next line
beginning with a dot and to collect .for loops. In the seconds case we
should not skip comments, because they are actually harder to handle than
we need for the .if case and should defer this to the main code.

PR:		bin/25627
Submitted by:	Seth Kingsley (original patch)
2004-07-22 11:12:01 +00:00
Giorgos Keramidas 328dbe4a94 Add references to pf(4) and pfctl(8) at the description of
securelevel = 3.

PR:		docs/69417
Submitted by:	Janos Mohacsi (mohacsi(at)niif(dot)hu)
2004-07-22 10:38:13 +00:00
Tim J. Robbins c7aea1bb27 Add a macro, __pure, which expands to __attribute__((__pure__)) on gcc
versions that support it (>=2.96). This is similar to but not the same
as the __pure macro that was removed in rev. 1.21.
2004-07-22 09:20:51 +00:00
Ollivier Robert afe2c78208 This commit was generated by cvs2svn to compensate for changes in r132536,
which included commits to RCS files with non-trunk default branches.
2004-07-22 09:16:04 +00:00
Ollivier Robert 5e91a9b700 The following patch has been taken from the ntp-stable vendor branch.
Put everything OpenSSL related between #ifdef OPENSSL..#endif.

This also fixes bugs #252, #275 & #293.

See
<http://ntp.bkbits.net:8080/ntp-stable/hist/util/ntp-keygen.c?nav=index.html|src/+|src/util>
for reference.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-07-22 09:16:04 +00:00
Ollivier Robert 0883223a5f Include support for NOCRYPT & NO_OPENSSL world.
It does survive « make release ».

Uses an upcoming patch from the vendor branch (ntp-stable) of ntp-keygen.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-07-22 09:10:52 +00:00
Ollivier Robert 5c1361654f Correct another cut/paste mistake. Sorry folks.
Pointy hat to:	me
Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2004-07-22 08:38:14 +00:00
Ollivier Robert 065c74d54b Remove arlib (libares.a) from the build. It is not IPv6 compatible, not
really tested and probably not 64 bits-safe.

Discussed with:	Harlann Stenn <www.ntp.org>
2004-07-22 08:35:41 +00:00
Ollivier Robert 4384c42d17 Correct a cut/paste error. 2004-07-22 08:32:17 +00:00
Ollivier Robert d060ebf7b2 Allow ntpd to be compiled w/o readline when NO_GNU is defined. Part of a
larger patchset to get a GNU-free world.

Patch rewritten to cope with the 4.2.0 changes.

Submitted by:	des
2004-07-22 08:14:37 +00:00
Warner Losh 284b024b2b Update comment about fast interrupts to be closer to reality 2004-07-22 07:44:10 +00:00
Warner Losh f8b82da4a7 Remove duplicate $FreeBSD$
Noticed by: njl
2004-07-22 07:11:15 +00:00
Nate Lawson 14827d7eae Reinsert the bus space handle and tag, they are needed for the timer test. 2004-07-22 05:42:14 +00:00
Nate Lawson be1841b4ae Instead of doing everything in identify, do a proper probe/attach. Also,
don't add another device if identify is called twice.  Minor reworking by
myself.

Submitted by:	marcel
2004-07-22 05:32:56 +00:00
Nate Lawson c8f3591b78 Remove unused (and bogus) locking, style cleanup, remove unnecessary casts. 2004-07-22 05:18:05 +00:00
Tim J. Robbins 6740cd8374 Return the correct value when dst == NULL and conversion has stopped after
nwc dropping to zero.
2004-07-22 02:57:29 +00:00
Mike Silbersack a99c936ba3 Add two more programs useful for testing the correctness of pipes. 2004-07-22 02:46:25 +00:00
Murray Stokely 2fbe254787 Add 'benchmarked' and many technical acronyms for protocols, product
names, and company names.
2004-07-22 02:45:57 +00:00
Alan Cox e4242deba7 In pmap_mincore() create a private copy of the pte for use after the pmap
lock is released.
2004-07-22 02:05:46 +00:00
Murray Stokely d8aaca4da3 Improve package list for disc3:
xemacs21 -> xemacs, add apache13, apache2, and php packages to this disc.
2004-07-22 01:37:56 +00:00
Peter Grehan bddfaa895c Update the callframe structure to leave space for the frame pointer
and saved link register as per the ABI call sequence. Update code
that uses this (fork_trampoline etc) to use the correct genassym'd
offsets.

 This fixes the 'invalid LR' message when backtracing kernel
threads in DDB.
2004-07-22 01:28:51 +00:00
Andrew Gallatin 82ab2f48a4 Make this compile: add sys/module.h and KDBify. 2004-07-22 00:54:01 +00:00
Warner Losh 3e4f2c37ff Minor style nit 2004-07-22 00:16:50 +00:00
Brian Feldman d951b75210 Fix a race in vm_page_sleep_if_busy(). Due to vm_object locking
being incomplete, it currently has to know how to drop and pick back
up the vm_object's mutex if it has to sleep and drop the page queue
mutex.  The problem with this is that if the page is busy, while we
are sleeping, the page can be freed and object disappear.  When trying
to lock m->object, we'd get a stale or NULL pointer and crash.

The object is now cached, but this makes the assumption that
the object is referenced in some manner and will not itself
disappear while it is unlocked.  Since this only happens if
the object is locked, I had to remove an assumption earlier in
contigmalloc() that reversed the order of locking the object and
doing vm_page_sleep_if_busy(), not the normal order.
2004-07-21 23:56:09 +00:00
Olivier Houchard c5f7772fe7 Do not declare curpcb. 2004-07-21 22:04:32 +00:00
Olivier Houchard dd561b973b Use the kernel pmap if no thread is provided. 2004-07-21 22:04:05 +00:00
Olivier Houchard 6933f3a5ca Define pmap_page_is_mapped(). 2004-07-21 22:02:48 +00:00
Bosko Milekic 01e9ccbd9c Back out just a portion of Alfred's last commit. Remove the MBUF_CHECK
(WITNESS) for code paths that always call uma_zalloc_arg() shortly
after where the check was, because uma_zalloc_arg() already does
a similar check.

No objections from Alfred.  Thanks Alfred.
2004-07-21 21:03:01 +00:00
Warner Losh 6d69b36945 It is a little better to return ENXIO from probe/match routine than EIO. 2004-07-21 20:38:12 +00:00
Andre Oppermann 55db762b76 Extend versrcreach by checking against the rt_flags for RTF_REJECT and
RTF_BLACKHOLE as well.

To quote the submitter:

 The uRPF loose-check implementation by the industry vendors, at least on Cisco
 and possibly Juniper, will fail the check if the route of the source address
 is pointed to Null0 (on Juniper, discard or reject route). What this means is,
 even if uRPF Loose-check finds the route, if the route is pointed to blackhole,
 uRPF loose-check must fail. This allows people to utilize uRPF loose-check mode
 as a pseudo-packet-firewall without using any manual filtering configuration --
 one can simply inject a IGP or BGP prefix with next-hop set to a static route
 that directs to null/discard facility. This results in uRPF Loose-check failing
 on all packets with source addresses that are within the range of the nullroute.

Submitted by:	James Jun <james@towardex.com>
2004-07-21 19:55:14 +00:00
Warner Losh 9906740e39 Add support for ignoring locking failures. This is only enabled when
you've specified a directory.  It is intended to be used in building
custom releases over NFS where locking may be unreliable at best and
there is no contention that the locking is designed to arbitrate.
Other uses of this flag are discouraged.  Document same in usage and
man page (including the warning about unwise).

Sponsored by: Timing Solutions
2004-07-21 17:38:04 +00:00
Hajimu UMEMOTO 0def575fd7 now e.f.f.3.ip6.arpa is delegated, we no longer need to query ip6.int
Obtained from:	KAME
2004-07-21 17:26:40 +00:00
Warner Losh 24412bd1af Two style related changes:
(1) use strlcpy instead of strncpy since the use here of the latter
    was incorrect.
(2) Move 'N' case into proper sorted order (sorted the same way that
    ls sorts its args).
2004-07-21 17:02:36 +00:00
Robert Watson 46e38ce826 Don't sync the file system on panic by default. This seems to basically
work very infrequently, and often results in a compound panic which
confuses debugging; locking/SMP have made the layering violation (and
risks) of this more obvious over time.

Discussed with:	green, bde, et al.
2004-07-21 16:04:46 +00:00
Olivier Houchard e1021dde8b Using NULL as a malloc type when calling contigmalloc() is wrong, so introduce
a new malloc type, and use it.
2004-07-21 15:52:34 +00:00