]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoFix typos:
Hiroki Sato [Sat, 2 May 2009 11:59:56 +0000 (11:59 +0000)]
Fix typos:
s,Novatal,Novatel,
s,/sys/dev/u3g.c,/sys/dev/usb/serial/u3g.c,

MFC after:      3 days

15 years agoLinux socketpair() call expects explicit specified protocol for
Dmitry Chagin [Sat, 2 May 2009 10:51:40 +0000 (10:51 +0000)]
Linux socketpair() call expects explicit specified protocol for
AF_LOCAL domain unlike FreeBSD which expects 0 in this case.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoMove extern variable definitions to the header file.
Dmitry Chagin [Sat, 2 May 2009 10:06:49 +0000 (10:06 +0000)]
Move extern variable definitions to the header file.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoMake indentation more uniform accross vnet container structs.
Marko Zec [Sat, 2 May 2009 08:16:26 +0000 (08:16 +0000)]
Make indentation more uniform accross vnet container structs.

This is a purely cosmetic / NOP change.

Reviewed by: bz
Approved by: julian (mentor)
Verified by: svn diff -x -w producing no output

15 years agoMention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.
Roman Divacky [Sat, 2 May 2009 07:02:31 +0000 (07:02 +0000)]
Mention -h in usage() and manpage. Rename term_{r,e} to term_{so,se}.

Suggested by: ru
Approved by: ed (mentor)

15 years agoA variety of changes:
Alan Cox [Sat, 2 May 2009 06:12:38 +0000 (06:12 +0000)]
A variety of changes:

Reimplement "kernel_pmap" in the standard way.

Eliminate unused variables.  (These are mostly variables that were
discarded by the machine-independent layer after FreeBSD 4.x.)

Properly handle a vm_page_alloc() failure in pmap_init().

Eliminate dead or legacy (FreeBSD 4.x) code.

Eliminate unnecessary page queues locking.

Eliminate some excess white space.

Correct the synchronization of pmap_page_exists_quick().

Tested by: gonzo

15 years agoUnbreak options VIMAGE + nooptions INVARIANTS kernel builds.
Marko Zec [Sat, 2 May 2009 05:02:28 +0000 (05:02 +0000)]
Unbreak options VIMAGE + nooptions INVARIANTS kernel builds.

Submitted by: julian
Approved by: julian (mentor)

15 years agoAdd resume methods to i8254 and atrtc devices.
Alexander Motin [Fri, 1 May 2009 21:43:04 +0000 (21:43 +0000)]
Add resume methods to i8254 and atrtc devices.

15 years agorevert wip
Sam Leffler [Fri, 1 May 2009 21:31:39 +0000 (21:31 +0000)]
revert wip

15 years agoRename MAC Framework-internal macros used to invoke policy entry points:
Robert Watson [Fri, 1 May 2009 21:05:40 +0000 (21:05 +0000)]
Rename MAC Framework-internal macros used to invoke policy entry points:

  MAC_BOOLEAN           -> MAC_POLICY_BOOLEAN
  MAC_BOOLEAN_NOSLEEP   -> MAC_POLICY_BOOLEANN_NOSLEEP
  MAC_CHECK             -> MAC_POLICY_CHECK
  MAC_CHECK_NOSLEEP     -> MAC_POLICY_CHECK_NOSLEEP
  MAC_EXTERNALIZE       -> MAC_POLICY_EXTERNALIZE
  MAC_GRANT             -> MAC_POLICY_GRANT
  MAC_GRANT_NOSLEEP     -> MAC_POLICY_GRANT_NOSLEEP
  MAC_INTERNALIZE       -> MAC_POLICY_INTERNALIZE
  MAC_PERFORM           -> MAC_POLICY_PERFORM_CHECK
  MAC_PERFORM_NOSLEEP   -> MAC_POLICY_PERFORM_NOSLEEP

This frees up those macro names for use in wrapping calls into the MAC
Framework from the remainder of the kernel.

Obtained from: TrustedBSD Project

15 years agoSmall addition to r191720.
Alexander Motin [Fri, 1 May 2009 20:53:37 +0000 (20:53 +0000)]
Small addition to r191720.

Restore previous behaviour for the case of unknown interrupt. Invocation
of IRQ -1 crashes my system on resume. Returning 0, as it was, is not
perfect also, but at least not so dangerous.

15 years agoReorder the bridge add and delete routines to avoid calling ifpromisc() with
Andrew Thompson [Fri, 1 May 2009 19:46:42 +0000 (19:46 +0000)]
Reorder the bridge add and delete routines to avoid calling ifpromisc() with
the bridge lock held.

15 years agoo add uath
Sam Leffler [Fri, 1 May 2009 17:20:16 +0000 (17:20 +0000)]
o add uath
o sort usb wireless drivers

15 years agoadd more tdma fixed rate defaults
Sam Leffler [Fri, 1 May 2009 17:18:45 +0000 (17:18 +0000)]
add more tdma fixed rate defaults

15 years agoadd uath; sort usb wireless drivers
Sam Leffler [Fri, 1 May 2009 17:17:06 +0000 (17:17 +0000)]
add uath; sort usb wireless drivers

15 years agoadd uath
Sam Leffler [Fri, 1 May 2009 17:16:33 +0000 (17:16 +0000)]
add uath

15 years agoadd ralfw
Sam Leffler [Fri, 1 May 2009 17:15:29 +0000 (17:15 +0000)]
add ralfw

15 years agoUse value -1 instead of 0 for marking unused APIC vectors. This fixes
Alexander Motin [Fri, 1 May 2009 17:05:49 +0000 (17:05 +0000)]
Use value -1 instead of 0 for marking unused APIC vectors. This fixes
IRQ0 routing on LAPIC-enabled systems.

Add hint.apic.0.clock tunable. Setting it 0 disables using LAPIC timers
as hard-/stat-/profclock sources falling back to using i8254 and rtc timers.

On modern CPUs LAPIC is a part of CPU core which is shutting down when CPU
enters C3 or deeper power state. It makes no problems for interrupt
processing, as chipset wakes up CPU on interrupt triggering. But entering
C3 state kills LAPIC timer and freezes system time, making C3 and deeper
states practically unusable. Using i8254 timer allows to avoid this
problem.

By using i8254 timer my T7700 C2D CPU with UP kernel successfully enters
C3 state, saving more then a Watt of total idle power (>10%) in addition to
all other power-saving techniques.

This technique is not working for SMP yet, as only one CPU receives
timer interrupts. But I think that problem could be fixed by forwarding
interrupts to other CPUs with IPI.

15 years agoReimplement futexes.
Dmitry Chagin [Fri, 1 May 2009 15:36:02 +0000 (15:36 +0000)]
Reimplement futexes.
Old implemention used Giant to protect the kernel data structures,
but at the same time called malloc(M_WAITOK), that could cause the
calling thread to sleep and lost Giant protection. User-visible
result was the missed wakeup.

New implementation uses one sx lock per futex. The sx protects
the futex structures and allows to sleep while copyin or copyout
are performed.

Unlike linux, we return EINVAL when FUTEX_CMP_REQUEUE operation
is requested and either caller specified futexes are equial or
second futex already exists. This is acceptable since the situation
can only occur from the application error, and glibc falls back to
old FUTEX_WAKE operation when FUTEX_CMP_REQUEUE returns an error.

Approved by: kib (mentor)
MFC after: 1 month

15 years agoLimit scope of acquisition of INP_RLOCK for multicast input filter
Bruce M Simpson [Fri, 1 May 2009 11:05:24 +0000 (11:05 +0000)]
Limit scope of acquisition of INP_RLOCK for multicast input filter
to the scope of its use, even though this may thrash the lock if
the INP is referenced for other purposes.

Tested by: David Wolfskill

15 years agoImprove kernel dumping reliability for busy ATA channels:
Alexander Motin [Fri, 1 May 2009 08:03:46 +0000 (08:03 +0000)]
Improve kernel dumping reliability for busy ATA channels:
 - Generate fake channel interrupts even if channel busy with previous
request to let it finish. Without this, dumping requests were just queued
and never processed.
 - Drop pre-dump requests queue on dumping. ATA code, working in dumping
(interruptless) mode, unable to handle long request queue. Actually, to get
coherent dump we anyway should do as few unrelated actions as possible.

15 years agoSeparate multicast filtering of SysKonnect GENESIS and Marvell
Pyun YongHyeon [Fri, 1 May 2009 03:24:03 +0000 (03:24 +0000)]
Separate multicast filtering of SysKonnect GENESIS and Marvell
Yukon from common multicast handling code. Yukon uses hash-based
multicast filtering(big endian form) but GENESIS uses perfect
multicast filtering as well as hash-based one(little endian form).
Due to the differences of multicast filtering there is no much
sense to have a common code.
 o Remove sk_setmulti() and introduce sk_rxfilter_yukon(),
   sk_rxfilter_yukon() that handles multicast filtering setup.
 o Have sk_rxfilter_{yukon, genesis} handle promiscuous mode and
   nuke sk_setpromisc(). This simplifies ioctl handler as well as
   giving a chance to check validity of Rx control register of
   Yukon.
 o Don't reinitialize controller when IFF_ALLMULTI flags is changed.
 o Nuke sk_gmchash(), it's not needed anymore.
 o Always reconfigure Rx control register whenever a new multicast
   filtering condition is changed. This fixes multicast filtering
   setup on Yukon.

PR: kern/134051

15 years agoDon't call the OSD destructor if the data slot is NULL
Jamie Gritton [Thu, 30 Apr 2009 22:43:21 +0000 (22:43 +0000)]
Don't call the OSD destructor if the data slot is NULL
(since it's already not done on unused slots, which are indistinguishable
to the caller).

Approved by: bz (mentor)

15 years agoWe need to ref the bss node when sending the beacon since it goes through the
Andrew Thompson [Thu, 30 Apr 2009 22:30:01 +0000 (22:30 +0000)]
We need to ref the bss node when sending the beacon since it goes through the
normal tx path and will be decremented on the mbuf free.

15 years ago- Fix divide-by-zero panic when SMP kernel is used on UP system[1].
Jung-uk Kim [Thu, 30 Apr 2009 22:10:04 +0000 (22:10 +0000)]
- Fix divide-by-zero panic when SMP kernel is used on UP system[1].
- Avoid possible divide-by-zero panic on SMP system when the CPUID is
disabled, unsupported, or buggy.

Submitted by: pluknet (pluknet at gmail dot com)[1]

15 years agoFix off-by-one bug. S5 state must be checked as well.
Jung-uk Kim [Thu, 30 Apr 2009 18:00:53 +0000 (18:00 +0000)]
Fix off-by-one bug.  S5 state must be checked as well.

15 years agoo OpenBSD 4.5 added.
Maxim Konovalov [Thu, 30 Apr 2009 17:47:52 +0000 (17:47 +0000)]
o OpenBSD 4.5 added.

15 years agoFix style(9).
Jung-uk Kim [Thu, 30 Apr 2009 17:45:43 +0000 (17:45 +0000)]
Fix style(9).

15 years agoPrefer device_printf() over printf() where ever possible.
Jung-uk Kim [Thu, 30 Apr 2009 17:42:11 +0000 (17:42 +0000)]
Prefer device_printf() over printf() where ever possible.

15 years agoGeneral sleep state change clean up.
Jung-uk Kim [Thu, 30 Apr 2009 17:35:44 +0000 (17:35 +0000)]
General sleep state change clean up.

- Probe supported sleep states from acpi_attach() just once and do not
call AcpiGetSleepTypeData() again.  It is redundant because
AcpiEnterSleepStatePrep() does it any way.
- Treat UNKNOWN sleep state as NONE, i.e., "do nothing", and remove obscure
NONE state (ACPI_S_STATES_MAX + 1) to avoid confusions.
- Do not set unsupported sleep states as default button/switch events.
If the default sleep state is not supported, just set it as UNKNOWN/NONE.
- Do not allow sleep state change if the system is not fully up and running.
This should prevent entering S5 state multiple times, which causes strange
behaviours later.
- Make sleep states case-insensitive when they are used with sysctl(8).
For example,

sysctl hw.acpi.lid_switch_state=s1
sysctl hw.acpi.sleep_button_state=none

are now legal and equivalent to the uppercase ones.

15 years agoDo no spam the ifconfig output for the aggregated interface with 'laggdev laggX'.
Andrew Thompson [Thu, 30 Apr 2009 14:31:52 +0000 (14:31 +0000)]
Do no spam the ifconfig output for the aggregated interface with 'laggdev laggX'.

15 years agoUse the flowid if its available for selecting the tx port.
Andrew Thompson [Thu, 30 Apr 2009 14:25:44 +0000 (14:25 +0000)]
Use the flowid if its available for selecting the tx port.

15 years agoFixed multi-byte character support to actually work.
Ruslan Ermilov [Thu, 30 Apr 2009 13:53:00 +0000 (13:53 +0000)]
Fixed multi-byte character support to actually work.

15 years agoPermit buiding kernels with options VIMAGE, restricted to only a single
Marko Zec [Thu, 30 Apr 2009 13:36:26 +0000 (13:36 +0000)]
Permit buiding kernels with options VIMAGE, restricted to only a single
active network stack instance.  Turning on options VIMAGE at compile
time yields the following changes relative to default kernel build:

1) V_ accessor macros for virtualized variables resolve to structure
fields via base pointers, instead of being resolved as fields in global
structs or plain global variables.  As an example, V_ifnet becomes:

    options VIMAGE:          ((struct vnet_net *) vnet_net)->_ifnet
    default build:           vnet_net_0._ifnet
    options VIMAGE_GLOBALS:  ifnet

2) INIT_VNET_* macros will declare and set up base pointers to be used
by V_ accessor macros, instead of resolving to whitespace:

    INIT_VNET_NET(ifp->if_vnet); becomes

    struct vnet_net *vnet_net = (ifp->if_vnet)->mod_data[VNET_MOD_NET];

3) Memory for vnet modules registered via vnet_mod_register() is now
allocated at run time in sys/kern/kern_vimage.c, instead of per vnet
module structs being declared as globals.  If required, vnet modules
can now request the framework to provide them with allocated bzeroed
memory by filling in the vmi_size field in their vmi_modinfo structures.

4) structs socket, ifnet, inpcbinfo, tcpcb and syncache_head are
extended to hold a pointer to the parent vnet.  options VIMAGE builds
will fill in those fields as required.

5) curvnet is introduced as a new global variable in options VIMAGE
builds, always pointing to the default and only struct vnet.

6) struct sysctl_oid has been extended with additional two fields to
store major and minor virtualization module identifiers, oid_v_subs and
oid_v_mod.  SYSCTL_V_* family of macros will fill in those fields
accordingly, and store the offset in the appropriate vnet container
struct in oid_arg1.
In sysctl handlers dealing with virtualized sysctls, the
SYSCTL_RESOLVE_V_ARG1() macro will compute the address of the target
variable and make it available in arg1 variable for further processing.

Unused fields in structs vnet_inet, vnet_inet6 and vnet_ipfw have
been deleted.

Reviewed by: bz, rwatson
Approved by: julian (mentor)

15 years agoFixed missing dependency.
Ruslan Ermilov [Thu, 30 Apr 2009 13:30:27 +0000 (13:30 +0000)]
Fixed missing dependency.

15 years agoo Correct ng_hole(4) control messages names.
Maxim Konovalov [Thu, 30 Apr 2009 10:01:13 +0000 (10:01 +0000)]
o Correct ng_hole(4) control messages names.

PR: docs/134100
Submitted by: Eugene Mychlo
MFC after: 1 week

15 years agoo NetBSD 5.0 added.
Maxim Konovalov [Thu, 30 Apr 2009 07:48:49 +0000 (07:48 +0000)]
o NetBSD 5.0 added.

15 years agoReport the next directory being scanned when a ^T is pressed (or any
Warner Losh [Thu, 30 Apr 2009 01:24:53 +0000 (01:24 +0000)]
Report the next directory being scanned when a ^T is pressed (or any
SIGINFO).  Provides some progress report for the impatient.  This
won't report that we're blocking in our walk due to disk/network
problems, however.  There's no really good way to report that
condition that I'm aware of...

15 years ago - Fix non-SMP build by encapsulating idle spin logic in a macro.
Jeff Roberson [Wed, 29 Apr 2009 23:04:31 +0000 (23:04 +0000)]
 - Fix non-SMP build by encapsulating idle spin logic in a macro.

Pointy hat to: me

15 years agoRegen for new jail system calls in r191673.
Jamie Gritton [Wed, 29 Apr 2009 21:50:13 +0000 (21:50 +0000)]
Regen for new jail system calls in r191673.

Approved by: bz (mentor)

15 years agoAdd experimental support for SATA interface power management.
Alexander Motin [Wed, 29 Apr 2009 21:17:18 +0000 (21:17 +0000)]
Add experimental support for SATA interface power management.
Feature is controlled by hint.ata.X.pm_level tunable:
 0 - PM disabled, old behaviour, default.
 1 - device is allowed to initiate PM state change, host is passive.
 2 - host initiates PARTIAL state transition every time port is idle.
 3 - host initiates SLUMBER state transition every time port is idle.

PARTIAL state has up to 100us (50us for me) wakeup latency, but for my
ICH8M saves 0.5W of power per drive. SLUMBER state has up to 10ms (3.5ms
for me) wakeup latency, but saves 0.8W of power.

Modes 2 and 3 are implemented only for AHCI driver now.

Interface power management is incompatible with device presence detection
(host receives no signal from drive, so unable to monitor it), so later is
disabled when PM is used.

15 years agoIntroduce the extensible jail framework, using the same "name=value"
Jamie Gritton [Wed, 29 Apr 2009 21:14:15 +0000 (21:14 +0000)]
Introduce the extensible jail framework, using the same "name=value"
interface as nmount(2).  Three new system calls are added:
* jail_set, to create jails and change the parameters of existing jails.
  This replaces jail(2).
* jail_get, to read the parameters of existing jails.  This replaces the
  security.jail.list sysctl.
* jail_remove to kill off a jail's processes and remove the jail.
Most jail parameters may now be changed after creation, and jails may be
set to exist without any attached processes.  The current jail(2) system
call still exists, though it is now a stub to jail_set(2).

Approved by: bz (mentor)

15 years agoBite the bullet, and make the IPv6 SSM and MLDv2 mega-commit:
Bruce M Simpson [Wed, 29 Apr 2009 19:19:13 +0000 (19:19 +0000)]
Bite the bullet, and make the IPv6 SSM and MLDv2 mega-commit:
import from p4 bms_netdev.  Summary of changes:

 * Connect netinet6/in6_mcast.c to build.
   The legacy KAME KPIs are mostly preserved.
 * Eliminate now dead code from ip6_output.c.
   Don't do mbuf bingo, we are not going to do RFC 2292 style
   CMSG tricks for multicast options as they are not required
   by any current IPv6 normative reference.
 * Refactor transports (UDP, raw_ip6) to do own mcast filtering.
   SCTP, TCP unaffected by this change.
 * Add ip6_msource, in6_msource structs to in6_var.h.
 * Hookup mld_ifinfo state to in6_ifextra, allocate from
   domifattach path.
 * Eliminate IN6_LOOKUP_MULTI(), it is no longer referenced.
   Kernel consumers which need this should use in6m_lookup().
 * Refactor IPv6 socket group memberships to use a vector (like IPv4).
 * Update ifmcstat(8) for IPv6 SSM.
 * Add witness lock order for IN6_MULTI_LOCK.
 * Move IN6_MULTI_LOCK out of lower ip6_output()/ip6_input() paths.
 * Introduce IP6STAT_ADD/SUB/INC/DEC as per rwatson's IPv4 cleanup.
 * Update carp(4) for new IPv6 SSM KPIs.
 * Virtualize ip6_mrouter socket.
   Changes mostly localized to IPv6 MROUTING.
 * Don't do a local group lookup in MROUTING.
 * Kill unused KAME prototypes in6_purgemkludge(), in6_restoremkludge().
 * Preserve KAME DAD timer jitter behaviour in MLDv1 compatibility mode.
 * Bump __FreeBSD_version to 800084.
 * Update UPDATING.

NOTE WELL:
 * This code hasn't been tested against real MLDv2 queriers
   (yet), although the on-wire protocol has been verified in Wireshark.
 * There are a few unresolved issues in the socket layer APIs to
   do with scope ID propagation.
 * There is a LOR present in ip6_output()'s use of
   in6_setscope() which needs to be resolved. See comments in mld6.c.
   This is believed to be benign and can't be avoided for the moment
   without re-introducing an indirect netisr.

This work was mostly derived from the IGMPv3 implementation, and
has been sponsored by a third party.

15 years agoSome non-functional changes: whitespace, KASSERT strings, declaration order.
Jamie Gritton [Wed, 29 Apr 2009 18:41:08 +0000 (18:41 +0000)]
Some non-functional changes: whitespace, KASSERT strings, declaration order.

Approved by: bz (mentor)

15 years agoImplement ^T support for rm: now it will report the next file it
Warner Losh [Wed, 29 Apr 2009 18:08:18 +0000 (18:08 +0000)]
Implement ^T support for rm: now it will report the next file it
removes when you hit ^T.  This is similar to what's done for cp.  The
signal handler and type definitions for "info" were borrowed directly
from cp.

15 years agoWith the permission of phk@ change the license on remaining jail code
Jamie Gritton [Wed, 29 Apr 2009 16:02:52 +0000 (16:02 +0000)]
With the permission of phk@ change the license on remaining jail code
to a 2 clause BSD license.

Approved by: phk
Approved by: bz (mentor)

15 years agoAdd MLDv2 protocol header, but do not connect it to the build.
Bruce M Simpson [Wed, 29 Apr 2009 11:31:23 +0000 (11:31 +0000)]
Add MLDv2 protocol header, but do not connect it to the build.

15 years agoImport IPv6 SSM module but do not connect it to the build.
Bruce M Simpson [Wed, 29 Apr 2009 11:26:45 +0000 (11:26 +0000)]
Import IPv6 SSM module but do not connect it to the build.

15 years agoStub out IN6_LOOKUP_MULTI() for GETSPI requests, for now.
Bruce M Simpson [Wed, 29 Apr 2009 11:15:58 +0000 (11:15 +0000)]
Stub out IN6_LOOKUP_MULTI() for GETSPI requests, for now.

This has the effect that IPv6 multicast traffic won't trigger
an SPI allocation when IPSEC is in use, however, this obviously
needs to stomp on locks, and IN6_LOOKUP_MULTI() is about to go away.

This definitely needs to be revisited before 8.x is branched as
a release branch.

15 years agoAdd IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT, in6addr_linklocal_allv2routers
Bruce M Simpson [Wed, 29 Apr 2009 10:22:44 +0000 (10:22 +0000)]
Add IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT, in6addr_linklocal_allv2routers
for use by MLDv2.
Add IPv6 SSM socket layer membership vector size constants and
tree bounds.
Remove unreferenced struct ipv6_mreq_source; SSM for IPv6 goes
straight to the RFC 3678 socket options.

15 years agoAdd MLDv2 prototypes and defines.
Bruce M Simpson [Wed, 29 Apr 2009 10:20:17 +0000 (10:20 +0000)]
Add MLDv2 prototypes and defines.

15 years agoUse KTR_INET for MROUTING CTRs.
Bruce M Simpson [Wed, 29 Apr 2009 10:17:08 +0000 (10:17 +0000)]
Use KTR_INET for MROUTING CTRs.

15 years agoCut over to KTR_INET for CTR.
Bruce M Simpson [Wed, 29 Apr 2009 10:14:16 +0000 (10:14 +0000)]
Cut over to KTR_INET for CTR.
For clarity, put pointer incremement/size decrement on own line
when copying out in-mode source filters to userland.

15 years agoDo not assume that ip6_moptions is always set, it is
Bruce M Simpson [Wed, 29 Apr 2009 10:13:22 +0000 (10:13 +0000)]
Do not assume that ip6_moptions is always set, it is
a lazy-allocated structure.

15 years agoFix a problem whereby enqueued IGMPv3 filter list changes would be
Bruce M Simpson [Wed, 29 Apr 2009 10:12:01 +0000 (10:12 +0000)]
Fix a problem whereby enqueued IGMPv3 filter list changes would be
incorrectly output, if the RB-tree enumeration happened to reuse the
same chain for a mode switch: that is, both ALLOW and BLOCK records
were appended for the same group, in the same mbuf packet chain.

This was introduced during an mbuf chain layout bug fix involving
m_getptr(), which obviously cannot count from offset 0 on the
second pass through the RB-tree when serializing the IGMPv3
group records into the pending mbuf chain.

Cut over to KTR_INET for IGMPv3 CTR usage.

15 years agoSlightly improve gjournal documentation.
Edward Tomasz Napierala [Wed, 29 Apr 2009 10:02:50 +0000 (10:02 +0000)]
Slightly improve gjournal documentation.

Reviewed by: pjd

15 years agoGrab a VIMAGE module ID for MLDv2.
Bruce M Simpson [Wed, 29 Apr 2009 09:59:34 +0000 (09:59 +0000)]
Grab a VIMAGE module ID for MLDv2.

15 years agoFix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
Bruce M Simpson [Wed, 29 Apr 2009 09:58:31 +0000 (09:58 +0000)]
Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
the kernel will return in msfr_nsrcs the number of source filters
in-mode for a given multicast group.
However, the filters themselves were never copied out, as the libc
function clobbers this field with zero, causing the kernel to assume
the provided vector of struct sockaddr_storage has zero length.
This bug would only affect users of SSM multicast, which is shimmed
in 7.x.
Picked up during mtest(8) refactoring.

MFC after: 1 day

15 years agoGrab KTR_SPARE1 and KTR_SPARE5 for KTR_INET and KTR_INET6
Bruce M Simpson [Wed, 29 Apr 2009 09:54:33 +0000 (09:54 +0000)]
Grab KTR_SPARE1 and KTR_SPARE5 for KTR_INET and KTR_INET6
respectively, as placeholder for future use of CTR() by
the networking code (MLDv2 will be going in shortly).
Mark KTR_SPARE* as being used in fact by cxgb (picked up
on a 'make universe' run).

15 years agoAdd MLDv2 statistic IDs to netstat for IPv6 stack.
Bruce M Simpson [Wed, 29 Apr 2009 09:52:04 +0000 (09:52 +0000)]
Add MLDv2 statistic IDs to netstat for IPv6 stack.

15 years agoMerge IPv6-capable mtest(8) from MLDv2 branch.
Bruce M Simpson [Wed, 29 Apr 2009 09:50:04 +0000 (09:50 +0000)]
Merge IPv6-capable mtest(8) from MLDv2 branch.

15 years ago - Add support for cpuid leaf 0xb. This allows us to determine the
Jeff Roberson [Wed, 29 Apr 2009 06:54:40 +0000 (06:54 +0000)]
 - Add support for cpuid leaf 0xb.  This allows us to determine the
   topology of nehalem/corei7 based systems.
 - Remove the cpu_cores/cpu_logical detection from identcpu.
 - Describe the layout of the system in cpu_mp_announce().

Sponsored by:   Nokia

15 years ago - Fix the FBSDID line.
Jeff Roberson [Wed, 29 Apr 2009 03:26:30 +0000 (03:26 +0000)]
 - Fix the FBSDID line.

15 years ago - Remove the bogus idle thread state code. This may have a race in it
Jeff Roberson [Wed, 29 Apr 2009 03:15:43 +0000 (03:15 +0000)]
 - Remove the bogus idle thread state code.  This may have a race in it
   and it only optimized out an ipi or mwait in very few cases.
 - Skip the adaptive idle code when running on SMT or HTT cores.  This
   just wastes cpu time that could be used on a busy thread on the same
   core.
 - Rename CG_FLAG_THREAD to CG_FLAG_SMT to be more descriptive.  Re-use
   CG_FLAG_THREAD to mean SMT or HTT.

Sponsored by:   Nokia

15 years agoPrevent a superuser inside a jail from modifying the dedicated
Bjoern A. Zeeb [Tue, 28 Apr 2009 21:00:50 +0000 (21:00 +0000)]
Prevent a superuser inside a jail from modifying the dedicated
root cpuset of that jail.
Processes inside the jail will still be able to change child sets.
A superuser outside of a jail will still be able to change the jail cpuset
and thus limit the number of cpus available to the jail.

Problem reported by: 000.fbsd@quip.cz (Miroslav Lachman)
PR: kern/134050
Reviewed by: jeff
MFC after: 3 weeks
X-MFC: backout r191596

15 years ago- Change some softc members to be unsigned where more appropriate.
Marius Strobl [Tue, 28 Apr 2009 20:49:47 +0000 (20:49 +0000)]
- Change some softc members to be unsigned where more appropriate.
- Add some missing const.
- Move the size of the window spun by the registers to the softc
  as neither using va_mem_size for this nor va_mem_base for the
  start of the bus addresses is appropriate.

MFC after: 1 week

15 years ago- xref ndp(8)
Daniel Gerzo [Tue, 28 Apr 2009 20:23:58 +0000 (20:23 +0000)]
- xref ndp(8)

PR: docs/134053
Submitted by: Bob Van Zant <bob@veznat.com>
MFC after: 1 week

15 years ago- fix path for locale.alias
Daniel Gerzo [Tue, 28 Apr 2009 20:20:13 +0000 (20:20 +0000)]
- fix path for locale.alias

PR: docs/134070
Submitted by: Frank Shute <frank@shute.org.uk>
MFC after: 1 week

15 years agoChange the test at the beginning of strncmp(), from being if (len - 1) < 0
Olivier Houchard [Tue, 28 Apr 2009 19:20:13 +0000 (19:20 +0000)]
Change the test at the beginning of strncmp(), from being if (len - 1) < 0
to if (len == 0).
The length is supposed to be unsigned, so len - 1 < 0 won't happen except
if len == 0 anyway, and it would return 0 when it shouldn't, if len was
> INT_MAX.

Spotted out by: Channa <channa kad gmail com>

15 years agoacpi: do not run resume/backout code when entering S0/S5 states
Andriy Gapon [Tue, 28 Apr 2009 11:56:54 +0000 (11:56 +0000)]
acpi: do not run resume/backout code when entering S0/S5 states

This change adds (possibly redundant) early check for invalid
state input parameter (including S0). Handling of S5 request
is reduced to simply calling shutdown_nice(). As a result
control flow of acpi_EnterSleepState is somewhat simplified
and resume/backout half of the function is not executed
for S5 (soft poweroff) request and invalid state requests.

Note: it seems that shutdown_nice may act as nop when initproc
is already initialized (to grab pid of 1), but init process is in
"pre-natal" state.

Tested by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: njl, jkim
Approved by: rpaulo

15 years agoUse the acquired reference to the vmspace instead of direct dereferencing
Konstantin Belousov [Tue, 28 Apr 2009 11:45:36 +0000 (11:45 +0000)]
Use the acquired reference to the vmspace instead of direct dereferencing
of p->p_vmspace in a place where it was missed in r191277.

Noted by:  pluknet gmail com

15 years agoFix typo.
Konstantin Belousov [Tue, 28 Apr 2009 11:43:35 +0000 (11:43 +0000)]
Fix typo.

15 years agoDon't require packet to match a route (any route; this information wasn't
Edward Tomasz Napierala [Tue, 28 Apr 2009 11:10:33 +0000 (11:10 +0000)]
Don't require packet to match a route (any route; this information wasn't
used anyway, so a typical workaround was to add a dummy route) if it's going
to be sent through IPSec tunnel.

Reviewed by: bz

15 years agoAdded (pre|post)(start|stop) jail hooks. These can be used to run
Ruslan Ermilov [Tue, 28 Apr 2009 09:45:32 +0000 (09:45 +0000)]
Added (pre|post)(start|stop) jail hooks.  These can be used to run
arbitrary commands (outside the jail) associated with said events,
e.g. to bring up/down CARP interfaces representing services run in
jails.

Reviewed by: simon

15 years agoMFC of tzdata2009g:
Edwin Groothuis [Tue, 28 Apr 2009 08:20:32 +0000 (08:20 +0000)]
MFC of tzdata2009g:

Egypt will have DST till the end of September the coming years.

15 years agoVendor import of tzdata2009g
Edwin Groothuis [Tue, 28 Apr 2009 07:44:12 +0000 (07:44 +0000)]
Vendor import of tzdata2009g

Egypt will have DST till the end of September the coming years.

15 years agofix typo in conditional
Kip Macy [Mon, 27 Apr 2009 23:43:28 +0000 (23:43 +0000)]
fix typo in conditional

15 years agocollapse the two em_start_locked routines in to one
Kip Macy [Mon, 27 Apr 2009 22:55:48 +0000 (22:55 +0000)]
collapse the two em_start_locked routines in to one

15 years agosimplify by removing dead code
Kip Macy [Mon, 27 Apr 2009 22:54:30 +0000 (22:54 +0000)]
simplify by removing dead code

15 years agoremove dead code with reference to IFQ_HANDOFF
Kip Macy [Mon, 27 Apr 2009 22:53:35 +0000 (22:53 +0000)]
remove dead code with reference to IFQ_HANDOFF

15 years agoreplace IFQ_ENQUEUE + if_start with if_transmit
Kip Macy [Mon, 27 Apr 2009 22:46:26 +0000 (22:46 +0000)]
replace IFQ_ENQUEUE + if_start with if_transmit

15 years agoreplace IFQ_HANDOFF with if_transmit
Kip Macy [Mon, 27 Apr 2009 22:45:56 +0000 (22:45 +0000)]
replace IFQ_HANDOFF with if_transmit

15 years agoremove gratuitous memory barrier, a remnant of unified L2 / L3
Kip Macy [Mon, 27 Apr 2009 22:45:19 +0000 (22:45 +0000)]
remove gratuitous memory barrier, a remnant of unified L2 / L3

15 years agoremove call to IFQ_HANDOFF is it called by if_transmit in the default case
Kip Macy [Mon, 27 Apr 2009 22:44:26 +0000 (22:44 +0000)]
remove call to IFQ_HANDOFF is it called by if_transmit in the default case
and doing so allows the ifnet driver to define its own queueing mechanism

15 years agoDocument the liblzma support.
Tim Kientzle [Mon, 27 Apr 2009 22:39:43 +0000 (22:39 +0000)]
Document the liblzma support.
Unfortunately, liblzma itself is GPLed, so unlikely to become part of
the FreeBSD base system.
However, the core lzma compression/decompression code is public
domain, so it should be feasible for someone to create a compatible
library without the GPL strings.

15 years agouse if_transmit intead of direct frobbing of the if_snd q; this is no
Sam Leffler [Mon, 27 Apr 2009 22:06:49 +0000 (22:06 +0000)]
use if_transmit intead of direct frobbing of the if_snd q; this is no
longer allowed

Identified by: rwatson
Reviewed by: kmacy

15 years agoUse cached progif instead of reading it again.
Jung-uk Kim [Mon, 27 Apr 2009 21:45:05 +0000 (21:45 +0000)]
Use cached progif instead of reading it again.

15 years ago- Give generic AHCI driver lower priority than device-specific drivers.
Jung-uk Kim [Mon, 27 Apr 2009 21:34:15 +0000 (21:34 +0000)]
- Give generic AHCI driver lower priority than device-specific drivers.
- Consistently use BUS_PROBE_GENERIC instead of -100.

15 years agokey_gettunnel() has been unsued with FAST_IPSEC (now IPSEC).
Bjoern A. Zeeb [Mon, 27 Apr 2009 21:04:16 +0000 (21:04 +0000)]
key_gettunnel() has been unsued with FAST_IPSEC (now IPSEC).
KAME had explicit checks at one point using it, so just hide it behind
#if 0 for now until we are sure if we can completely dump it or not.

MFC after: 1 month

15 years agoSymlink some additional man page entries.
Tim Kientzle [Mon, 27 Apr 2009 20:23:22 +0000 (20:23 +0000)]
Symlink some additional man page entries.

15 years agoMerge r991 from libarchive.googlecode.com: Various updates
Tim Kientzle [Mon, 27 Apr 2009 20:13:13 +0000 (20:13 +0000)]
Merge r991 from libarchive.googlecode.com:  Various updates
to archive_read.3 manpage, including documentation for the
new "raw" handler.

15 years agoMerge r990,r1044 from libarchive.googlecode.com:
Tim Kientzle [Mon, 27 Apr 2009 20:09:05 +0000 (20:09 +0000)]
Merge r990,r1044 from libarchive.googlecode.com:
read_support_format_raw() allows people to exploit libarchive's
automatic decompression support by simply stubbing out the
archive format handler.
The raw handler is not enabled by support_format_all(), of course.
It bids 1 on any non-empty input and always returns a single
entry named "data" with no properties set.

15 years agoReduce code duplication and excessive pci_get_slot() calls.
Jung-uk Kim [Mon, 27 Apr 2009 19:39:18 +0000 (19:39 +0000)]
Reduce code duplication and excessive pci_get_slot() calls.

Reviewed by: mav

15 years agoMerge r1061,r1062,r1063 from libarchive.googlecode.com:
Tim Kientzle [Mon, 27 Apr 2009 19:30:09 +0000 (19:30 +0000)]
Merge r1061,r1062,r1063 from libarchive.googlecode.com:
Fix reading big-endian binary cpio archives, and add a test.
While I'm here, add a note about Solaris ACL extension for cpio,
which should be relatively straightforward to support.

Thanks to: Edward Napierala, who sent me a big-endian cpio archive
from a Solaris system he's been playing with.
Pointy hat: me

15 years agoMerge r1034 from libarchive.googlecode.com:
Tim Kientzle [Mon, 27 Apr 2009 19:23:53 +0000 (19:23 +0000)]
Merge r1034 from libarchive.googlecode.com:
Put a much larger file on the reference ISO for this test.

15 years agoMerge r1058 from libarchive.googlecode.com: Require that each
Tim Kientzle [Mon, 27 Apr 2009 19:20:25 +0000 (19:20 +0000)]
Merge r1058 from libarchive.googlecode.com:  Require that each
test source file has exactly one DEFINE_TEST().

15 years agoino_t varies across platforms; casting (int) here avoids
Tim Kientzle [Mon, 27 Apr 2009 19:14:43 +0000 (19:14 +0000)]
ino_t varies across platforms; casting (int) here avoids
various pointless complaints.

15 years agoMerge r1032 from libarchive.googlecode.com:
Tim Kientzle [Mon, 27 Apr 2009 18:55:22 +0000 (18:55 +0000)]
Merge r1032 from libarchive.googlecode.com:
Make test_fuzz a bit more sensitive by actually reading the body
of each entry instead of skipping it.
While I'm here, move the "UnsupportedCompress" macro into the
only file that still uses it.

15 years agoMerge r1054,r1060 from libarchive.googlecode.com:
Tim Kientzle [Mon, 27 Apr 2009 18:39:55 +0000 (18:39 +0000)]
Merge r1054,r1060 from libarchive.googlecode.com:
 * assertEqualMem() now takes void * arguments
 * Be a little smarter about what we hexdump when assertEqualMem() fails

15 years agoCorrect fat finger mistake
Jack F Vogel [Mon, 27 Apr 2009 18:35:06 +0000 (18:35 +0000)]
Correct fat finger mistake