58000 Commits

Author SHA1 Message Date
kib
ee9ecbab7b MFC rev. 1.89, 1.90:
Apply the LCONVPATH() to the (old) linux_stat() and linux_lstat() syscalls.
2008-01-09 16:07:32 +00:00
mux
857278f438 MFC route.c@1.125 and route.h@1.68:
Add a workaround for a deadlock between the rt_setgate() and rt_check()
  functions.  It is easily triggered by running routed, and, I expect, by
  running any other daemon that uses routing sockets.
2008-01-09 15:38:49 +00:00
delphij
a3d72f66d0 MFC important fixes by sos@:
Implement a workaround of the datacorruption problem on ServerWorks
HT1000 chipsets.  The HT1000 DMA engine seems to not always like 64K
transfers and sometimes barfs data all over memory leading to instant
chrash and burn.

Also fix 48bit adressing issues, apparently newer chips needs 16bit
writes and not the usual fifo thing.

HW donated by:	Travis Mikalson at TerraNovaNet
Original work:	sos
2008-01-09 08:55:51 +00:00
jhb
a932ace951 MFC: Use devclass_get_count() instead of devclass_get_maxunit(). 2008-01-07 21:27:25 +00:00
obrien
a4fd89d56e MFC: rev 1.149: Fix a broken DIAGNOSTICS/INVARIANTS check to handle a
block range that spans two block maps.
2008-01-01 03:01:03 +00:00
mav
2ad5643261 MFC rev. 1.87
Fix incorrectly placed bracket in pppoe_find_svc().
2007-12-29 17:38:24 +00:00
mav
833592a55b MFC rev. 1.22
Increase control channel xmit queue to 128 packets.
Previous value 16 was too small for real LAC as temporal activity
spike cound easily overflow queue demanding tunnel disconnection due
to possible state inconsistency.
2007-12-29 17:35:32 +00:00
thompsa
7392d1f08e MFC r1.8
Fix a panic where if the mbuf was consumed by the filter for requeueing
  (dummynet), ipsec_filter() would return the empty error code and the ipsec
  code would continue to forward/deference the null mbuf.

Approved by:	re (gnn)
2007-12-29 17:29:11 +00:00
imp
c93f2e4d9e MFC: Update to 2008.
Approved by: re@ (kensmith)
2007-12-26 16:49:12 +00:00
marius
ea8bce89a3 MFC: 1.8
In openprom_ioctl() ensure appropriate permissions and that data isn't
NULL and doesn't point to a NULL pointer before dereferencing it.
2007-12-23 11:28:59 +00:00
rwatson
604dd5cfc9 Merge in_pcb.c:1.198 from HEAD to RELENG_6:
When IPSEC fails to allocate policy state for an inpcb, and MAC is in use,
  free the MAC label on the inpcb before freeing the inpcb.

  Submitted by:   tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:	re (kensmith)
2007-12-22 20:06:54 +00:00
rwatson
827acf97ed Merge mac_posix_sem.c:1.12 from HEAD to RELENG_6:
Fix a MAC label leak for POSIX semaphores, in which per-policy labels
  would be properly disposed of, but the global label structure for the
  semaphore wouldn't be freed.

  Reported by:    tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:	re (kensmith)
2007-12-22 15:08:09 +00:00
rwatson
7c5b9ca5c3 Merge in6_pcb.c:1.86 from HEAD to RELENG_6:
Fix leaking MAC labels for IPv6 inpcbs by adding missing MAC label
  destroy call; this transpired because the inpcb alloc path for IPv4/IPv6
  is the same code, but IPv6 has a separate free path.  The results was
  that as new IPv6 TCP connections were created, kernel memory would
  gradually leak.

  Reported by:    tanyong <tanyong at ercist dot iscas dot ac dot cn>,
                  zhouzhouyi

Approved by:	re (kensmith)
2007-12-22 15:06:51 +00:00
thompsa
88ff3b6258 MFC r1.25
- Use the macro to check the port status has it will also test if its
    administratively down (!IFF_UP)
  - Use the same parameters to lagg_link_active() to get the backup port as in
    the output path, this didnt actually matter in practice as sc_primary is
    always the first on the port list.

Approved by:    re (kensmith)
2007-12-21 05:34:35 +00:00
thompsa
ee69dc2d3d MFC r1.108
When the bridge has an address and a packet comes in for it then drop it if
 the link has been marked discarding by Spanning Tree.

Approved by:    re (kensmith)
2007-12-21 05:30:47 +00:00
jhb
a060ae4172 Regen. 2007-12-19 23:04:12 +00:00
jhb
db917ba399 MFC: Add freebsd32 compat wrappers for msgctl() and __semctl(). 2007-12-19 23:03:50 +00:00
jhb
f3b20660fb MFC: Move several data structure definitions out of freebsd32_misc.c and
into freebsd32.h and freebsd32_ipc.h.
2007-12-19 23:03:02 +00:00
rpaulo
ece9e318c4 MFC revision 1.679:
Disallow the legacy USB circuit to generate an SMI# via an ICH
  register (MacBooks only).
  This allows MacBooks to boot in SMP mode without any trick and
  solves
  the timer problems with HZ=1000.

Approved by:	     re (kensmith), njl (mentor)
2007-12-19 21:01:35 +00:00
rpaulo
92c0685d25 MFC revision 1.662 and 1.663:
Disallow the legacy USB circuit to generate an SMI# via an ICH
  register (MacBooks only).
  This allows MacBooks to boot in SMP mode without any trick and
  solves the timer problems with HZ=1000.

Approved by:	re (kensmith), njl (mentor)
2007-12-19 20:59:46 +00:00
peter
90d9d97245 MFC: scale TCPTV_MIN with hz, not a fixed number of ticks. Otherwise
machines with hz=1000 drop connections in a matter of a few seconds on a
fast link (eg: ethernet).  With this change, it drops them in the same
time as a machine with hz=100 would.
2007-12-18 03:39:17 +00:00
jhb
439521b27c MFC: Only attach to a GPT partition if it has the GPT_ENT_TYPE_FREEBSD
type.
2007-12-18 01:32:55 +00:00
guido
b91a22cf7e MFC: 1.334 2007-12-17 10:01:14 +00:00
scottl
b8129479b8 Add the hptrr driver.
Submitted by: Highpoint
Approved by: re
2007-12-15 06:21:58 +00:00
scottl
8e927218b4 Add the hptrr driver.
Submitted by: Highpoint
Approved by: re
2007-12-15 06:03:44 +00:00
cvs2svn
90d3e01b37 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2007-12-15 00:56:18 +00:00
qingli
dc19c3cec0 MFC: -r1.296
use the sequence number comparison macro to compare
	projected_offset against isn_offset to account for
	wrap around
2007-12-14 19:23:31 +00:00
mav
2db2bc42f3 MFC rev 1.84-1.85
Remove ng_pppoe_sendpacket() function to simplify code as it is called
as much times as it has cases inside of it.
Split ng_pppoe_rcvdata() function into three hook-specific ones
to simplify code and reduce stack usage.
2007-12-12 19:14:05 +00:00
jhb
04328504a1 - Add a workaround for the DMA bugs on some alpha chipsets that ATA DMA
trips over often.  Specifically, in these chipsets DMA transfers that
  cross a page boundary result in data corruption.  The workaround is to
  not allow any DMA transfers for non-static DMA maps (i.e. "real"
  transfers as opposed to work areas allocated with bus_dmamem_alloc()) to
  cross a page in a single S/G element.  This behavior is enabled by
  setting 'busdma_pyxis_bug' to 1.
- Add a new tunable 'machdep.busdma_pyxis_bug' that can be used to enable
  the workaround from the loader.  This can be used to enable it on
  chipsets where we don't automatically enable it.
- Auto-enable the workaround for buggy PYXIS 1 chipsets supported via
  cia(4).

PR:		alpha/75317
2007-12-10 20:14:16 +00:00
emaste
bef5d87630 MFC to RELENG_6
aac_pci.c:1.63-1.65
aac.4 1.37-1.39

  Add PCI IDs for controllers obtained from Adaptec's latest drivers.

Approved by:	re (kensmith)
2007-12-10 19:33:36 +00:00
emaste
2d828ba5d0 MFC to RELENG_6
aac_debug.c:1.23

  Respell 'Conatainer' as 'Container'.

Approved by:	re (kensmith)
2007-12-10 19:17:23 +00:00
scottl
36536f6810 MFC: Support new ARC120x generation cards.
Approved by: re
Submitted by: Erich Chen @ Areca
2007-12-09 19:28:21 +00:00
delphij
5f76d7f116 Sync up ata(4) work by sos@ on -HEAD:
* Add preliminary SATA ATAPI support for sii 3132/3124 chips.
 * Fix speed report on Intel SATA chips in compat mode.
 * Fix broken detect of JMicron 368.

Related revisions:
 - ata-chipset.c: 1.208, 1.210
 - ata-disk.c.c:  1.205

Approved by:	re (kensmith), sos
2007-12-09 19:27:19 +00:00
cvs2svn
bde0e67ee3 This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2007-12-09 11:01:59 +00:00
njl
d721e65801 MFC: 1.149-1.150. Hold Giant over device_suspend/resume() methods in apm.
Approved by:	re
2007-12-09 00:24:16 +00:00
remko
fb7ac4fa83 MFC rev 1.6 msk.4
MFC rev 1.26 if_msk.c
MFC rev 1.11 if_mskreg.h

  Bring in support for: Marvell Yukon 8039

  PR:             118401
  Submitted by:   Skip Ford <skip at menantico dot com>
  Approved by:    imp (mentor), yongari
  MFC After:      3 days

Approved by:	re (kensmith), imp (mentor, implicit)
2007-12-08 12:19:13 +00:00
dwmalone
4fca947904 regen.
Approved by:	re (kensmith)
2007-12-08 08:50:37 +00:00
dwmalone
abadf7b17f The kernel version of Linux statfs64 is actually supposed to take
3 arguments, but we had forgotten the second argument. Also make the
Linux statfs64 struct depend on the architecture because it has an
extra 4 bytes padding on amd64 compared to i386.

The three argument fix is from David Taylor, the struct statfs64
stuff is my fault. With this patch I can install i386 Linux matlab
on an amd64 machine.

Approved by:	re (kensmith)
2007-12-08 08:48:08 +00:00
kib
13705c90a6 Add missed closing brace. 2007-12-08 06:43:25 +00:00
kmacy
3f58b1c7ea MFC: 1.317, 1.318, 1.319
Fix bit macros to work on multi-byte types

Approved by: re(kensmith)
2007-12-07 23:22:57 +00:00
cognet
2a7abbfa29 MFC:
sys/arm/include/asmacros.h rev 1.7
sys/arm/include/atomic.h rev 1.23

Close a race.

The RAS implementation would set the end address, then the start
address.  These were used by the kernel to restart a RAS sequence if
it was interrupted.  When the thread switching code ran, it would
check these values and adjust the PC and clear them if it did.

However, there's a small flaw in this scheme.  Thread T1, sets the end
address and gets preempted.  Thread T2 runs and also does a RAS
operation.  This resets end to zero.  Thread T1 now runs again and
sets start and then begins the RAS sequence, but is preempted before
the RAS sequence executes its last instruction.  The kernel code that
would ordinarily restart the RAS sequence doesn't because the PC isn't
between start and 0, so the PC isn't set to the start of the sequence.
So when T1 is resumed again, it is at the wrong location for RAS to
produce the correct results.  This causes the wrong results for the
atomic sequence.

The window for the first race is 3 instructions.  The window for the
second race is 5-10 instructions depending on the atomic operation.
This makes this failure fairly rare and hard to reproduce.

Mutexs are implemented in libthr using atomic operations.  When the
above race would occur, a lock could get stuck locked, causing many
downstream problems, as you might expect.

Also, make sure to reset the start and end address when doing a syscall, or
a malicious process could set them before doing a syscall.

Reviewed by: imp, ups (thanks guys)
Approved by:	re (kensmith)
Pointy hat to:  cognet
2007-12-07 22:08:02 +00:00
delphij
805f201f2b MFC revision 1.209
date: 2007/11/26 19:08:08;  author: sos;  state: Exp;  lines: +1 -1
Use device_set_desc_copy in the generic ident as its used on a temp buffer.

Approved by:	re (kensmith)
2007-12-07 17:59:39 +00:00
kib
542a731b22 MFC rev. 1.181:
Check for the program headers alignment of the ELF images before
dereferencing. Unaligned access could cause panic on strict alignment
architectures.

Approved by:	re (kensmith)
2007-12-07 14:30:26 +00:00
gnn
d5b4af487e MFC support for the Camellia block cipher
HEAD
Revision  Path
  1.16    src/lib/libipsec/pfkey_dump.c
  1.38    src/sbin/setkey/setkey.8
  1.12    src/sbin/setkey/token.l
  1.81    src/secure/lib/libcrypto/Makefile
  1.47    src/secure/lib/libcrypto/Makefile.inc
  1.8     src/secure/lib/libcrypto/opensslconf-amd64.h
  1.8     src/secure/lib/libcrypto/opensslconf-i386.h
  1.1205  src/sys/conf/files
  1.1     src/sys/crypto/camellia/camellia-api.c (new)
  1.1     src/sys/crypto/camellia/camellia.c (new)
  1.1     src/sys/crypto/camellia/camellia.h (new)
  1.6     src/sys/modules/crypto/Makefile
  1.15    src/sys/net/pfkeyv2.h
  1.1     src/sys/netinet6/esp_camellia.c (new)
  1.1     src/sys/netinet6/esp_camellia.h (new)
  1.25    src/sys/netinet6/esp_core.c
  1.19    src/sys/netipsec/xform_esp.c
  1.34    src/sys/opencrypto/cryptodev.c
  1.25    src/sys/opencrypto/cryptodev.h
  1.19    src/sys/opencrypto/cryptosoft.c
  1.9     src/sys/opencrypto/xform.c
  1.4     src/sys/opencrypto/xform.h

Approved by: re (kensmith)
Submitted by: Tomoyuki Okazaki <okazaki at kick dot gr dot jp>
2007-12-07 08:45:29 +00:00
jfv
9f0df4e567 DUH, fix breakage of last checkin. Its kinda humorous,
the code is broken in 7 but that will never be a problem
because of defines, but it broke here, oh well :)

Approved by:	r
2007-12-07 04:01:16 +00:00
thompsa
e99369996b MFC r1.209
Apply a workaround for the unkillable jail problem where some devices created
  within the jail are never freed.

Approved by:	re (kensmith)
2007-12-07 03:46:23 +00:00
jfv
69841c8a84 MFC of a few important fixes done in RELENG_7 to 6
- WITNESS lock problem due to naming of multi locks
  - Race in em_stop if you don't hold the TX lock
  - Bug in TSO code when you have fowarding and different
    MSS sizes (this more for completeness since TSO is not
    enabled in 6.3)

Essentially syncs the two drivers up to version 6.7.3

Approved by:re
2007-12-07 01:06:41 +00:00
jhb
b106d2e073 Regen. 2007-12-06 22:00:32 +00:00
jhb
a6256653d9 MFC: Add kern_msgsnd() and kern_msgrcv() and use them to fix msgsnd()
and msgrcv() in 32-bit ABIs on 64-bit kernels.
2007-12-06 22:00:05 +00:00
philip
cf0dc0d9d6 Fix a use-after-free.
Submitted by:	Ilja van Sprundel <ilja -at- netric.org>
Reviewed by:	secteam
Approved by:	re (kensmith)
2007-12-06 10:18:19 +00:00