56257 Commits

Author SHA1 Message Date
tegge
8ca437edd4 MFC: Close race between vmspace_exitfree() and exit1() and races between
vmspace_exitfree() and vmspace_free() which could result in the same
     vmspace being freed twice.

     Factor out part of exit1() into new function vmspace_exit().  Attach
     to vmspace0 to allow old vmspace to be freed earlier.

     Add new function, vmspace_acquire_ref(), for obtaining a vmspace
     reference for a vmspace belonging to another process.  Avoid changing
     vmspace refcount from 0 to 1 since that could also lead to the same
     vmspace being freed twice.

     Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().
2006-06-02 00:26:27 +00:00
jhb
370f253957 MFC: Only reference the firmware module once rather than twice. 2006-06-01 20:20:15 +00:00
jhb
ff568aef3b MFC: Improve reliability of nforce4 adapters:
- When setting up a packet for transmit, if we the tx ring is over half
  full, kick the binary blob to force it to complete any pending tx
  completions.
- In the watchdog routine, poke the binary blob to force it to flush any
  pending tx completions and only reset the chip if the blob doesn't
  complete any of them.
2006-06-01 20:18:36 +00:00
mjacob
c50d9cbffd MFC: new 2300 firmware 2006-06-01 07:04:23 +00:00
cperciva
280f83404d Enable inadvertantly disabled "securenet" access controls in ypserv. [1]
Correct a bug in the handling of backslash characters in smbfs which can
allow an attacker to escape from a chroot(2). [2]

Security:	FreeBSD-SA-06:15.ypserv [1]
Security:	FreeBSD-SA-06:16.smbfs [2]
2006-05-31 22:32:22 +00:00
wilko
3cd401c63b add re(4) to GENERIC.
The RL8169s worked just fine for me on my release building DS20E
with the CVS repo mounted via NFS.  For EUR 10 that is not too bad :)
2006-05-31 21:42:11 +00:00
jhb
6c1896847b MFC: Workaround a hang on some nForce2 systems that can happen if the CPU
goes into and out of the halt state very quickly.
2006-05-31 21:37:11 +00:00
jhb
efa0cd663d MFC: Restore the pre-5.x behavior of only beeping if the user makes a bad
selection.
2006-05-31 21:32:24 +00:00
mjacob
5105b1f5aa MFC 1.117: Don't set CAM_DEV_QFRZN when we get an ABORT_TASK. Just
by itself, this makes no sense.
2006-05-31 18:49:51 +00:00
ps
c1361e659d MFC: Allow concurrent read(2)/readv(2) access to a file. Lock file
offset against multiple read calls.
2006-05-30 02:58:36 +00:00
cel
f84994a70d NFS over TCP retransmit behavior should default to a 60 second time out,
mimicing the NFS reference implementation.

NFS over TCP does not need fast retransmit timeouts, since network loss
and congestion are managed by the transport (TCP), unlike with NFS over
UDP.  A long timeout prevents the unnecessary retransmission of non-
idempotent NFS requests.

Reviewed by:	mohans, silby, rees?
Sponsored by:	Network Appliance, Incorporated
2006-05-30 01:52:59 +00:00
cel
4ec879514b Refactor the NFS over UDP retransmit timeout estimation logic to allow
the estimator to be more easily tuned and maintained.

There should be no functional change except there is now a lower limit
on the retransmit timeout to prevent the client from retransmitting
faster than the server's disks can fill requests, and an upper limit
to prevent the estimator from taking too long to retransmit during a
server outage.

Reviewed by:	mohan, kris, silby
Sponsored by:	Network Appliance, Incorporated
2006-05-30 00:43:07 +00:00
njl
8320836888 MFC: newer Intel and VIA C7-M support 2006-05-29 22:40:03 +00:00
cel
d05b2803c6 Add better sanity checking to the logic that handles ioctl processing
for nfsclient and nfs4client in order to prevent local root users
from panicing the system.

MFC of nfs4client/nfs4_dev.c revision 1.9.

PR:		kern/77463
Submitted by:	Wojciech A. Koszek
Reviewed by:	cel, rees
Security:	Local root users can panic the system at will
Sponsored by:	Network Appliance, Incorporated
2006-05-29 20:07:40 +00:00
flz
c6c15b243d MFC: - Add support for the Acer Acerscan 640BT.
- Add documentation bits.

      src/sys/dev/usb/usbdevs: rev 1.256 -> 1.257
      src/sys/dev/usb/uscanner.c: rev 1.69 -> 1.70
      src/share/man/man4/uscanner.4: rev 1.23 -> 1.24

PR:		usb/95616
Submitted by:	Matthieu Guegan <lesaint@gcu.info>
2006-05-29 17:54:57 +00:00
thompsa
71c1a44223 MFC r1.61: Fix style(9) nits, whitespace and parentheses. 2006-05-29 00:40:16 +00:00
thompsa
55ff2b99b0 MFC r1.59, 1.60
- Add support for fragmenting ipv4 packets
 - Recalculate the IP checksum after pfil(9)

Together these allow NFS to work over the bridge
2006-05-29 00:36:27 +00:00
rodrigc
6cfcaeedd1 MFC: 1.208
In devfs_first(), set mp->mnt_opt to a valid empty list of mount options
instead of leaving it NULL.  This eliminates a kernel panic
when trying to do a mount -o update of /dev.

Noticed by:	cjsp
Reviewed by:	phk
2006-05-28 18:44:47 +00:00
wilko
cb88adac76 Remove GEOM_GPT.
I encountered repeatable Unaligned access panics similar to:

fatal kernel trap:

    trap entry     = 0x4 (unaligned access fault)
    cpuid          = 0
    faulting va    = 0xfffffc0000fae1c2
    opcode         = 0x28
    register       = 0x1
    pc             = 0xfffffc00004d07dc
    ra             = 0xfffffc00004d0a1c
    sp             = 0xfffffe0031875bc0
    curthread      = 0xfffffc007da237a0
        pid = 2, comm = g_event

These occur when a floppy or a CD (the 6.1R install CD will do in most
cases) is in the drive during boot.  A floppy or CD inserted *after*
the system was booted did not give me this problem.  Interestingly
enough booting from the 6.1-R install CD sometimes caused the crash,
sometimes it did not.  When it did not panic an installation of 6.1-R
was possible without any incidents.  A subsequent boot from HD with
the CD still present sometimes(...) worked fine, sometimes paniced.

Taking GEOM_GPT out of the kernel config file allows booting without
incidents.  We do not need GPT on Alpha, so this is the easy way out.

Discussed with: phk
2006-05-28 11:15:16 +00:00
sobomax
0eb84ea2c9 MFC: Detect cases when the hardware has no AT-style keyboard controller. 2006-05-26 00:56:14 +00:00
ru
43b41d32b2 MFC: 1.545: Add missing acpi_wakecode.h dependency on assym.s.
: /usr/src/sys/i386/acpica/acpi_wakecode.S:35:19: assym.s: No such file or directory
: /usr/src/sys/i386/acpica/acpi_wakecode.S: Assembler messages:
: /usr/src/sys/i386/acpica/acpi_wakecode.S:103: Error: suffix or operands invalid for `ljmp'

Reported by:	many
2006-05-25 20:25:44 +00:00
cvs2svn
47d76a2b91 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-05-25 04:01:05 +00:00
tegge
c538ede71c MFC: Read block hints list from last snapshot on the active snapshot list. 2006-05-24 20:20:16 +00:00
tegge
cb63d0cb33 MFC: Copy last block on file system again after file system has been
suspended.

Obtained from:	NetBSD
2006-05-24 20:16:46 +00:00
tegge
702b6397cd MFC: Don't leak a locked buffer if last block on file system cannot be read. 2006-05-24 20:13:36 +00:00
tegge
8d53cc1e47 MFC: Errors detected while file system is suspended should not trigger an
assertion failure.
2006-05-24 20:11:32 +00:00
tegge
35a8797690 MFC: Expunge traces of unlinked snapshot files when making a new snapshot. 2006-05-24 20:08:55 +00:00
cel
0cc5415af4 While reviewing NFS client for another PR, noticed this omission in the
NFSv4 client READDIR logic.  This change matches the logic in the version
2 and 3 code.

Sponsored by:	Network Appliance, Incorporated
2006-05-24 18:29:37 +00:00
emax
b30dd286ba MFC:
Add new SIOC_HCI_RAW_NODE_LIST_NAMES ioctl. User-space applications can
use this ioctl to obtain the list of HCI nodes. User-space application
is expected to preallocate 'ng_btsocket_hci_raw_node_list_names' structure
and set limit in 'num_nodes' field. The 'nodes' field should be allocated
as well and it should have space for at least 'num_nodes' elements.

The SIOC_HCI_RAW_NODE_LIST_NAMES should be issued on bound raw HCI socket.
It does not really really matter what HCI name the socket is bound to, as
long as it is not empty.
2006-05-24 00:51:22 +00:00
jkim
fa42b82744 MFC: src/lib/libstand/printf.c 1.9
src/sys/kern/subr_prf.c		1.123

Implement printf 'X' conversion for both libstand and kernel.
2006-05-22 23:51:14 +00:00
jkim
306d3fed46 MFC: 1.38, 1.40
Work around CardBus issue for Compaq R3000 series laptop.
2006-05-22 23:38:08 +00:00
jkim
f86c8264df MFC: SMBIOS support for loader. 2006-05-22 23:31:30 +00:00
mjacob
f278b55e24 MFC current state of isp. Lots of cosmetic changes, but also various bugfixes. 2006-05-22 21:31:54 +00:00
nyan
cce8b73200 MFi386: revision 1.616.2.4 2006-05-21 11:22:10 +00:00
nyan
dcac4c6af5 MFC: rev 1.10: include pc98/pc98/pc98_machdep.h instead of pc98/cbus/cbus.h. 2006-05-21 11:20:27 +00:00
nyan
b96c78783d MFC: Remove unneeded include. 2006-05-21 11:18:42 +00:00
nyan
3032b4b66b MFC: cbus.h: 1.22, pc98_machdep.h: 1.14
- Move defines for PC-98 machine type from pc98/cbus/cbus.h into
    pc98/pc98/pc98_machdep.h.
  - Fix PC98_SYSTEM_PARAMETER_SIZE.
  - Remove unused defines.
2006-05-21 11:17:33 +00:00
maxim
f9edac6fd5 MFC rev. 1.167: inherit LOCAL_CREDS option from listen socket
for sockets returned by accept(2).
2006-05-21 09:12:24 +00:00
csjp
1b728c44bc MFC revision 1.288
date: 2006/04/10 14:07:28;  author: csjp;  state: Exp;  lines: +0 -2
Kill the last Giant acquisition in the exit(2) code. This Giant acquisition
doesn't appear to be protecting anything. Most of consumers funsetownlst(9)
do not appear to be picking up Giant anywhere. This was originally a part
of my Giant exit(2) clean up revision 1.272 but I thought it was a good idea
to leave it out until we were able to analyze it better.
2006-05-20 02:54:34 +00:00
emax
6eafc67c7f MFC v1.59 and v1.60
Add kqueue(2) support on if_tap(4) interfaces. While I'm here, replace
K&R style function declarations with ANSI style. Also fix endian bugs
accessing ioctl arguments that are passed by value.

Do not call knlist_destroy() in tapclose(). Instead call it when device is
actually destroyed. Also move call to knlist_init() into tapcreate(). This
should fix panic described in kern/95357.

PR:		kern/93897, kern/95357
Submitted by:	Vilmos Nebehaj < vili at huwico dot hu >
2006-05-20 00:44:00 +00:00
ps
729a496ae4 MFC: rev 1.126
Fix the interrupt handler to do the mandatory PCI flush before looking at
DMA memory.  The could contribute towards missed link state changes under
heavy bus load.
2006-05-19 19:15:05 +00:00
yongari
85ec7c7f44 MFC if_em.c, 1.92 to RELENG_6:
Add jumbo frame support for architectures with strict alignment.

Requested by:	wilko
2006-05-19 00:19:57 +00:00
jhb
ea040660fa MFC: Use the proper condition to determine that we matched an filename. 2006-05-18 23:23:53 +00:00
jhb
42f7829611 MFC: Cache the value of the lower half of each I/O APIC redirection table
entry and thus cut the execution time for masking and unmasking I/O APIC
pins in half.
2006-05-18 22:07:01 +00:00
anholt
c66ec81d71 Merge DRM from -current, including:
- i915 attachment and running fixed
- i915 vblank support
- Radeon's new memory map support, which should fix a host of stability issues
  when combined with new userland.
- ATI PCI/PCIE GART fix.
- r300 fixes

Also adds a hack to the radeon module Makefile to quiet gcc's fatal warnings
about inlines in this contrib code.
2006-05-17 07:40:12 +00:00
davidxu
c07d62133b MFC following revisions:
sys/ptrace.h		1.27
	kern/sys_process	1.135

	get LWP's signal info.
2006-05-17 00:41:49 +00:00
csjp
993ca372a6 MFC revision 1.56
date: 2006/03/03 09:12:21;  author: thompsa;  state: Exp;  lines: +22 -7
Since we are using random ethernet addresses for the bridge, it is possible
that we might have address collisions, so make sure that this hardware address
isn't already in use on another bridge.
2006-05-17 00:18:57 +00:00
csjp
583cf67217 MFC revision 1.55
Slightly re-worked bpf(4) code associated with bridging: if we have a
  destination interface as a member of our bridge or this is a unicast packet,
  push it through the bpf(4) machinery.

  For broadcast or multicast packets, don't bother with the bpf(4) because it will
  be re-injected into ether_input. We do this before we pass the packets through
  the pfil(9) framework, as it is possible that pfil(9) will drop the packet or
  possibly modify it, making it very difficult to debug firewall issues on the
  bridge.

  Further, implemented IFF_MONITOR for bridge interfaces. This does much the same
  thing that it does for regular network interfaces: it pushes the packet to any
  bpf(4) peers and then returns. This bypasses all of the bridge machinery,
  saving mutex acquisitions, list traversals, and other operations performed by
  the bridging code.

  This change to the bridging code is useful in situations where individuals use a
  bridge to multiplex RX/TX signals from two interfaces, as is required by some
  network taps for de-multiplexing links and transmitting the RX/TX signals
  out through two separate interfaces. This behaviour is quite common for network
  taps monitoring links, especially for certain manufacturers.
2006-05-17 00:11:27 +00:00
csjp
d6b220b7f2 MFC revision 1.215
Unbreak byte counters when network interfaces are in monitor mode by
  re-organizing the monitor return logic. We perform interface monitoring
  checks after we have determined if the CRC is still on the packet, if
  it is, m_adj() is called which will adjust the packet length. This
  ensures that we are not including CRC lengths in the byte counters for
  each packet.
2006-05-17 00:09:24 +00:00
csjp
d77d83825c MFC revision 1.164
Pickup locks for the BPF interface structure. It's quite possible that
bpf(4) descriptors can be added and removed on this interface while we
are processing stats.
2006-05-17 00:07:42 +00:00