rrs [Thu, 15 Nov 2007 15:03:17 +0000 (15:03 +0000)]
- Fixes a bug in rwnd handling that would cause an incorrect rwnd
advertisement during low mem conditions.
- Fixes a compile error on mac-os (signedness stuff).
- Touches up some comments.
grehan [Wed, 14 Nov 2007 16:41:31 +0000 (16:41 +0000)]
MFC:
Split decr_init() into two, with the section that reads the timebase
frequency from OpenFirmware moved out and into a routine that is called
from cpu_startup().
This allows correct reporting of the CPU clockspeed when printing out
CPU information at boot time.
kan [Mon, 12 Nov 2007 16:09:45 +0000 (16:09 +0000)]
MFC revisions
1.75: Make ukbd_getc respect non-blocking behavior if one is requested;
1.76: Do not pass an address of local stack variable to
usbd_set_report_async.
marius [Fri, 9 Nov 2007 21:15:58 +0000 (21:15 +0000)]
MFC: 1.7
In _pthread_key_create() ensure that libthr is initialized. This
fixes a NULL-dereference of curthread when libstdc+ initializes
the exception handling globals on archs we can't use GNU TLS due
to lack of support in binutils 2.15 (i.e. arm and sparc64), yet,
thus making threaded C++ programs compiled with GCC 4.2.1 work
again on these archs.
jhb [Thu, 8 Nov 2007 21:31:38 +0000 (21:31 +0000)]
MFC: Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is
defined. This also effectively enables the use of the smaller cgbase()
in the arm/at91/boot2 loader.
jhb [Thu, 8 Nov 2007 20:19:58 +0000 (20:19 +0000)]
MFC: Rework the read/write support in the bios disk driver some to cut down
on duplicated code and support 64-bit LBAs for GPT. This also changes the
code to always use EDD on devices that support it which matches the rest of
the x86 bootstrap.
cperciva [Thu, 8 Nov 2007 19:45:19 +0000 (19:45 +0000)]
Change the default for hyperthreading (or, generally speaking, cases
where the L1 cache is shared between CPUs) to disabled for security
reasons. As in earlier releases, this can be changed by setting
machdep.hyperthreading_allowed=1 in /boot/loader.conf.
This is not an MFC -- no seatbelts in CURRENT.
Approved by: re (kensmith)
Security: See FreeBSD-SA-05:09.htt for background material.
alc [Thu, 8 Nov 2007 17:17:23 +0000 (17:17 +0000)]
MFC
Add comments explaining why all stores updating a non-kernel page table
must be globally performed before calling any of the TLB invalidation
functions.
With one exception, on amd64, this requirement was already met. Fix this
one case. Also, as a clarification, change an existing atomic op into a
release.
thompsa [Thu, 8 Nov 2007 05:52:24 +0000 (05:52 +0000)]
MFC network.subr r1.181, driver_freebsd.c r1.15
Change wpa_supplicant to down the interface at the start of the init routine.
wpa_supplicant expects that it has exclusive access to the net80211 state so
when its starts poking in the WEP/WPA settings and the card is already
scanning it can cause net80211 to try and associate incorrectly with a
protected AP.
This is an inconvenience for firmware based cards such as iwi where it can be
sent an auth instruction with incomplete security info and cause a firmware
error.
Remove the 'ifconfig up' from network.subr since wpa_supplicant will
immediately down the interface again.
emax [Wed, 7 Nov 2007 17:37:18 +0000 (17:37 +0000)]
MFC
Allow RFCOMM servers to bind to a ''wildcard'' RFCOMM channel
zero (0). Actual RFCOMM channel will be assigned after listen(2)
call is done on a RFCOMM socket bound to a ''wildcard'' RFCOMM
channel zero (0).
Address locking issues in ng_btsocket_rfcomm_bind()
Submitted by: Heiko Wundram (Beenic) < wundram at beenic dot net >
Approved by: re (kensmith)
simon [Tue, 6 Nov 2007 18:15:21 +0000 (18:15 +0000)]
MFC 1.17:
If the INDEX file cannot be opened, print the actual filename / path
pkg_version tried to open instead of just "INDEX" to make the actual
problem more clear (e.g. missing INDEX-8).
rwatson [Tue, 6 Nov 2007 14:46:59 +0000 (14:46 +0000)]
Merge mac_framework.h:1.85, mac_policy.h:1.95, mac_posix_sem.c:1.10,
mac_biba.c:1.108, mac_mls.c:1.89, mac_stub.c:1.69, mac_test.c:1.79 from
HEAD to RELENG_7:
Canonicalize naming of local variables for struct ksem and associated
labels to 'ks' and 'kslabel' to reflect the convention in posix_sem.c.
rrs [Tue, 6 Nov 2007 02:48:04 +0000 (02:48 +0000)]
- Change the Time Wait of vtags value to match the cookie-life
- Select a tag gains ability to optionally save new tags
off in the timewait system.
- When looking up associations do not give back a stcb that
is in the about-to-be-freed state, and instead continue
looking for other candiates.
- New function to query to see if value is in time-wait.
- Timewait had a time comparison error that caused very
few vtags to actually stay in time-wait.
- When setting tags in time-wait, we now use the time
requested NOT a fixed constant value.
- sstat now gets the proper associd when we do the query.
- When we process an association, we expect the tag chosen
(if we have one from a cookie) to be in time-wait. Before
we would NOT allow the assoc up by checking if its good.
In theory this should have caused almost all assoc not
to come up except for the time-comparison bug above (this
bug was hidden by the time comparison bug :-D).
- Don't save tags for nonce values in the time-wait cache
since these are used only during cookie collisions and do
not matter if they are unique or not.
yongari [Mon, 5 Nov 2007 01:39:25 +0000 (01:39 +0000)]
MFC rgephy.c rev 1.17-1.18, rgephyreg.h rev 1.3 to RELENG_7
rgephy.c rev 1.17, rgephyreg.h rev 1.3
Add support for RealTek RTL8211B(L) PHY. It's based on the patch
made by Michael Eisele and the patch was slightly modified by me.
With this change several NVIDIA ethernet controllers(e.g. MCP61)
works.
RTL8211B(L) is RealTek's new gigabit PHY. The PHY has several
features including crossover correction, polarity correction as
well as supporting triple speed(10/100/1000bps). Data transfer
between MAC and PHY is via RGMII for 1000baseT, MII for
10baseT/100baseTX.
Unfortunately, RealTek used the same model number for RTL8211B(L)
PHY so there is no way to discriminate between RTL8211B(L) and its
predecessors. ATM RTL8211B uses revision number 2 so checking the
revision number seems to be only way to identify it.
rgephyreg.c rev 1.18
Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach()
is redundant. mii_phy_add_media() already takes care of that.
yongari [Mon, 5 Nov 2007 01:31:59 +0000 (01:31 +0000)]
MFC rgephy.c rev 1.16 to RELENG_7
o RTL8169S/8110S integrated PHY and RTL8211B are gigabit PHYs so set
mii_anegticks to MII_ANEGTICKS_GIGE and use it. Previously it used
to MII_ANEGTICKS which may not be enough to wait before retrying
autonegotiation process at 1000bps.
o Reset autonegotation timer if media option is not IFM_AUTO or we
got a valid link.
o Announce link loss right after it happends.
o Autonegiation is retried every mii_anegticks seconds.
o Report link state changes right after setting autonegotiation.
rwatson [Sun, 4 Nov 2007 12:50:01 +0000 (12:50 +0000)]
Merge OpenBSM 1.0 from HEAD to RELENG_7:
- Fix bug in auditreduce(8) which resulted in a memory fault/crash when
the user specified an event name with -m.
- Remove AU_.* hard-coded audit class constants, as audit classes are now
entirely dynamically configured using /etc/security/audit_class.
rwatson [Fri, 2 Nov 2007 09:53:32 +0000 (09:53 +0000)]
Merge audit.c:1.35, audit_bsm_klib.c:1.8 from HEAD to RELENG_7:
Replace use of AU_NULL with 0 when no audit classes are in use; this
supports the removal of hard-coded audit class constants in OpenBSM
1.0. All audit classes are now dynamically configured via the
audit_class database.
kientzle [Fri, 2 Nov 2007 08:42:14 +0000 (08:42 +0000)]
MFC 1.18: When skipping input data, request a minimum of 1 instead
of the full request size. This avoids a 32-bit overflow
problem skipping an exact multiple of 4GB and is faster
anyway because it allows the underlying I/O framework
to minimize copying.
In particular, this fixes bsdtar failing to properly skip
entries in uncompressed tar archives that are an exact
multiple of 4GB.
rwatson [Fri, 2 Nov 2007 00:52:34 +0000 (00:52 +0000)]
Merge Neterion if_nxge driver version 2.0.9.11230 from HEAD to RELENG_7:
01 - Enhanced LRO:
LRO feature is extended to support multi-buffer mode. Previously,
Ethernet frames received in contiguous buffers were offloaded.
Now, frames received in multiple non-contiguous buffers can be
offloaded, as well. The driver now supports LRO for jumbo frames.
02 - Locks Optimization:
The driver code was re-organized to limit the use of locks.
Moreover, lock contention was reduced by replacing wait locks
with try locks.
03 - Code Optimization:
The driver code was re-factored to eliminate some memcpy
operations. Fast path loops were optimized.
04 - Tag Creations:
Physical Buffer Tags are now optimized based upon frame size.
For better performance, Physical Memory Maps are now re-used.
05 - Configuration:
Features such as TSO, LRO, and Interrupt Mode can be configured
either at load or at run time. Rx buffer mode (mode 1 or mode 2)
can be configured at load time through kenv.
06 - Driver Statistics:
Run time statistics are enhanced to provide better visibility
into the driver performance.
07 - Bug Fixes:
The driver contains fixes for the problems discovered and
reported since last submission.
08 - MSI support:
Added Message Signaled Interrupt feature which currently uses 1
message.
message.
09 Removed feature:
Rx 3 buffer mode feature has been removed. Driver now supports 1,
2 and 5 buffer modes of which 2 and 5 buffer modes can be used
for header separation.
10 Compiler warning:
Fixed compiler warning when compiled for 32 bit system.
11 Copyright notice:
Source files are updated with the proper copyright notice.
Submitted by: Alicia Pena <Alicia dot Pena at neterion dot com>,
Muhammad Shafiq <Muhammad dot Shafiq at neterion dot com>
rodrigc [Thu, 1 Nov 2007 14:09:07 +0000 (14:09 +0000)]
MFC: 1.267
In nmount(), if MNT_ROOT is in the mount flags, filter it
out instead of returning an error.
(1) This makes the behavior consistent with mount(2).
(2) This makes update mounts on the root file system work properly.
(3) The explicit checks for MNT_ROOTFS in src/sbin/fsck_ffs/main.c
and src/usr.sbin/mountd/mountd.c which were put in to
eliminate errors during update mounts on the root file system
can be removed.
The only place were MNT_ROOTFS can be validly set
is inside the kernel, i.e. with vfs_mountroot_try().
kensmith [Thu, 1 Nov 2007 13:07:28 +0000 (13:07 +0000)]
MFC v1.243 of config.c and v1.48 of dmenu.c - fixes needed because
sysinstall had made bad assumptions about the behavior of getenv(3)
and the new getenv(3) doesn't behave the same as the old one did
if you call it with getenv("amd_enable=YES").
It was noted during review that the use of strdup(3) here is wrong
and should be checked for NULL. It's worth noting that's what I meant
when I said I conformed to sysinstall's style despite urges to do otherwise
in the original commit. sysinstall is in desperate need of some major
rototilling (or being thrown out...).
emax [Wed, 31 Oct 2007 16:42:41 +0000 (16:42 +0000)]
MFC: etc/rc.d/ppp,v1.14 and etc/defaults/rc.conf,v1.319
Teach /etc/rc.d/ppp to start multiple instances of ppp.
ppp_profile variable can now contain multiple profiles.
Overrides for ppp mode and nat can go into ppp_$profile_mode
and ppp_$profile_nat variables respectively. If those are
not specified, defaults from ppp_mode and ppp_nat are used.
MFC: etc/rc.d/ppp v1.15
Teach /etc/rc.d/ppp how to start/stop individual instances
of ppp. This is an extension of previous commit.
Submitted by: Yuri Kurenkov < y dot kurenkov at init dot ru >
Reviewed by: mtm
Approved by: re (kensmith)
darrenr [Wed, 31 Oct 2007 05:00:38 +0000 (05:00 +0000)]
MFC the following:
Apply a few changes from ipfilter-current:
* Do not hold any locks over calls to copyin/copyout.
* Clean up some #ifdefs
* fix a possible mbuf leak when NAT fails on policy routed packets
alc [Wed, 31 Oct 2007 02:31:51 +0000 (02:31 +0000)]
MFC revision 1.389
Correct an error in vm_map_sync(), nee vm_map_clean(), that has existed
since revision 1.1. Specifically, neither traversal of the vm map checks
whether the end of the vm map has been reached. Consequently, the first
traversal can wrap around and bogusly return an error.
alc [Wed, 31 Oct 2007 02:27:28 +0000 (02:27 +0000)]
MFC revision 1.358
Change vm_page_cache_transfer() such that it does not transfer pages
that would have an offset beyond the end of the target object. Such
pages should remain in the source object.