mav [Sat, 29 Dec 2007 17:35:32 +0000 (17:35 +0000)]
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.
thompsa [Sat, 29 Dec 2007 17:29:11 +0000 (17:29 +0000)]
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.
kensmith [Sat, 29 Dec 2007 06:20:30 +0000 (06:20 +0000)]
MFC v1.117:
> Plug a memory leak. Once any given package (e.g. perl) was installed
> we would leak a saved screen for every other package we tried to install
> that listed perl as one of its dependencies. When installing things
> like gnome and kde that wound up being a LOT of leaked memory.
While here clean up some whitespace nits that are differences between
this branch and the others.
kensmith [Sat, 29 Dec 2007 06:19:18 +0000 (06:19 +0000)]
MFC v1.78 and v1.79:
Remove process limits for datasize and stacksize which are unlimited
during a "normal login" (thanks to /etc/login.conf) but not when
sysinstall is running as part of an installation. Fixups for error
messages and a comment that became untrue.
kensmith [Mon, 24 Dec 2007 06:42:35 +0000 (06:42 +0000)]
MFC v1.116:
> For the INDEX file to be used on disc1 of the 7.0-RELEASE the longest
> "build dependencies" field is 5,108 characters which overflows the
> length of the junk buffer by a teeny bit. This whole section needs
> much more error checking but for now just completely ignore stuff
> we have no interest in instead of copying it to someplace we don't
> use in the process.
rwatson [Sat, 22 Dec 2007 15:08:09 +0000 (15:08 +0000)]
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
rwatson [Sat, 22 Dec 2007 15:06:51 +0000 (15:06 +0000)]
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
thompsa [Fri, 21 Dec 2007 05:34:35 +0000 (05:34 +0000)]
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.
rpaulo [Wed, 19 Dec 2007 21:01:35 +0000 (21:01 +0000)]
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.
rpaulo [Wed, 19 Dec 2007 20:59:46 +0000 (20:59 +0000)]
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.
peter [Tue, 18 Dec 2007 03:39:17 +0000 (03:39 +0000)]
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.
kensmith [Mon, 17 Dec 2007 23:54:20 +0000 (23:54 +0000)]
Initial pass at shifting packages around for 6.3-REL layout. There
is a lot of space left on disc3 that we can put to use by adding back
in lots of the packages we've been slowly ejecting through the years.
We'll decide exactly which ones a little bit later.
Note: not an MFC. The handling of what packages go where is often
done on a release-by-release basis and 6.3's release cycle is leading
7.0's at the moment.
kensmith [Mon, 17 Dec 2007 23:51:29 +0000 (23:51 +0000)]
Add support for disc3. Depending on architecture the combination of
kde3 and gnome2 is at least 670Mb which would mean if we stick with
just disc1/disc2 the only packages we could provide on the iso's
would be X11, kde3, and gnome2...
This is not an MFC, it was not committed to HEAD or RELENG_7. It's
looking like we should plan on a bit more radical a change for how
packages get done for 8.X (current thought is cdrom sized things with
no packages at all, and one DVD sized thing with packages). It's
almost certain this change will be done in RELENG_7 but the 7.0
release cycle hasn't reached the point of dealing with packages quite
yet so I'm holding off on that a bit longer.
kensmith [Mon, 17 Dec 2007 23:43:42 +0000 (23:43 +0000)]
MFC v1.253 of dist.c and v1.71 of dist.h:
> A few more adjustments needed because of changes in xorg. Just installing
> xorg-server doesn't include any video drivers so install xorg-drivers as
> well. And if font-alias isn't installed the X server won't start,
> complaining it can't find the font "fixed".
mav [Wed, 12 Dec 2007 19:14:05 +0000 (19:14 +0000)]
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.
jhb [Mon, 10 Dec 2007 20:14:16 +0000 (20:14 +0000)]
- 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).
delphij [Sun, 9 Dec 2007 19:27:19 +0000 (19:27 +0000)]
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
dwmalone [Sat, 8 Dec 2007 08:48:08 +0000 (08:48 +0000)]
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.
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
delphij [Fri, 7 Dec 2007 17:59:39 +0000 (17:59 +0000)]
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.
kib [Fri, 7 Dec 2007 14:30:26 +0000 (14:30 +0000)]
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.
jfv [Fri, 7 Dec 2007 04:01:16 +0000 (04:01 +0000)]
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 :)
jfv [Fri, 7 Dec 2007 01:06:41 +0000 (01:06 +0000)]
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
yongari [Thu, 6 Dec 2007 06:01:47 +0000 (06:01 +0000)]
MFC if_re.c, rev 1.98 to RELENG_6
Always honor promiscuous flag prior to programming Rx multicast
filter. This fixes a regression introduced in rev 1.89.
kmacy [Wed, 5 Dec 2007 22:05:49 +0000 (22:05 +0000)]
Very belated MFC.
- fix qset to port binding as a proper fix for the problems encountered on the 4-port
- fix the use after free seen when sending packets small enough to fit as an immediate
and bpf peers are present
- update to firmware rev 4.7 along with various small vendor fixes
rwatson [Wed, 5 Dec 2007 00:00:10 +0000 (00:00 +0000)]
Call NET_LOCK_GIANT/NET_UNLOCK_GIANT around calls to protocol drain
methods in mb_reclaim(). This is not an MFC, as debug.mpsafenet is
not present in 7.x or 8.x. In practice, this likely resulted in
instability only on kernels with INVARIANTS, as the protocol drain
paths are generally MPSAFE.
PR: 116034
Reported by: Dan Lukes <dan@obluda.cz>
Discussed with: kmacy, alc
Approved by: re (kensmith)
Tested by: Eugene Grosbein <eugen at grosbein dot pp dot ru>
cperciva [Tue, 4 Dec 2007 22:51:36 +0000 (22:51 +0000)]
MFC revision 1.3: Add /root/, /.cshrc, and /.profile to the default
UpdateIfUnmodified directive in order to avoid overwriting these when
users upgrade to future versions of FreeBSD.
- Fix the handling of R_SPARC_OLO10, which is a bit of a special case
in the way we implement handling of relocations.
While at it replace some more ELF_R_TYPE which should have been
ELF64_R_TYPE_ID but didn't cause problems so far.
- Sync a sanity check between kernel and rtld(1) and change it to be
maintenance free regarding the type used for the lookup table.
- Sprinkle const on lookup tables.
- Use __FBSDID.
jhb [Mon, 3 Dec 2007 21:53:23 +0000 (21:53 +0000)]
MFC: Sync up SYSV IPC with HEAD some:
- Add kern_semctl() and use it for Linux, IBCS2, and SVR4 ABIs.
- Don't pass a bufsz pointer to kern_shmctl() for operations that don't
need it.
- Add module dependencies for SYSV IPC modules to IBCS2 and SVR4.
- Use kern_shmctl() in SVR4.
- Use kern_msgctl(), kern_semctl(), and kern_shmctl() in IBCS2.
- Mark linux_ipc(), svr4_sys_shmsys(), and svr4_sys_semsys() MPSAFE.
- Add GNU symbol versioning constants.
- Correct URL to ELF header documantation.
- Add Sparc TLS relocation definitions.
- Move the relocation definitions to the common elf header so that DTrace
can use them on one architecture targeted to a different one.
Add the additional ELF types defines in Sun's "Linker and Libraries"
manual.
- Add `PN_XNUM', for supporting ELF objects with a large number of program
header table entries.
Discussed with: jb (who in turn discussed the MFC with jkoshy)
jkoshy [Mon, 3 Dec 2007 11:00:39 +0000 (11:00 +0000)]
MFC r1.6:
"Revert revision 1.4.
Intel CPUs with family 0x6, model 0xE and later (i.e., Intel Core(TM))
have a PMC architecture that differs somewhat from previous CPUs in
family 0x6. Even though the basic programming model is similar, the
documented set of legal values that may be loaded into their PMC MSRs
differs from that of the previous PMCs in family 0x6 and reusing bit
values legal for the older PMCs could result in undefined behaviour in
the general case."
marcus [Sun, 2 Dec 2007 23:46:27 +0000 (23:46 +0000)]
Forced commit to correct file handle reversal in previous commit. The
message should have read:
This is a partial MFC of rev 1.126 from HEAD's libkse. This only merges the
fix which causes stderr_debug to write output to STDOUT_FILENO instead
of STDERR_FILENO. This is known to fix (or workaround) some mono-related
build problems.
marcus [Sun, 2 Dec 2007 23:42:38 +0000 (23:42 +0000)]
MFC: rev 1.126
This is a partial MFC of rev 1.126 from HEAD's libkse. This only merges the
fix which causes stderr_debug to write output to STDERR_FILENO instead
of STDOUT_FILENO. This is known to fix (or workaround) some mono-related
build problems.
cognet [Sun, 2 Dec 2007 14:21:27 +0000 (14:21 +0000)]
MFC:
arm/at91/kb920x_machdep.c rev 1.24, 1.25 and 1.26
arm/at91/std.at91 rev 1.4
arm/at91/std.kb920x rev 1.5
arm/at91/at91rm92reg.h rev 1.6
conf/options.arm 1.18
Small tweaks to be able to load the kernel at a different address than
0x20000000 + add an option to override the default value of the master clock
frequency.
arm/at91/if_ate.c rev 1.21:
In ate_get_mac(), try to get the mac address in the right order, at least
in the same order as it's set in ate_set_mac.