]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoCorrect some issues with zfs boot.
Robert Noland [Fri, 23 Oct 2009 18:44:53 +0000 (18:44 +0000)]
Correct some issues with zfs boot.

 - Teach it to read gang blocks. (essentially untested)
   If you see "ZFS: gang block detected!", please let
   me know, so we can either remove the printf if it
   works, or fix it if it doesn't.

 - If multiple partitions exist on a disk, probe them all.
   We also need to reset dsk->start to 0 to read the right
   sector here.

 - With GPT, we can have 128 partitions.

 - If the bootfs property has ever been set on a pool
   it seems that it never goes away.  zpool won't allow
   you to add to the pool with the bootfs property set.
   However, if you clear the property back to default
   we end up getting 0 for the object number and read
   a bogus block pointer and fail to boot.

 - Fix some error printfs. The printf in the loader is
   only capable of c,s and u formats.

 - Teach printf how to display %llu

Reviewed by: dfr, jhb
MFC after: 2 weeks

14 years ago- When we restore VESA state, try BIOS POST earlier. VESA restore state
Jung-uk Kim [Fri, 23 Oct 2009 18:41:00 +0000 (18:41 +0000)]
- When we restore VESA state, try BIOS POST earlier.  VESA restore state
function may not work properly if we don't.  Turn off hardware cursor as
vesa_set_mode() does.
- Add VBE 3.0 specific fields in VESA mode structure and pack it.  Note
the padding is 190 bytes although VBE 3.0 says 189 bytes.  It must be wrong
because the size of structure becomes 255 bytes and the specification says
it must be 256 bytes in total.  In fact, an example code in the spec. does
it right, though.  While we are at it, fix some i386-isms.
- Remove state buffer size limitation.  It is no longer necessary since
sys/compat/x86bios/x86bios.c r198251.
- Move int 0x10 vector test into vesa_bios_post() as we always do it anyway.

14 years agoUse the correct option name in the preprocessor command to enable
Qing Li [Fri, 23 Oct 2009 18:27:34 +0000 (18:27 +0000)]
Use the correct option name in the preprocessor command to enable
or disable diagnostic messages.

Reviewed by: ru
MFC after: 3 days

14 years agoRemove unneeded blank line from bpf_drvinit().
Robert Watson [Fri, 23 Oct 2009 17:26:29 +0000 (17:26 +0000)]
Remove unneeded blank line from bpf_drvinit().

MFC after: 3 days

14 years ago- Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and
John Baldwin [Fri, 23 Oct 2009 15:14:54 +0000 (15:14 +0000)]
- Fix several off-by-one errors when using MAXCOMLEN.  The p_comm[] and
  td_name[] arrays are actually MAXCOMLEN + 1 in size and a few places that
  created shadow copies of these arrays were just using MAXCOMLEN.
- Prefer using sizeof() of an array type to explicit constants for the
  array length in a few places.
- Ensure that all of p_comm[] and td_name[] is always zero'd during
  execve() to guard against any possible information leaks.  Previously
  trailing garbage in p_comm[] could be leaked to userland in ktrace
  record headers via td_name[].

Reviewed by: bde

14 years agoStyle fix.
John Baldwin [Fri, 23 Oct 2009 15:10:41 +0000 (15:10 +0000)]
Style fix.

14 years agoDon't bother copying the name of a kproc or kthread out into a temporary
John Baldwin [Fri, 23 Oct 2009 15:09:51 +0000 (15:09 +0000)]
Don't bother copying the name of a kproc or kthread out into a temporary
array just to pass that array to printf().  kproc and kthread names are
NUL-terminated and can be printed using printf() directly.

Reviewed by: bde

14 years agoMFp4:
Alexander Motin [Fri, 23 Oct 2009 14:56:29 +0000 (14:56 +0000)]
MFp4:
Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.

14 years agowordexp(3): fix some bugs with signals and long outputs
Jilles Tjoelker [Fri, 23 Oct 2009 14:50:11 +0000 (14:50 +0000)]
wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR: 90580
MFC after: 1 month

14 years agoDo not map the trap vectors into the kernel's address space. They are
Nathan Whitehorn [Fri, 23 Oct 2009 14:27:40 +0000 (14:27 +0000)]
Do not map the trap vectors into the kernel's address space. They are
only used in real mode and keeping them mapped only serves to make NULL
a valid address, which results in silent NULL pointer deferences.

Suggested by:   Patrick Kerharo
Obtained from: projects/ppc64

14 years agoMake "Retrying Command" to be printed before actual retrying.
Alexander Motin [Fri, 23 Oct 2009 13:39:30 +0000 (13:39 +0000)]
Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.

14 years agoImprove grammar in ip_input comment while attempting to maintain what
Robert Watson [Fri, 23 Oct 2009 13:35:00 +0000 (13:35 +0000)]
Improve grammar in ip_input comment while attempting to maintain what
might be its meaning.

MFC after: 3 days

14 years agoProperly sort the intr_event_describe_handler() prototype.
John Baldwin [Fri, 23 Oct 2009 13:28:33 +0000 (13:28 +0000)]
Properly sort the intr_event_describe_handler() prototype.

Submitted by: bde

14 years agoRevert interrupt reason check order back.
Alexander Motin [Fri, 23 Oct 2009 13:07:22 +0000 (13:07 +0000)]
Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.

14 years agoMFp4:
Alexander Motin [Fri, 23 Oct 2009 12:36:42 +0000 (12:36 +0000)]
MFp4:
Move Port Multiplier support code out of ATA XPT into pmp periph driver.
This is convinient, as PMP itself is a bus target and has own state.

14 years agoFix the build.
Alexander Motin [Fri, 23 Oct 2009 11:26:58 +0000 (11:26 +0000)]
Fix the build.

14 years agoThe draft spec doesn't say beacon frames need to have a wildcard BSSID,
Rui Paulo [Fri, 23 Oct 2009 11:13:08 +0000 (11:13 +0000)]
The draft spec doesn't say beacon frames need to have a wildcard BSSID,
so remove the mesh code necessary for that.

MFC after: 2 days

14 years agoUse double-quotation marks to fix the unexpanded variable issue.
Hiroki Sato [Fri, 23 Oct 2009 09:30:19 +0000 (09:30 +0000)]
Use double-quotation marks to fix the unexpanded variable issue.

Spotted by: swell.k

14 years agoReplace most of priority numbers with defines. No logical changes.
Alexander Motin [Fri, 23 Oct 2009 08:27:55 +0000 (08:27 +0000)]
Replace most of priority numbers with defines. No logical changes.

14 years agoRemove some obsoleted comments.
Alexander Motin [Fri, 23 Oct 2009 07:54:15 +0000 (07:54 +0000)]
Remove some obsoleted comments.

14 years agoAdd SMP support on U3-based G5 systems. This does not yet work perfectly:
Nathan Whitehorn [Fri, 23 Oct 2009 03:17:02 +0000 (03:17 +0000)]
Add SMP support on U3-based G5 systems. This does not yet work perfectly:
at least on my Xserve, getting the decrementer and timebase on APs to tick
requires setting up a clock chip over I2C, which is not yet done.

While here, correct the 64-bit tlbie function to set the CPU to 64-bit
mode correctly.

Hardware donated by: grehan

14 years agoAfter thinking again, implement cam_ccbq_fini().
Alexander Motin [Thu, 22 Oct 2009 21:07:32 +0000 (21:07 +0000)]
After thinking again, implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.

14 years agoPrevent wraparound of the timeout variable.
Andrew Thompson [Thu, 22 Oct 2009 21:01:41 +0000 (21:01 +0000)]
Prevent wraparound of the timeout variable.

Submitted by: HPS

14 years agoMove comments to the beginning of the line to make it look better.
Edwin Groothuis [Thu, 22 Oct 2009 20:59:51 +0000 (20:59 +0000)]
Move comments to the beginning of the line to make it look better.
Thank to ru@ for his noticing of it.

MFC after: 1 week

14 years agoRename default to default_function, for compatibility with GNU awk.
Ed Maste [Thu, 22 Oct 2009 20:57:17 +0000 (20:57 +0000)]
Rename default to default_function, for compatibility with GNU awk.
(For cross-compiling out-of-tree kernel modules, for example.)

14 years agoAllow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
Andrew Thompson [Thu, 22 Oct 2009 20:54:01 +0000 (20:54 +0000)]
Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
previously only available via bootverbose.

PR: usb/137191
Submitted by: Eygene Ryabinkin

14 years agocam_ccbq_fini() declared for 11 years, but never implemented. Remove it.
Alexander Motin [Thu, 22 Oct 2009 20:44:55 +0000 (20:44 +0000)]
cam_ccbq_fini() declared for 11 years, but never implemented. Remove it.

14 years agoInitialize rann_flags properly.
Rui Paulo [Thu, 22 Oct 2009 17:30:22 +0000 (17:30 +0000)]
Initialize rann_flags properly.

MFC after: 2 days

14 years agoSet the devclass_t pointer specified in the DRIVER_MODULE() macro
John Baldwin [Thu, 22 Oct 2009 14:53:44 +0000 (14:53 +0000)]
Set the devclass_t pointer specified in the DRIVER_MODULE() macro
sooner so it is always valid when a driver's identify routine is
called.  Previously, new-bus would attempt to create the devclass for
a newly loaded driver in two separate places, once in
devclass_add_driver(), and again after devclass_add_driver() returned
in driver_module_handler().  Only the second lookup attempted to set a
device class' parent and set the devclass_t pointer specified in the
DRIVER_MODULE() macro.  However, by the time it was executed, the
driver was already added to existing instances of the parent driver at
which point in time the new driver's identify routine would have been
invoked.  The fix is to merge the two attempts and only create the
devclass once in devclass_add_driver() including setting the
devclass_t pointer passed to DRIVER_MODULE() before the driver is
added to any existing bus devices.

Reported by: avg
Reviewed by: imp
MFC after: 2 weeks

14 years agoDon't use BUS_DMA_ALLOCNOW as that causes the attachment to fail on
Rui Paulo [Thu, 22 Oct 2009 12:48:17 +0000 (12:48 +0000)]
Don't use BUS_DMA_ALLOCNOW as that causes the attachment to fail on
Cambria boards.

MFC after: 2 months

14 years agoUnbreak NO_WARNS, keeping CSTD effect on CFLAGS out of its control.
Ruslan Ermilov [Thu, 22 Oct 2009 11:45:35 +0000 (11:45 +0000)]
Unbreak NO_WARNS, keeping CSTD effect on CFLAGS out of its control.
Unbreak compiles with icc.

14 years agoList more dependencies for these drivers. While here, convert
Christian Brueffer [Thu, 22 Oct 2009 11:35:12 +0000 (11:35 +0000)]
List more dependencies for these drivers. While here, convert
atapicam(4) to use our standard section 4 SYNOPSIS layout.

PR: 132525
Submitted by: gcooper
MFC after: 3 days

14 years agoRemove self-reference.
Pawel Jakub Dawidek [Thu, 22 Oct 2009 08:38:27 +0000 (08:38 +0000)]
Remove self-reference.

14 years agoCheck pointer for NULL before dereferencing it, not after.
Christian Brueffer [Thu, 22 Oct 2009 06:51:29 +0000 (06:51 +0000)]
Check pointer for NULL before dereferencing it, not after.

PR: 138387, 138388
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week

14 years agoCheck pointer for NULL before dereferencing it, not after.
Christian Brueffer [Thu, 22 Oct 2009 06:17:04 +0000 (06:17 +0000)]
Check pointer for NULL before dereferencing it, not after.

PR: 138390
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week

14 years agoFix a memory leak in an error case.
Christian Brueffer [Thu, 22 Oct 2009 06:13:07 +0000 (06:13 +0000)]
Fix a memory leak in an error case.

PR: 138376
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
Reviewed by: scottl
MFC after: 1 week

14 years agoVerify "smp_started" is true before calling
Qing Li [Thu, 22 Oct 2009 00:32:01 +0000 (00:32 +0000)]
Verify "smp_started" is true before calling
sched_bind() and sched_unbind().

Reviewed by: kmacy
MFC after: 3 days

14 years agoMake dhclient use bootpc (68) as the source port for unicast DHCPREQUEST
Philip Paeps [Wed, 21 Oct 2009 23:50:35 +0000 (23:50 +0000)]
Make dhclient use bootpc (68) as the source port for unicast DHCPREQUEST
packets instead of allowing the protocol stack to pick a random source port.

This fixes the behaviour where dhclient would never transition from RENEWING
to BOUND without going through REBINDING in networks which are paranoid about
DHCP spoofing, such as most mainstream cable-broadband ISP networks.

Reviewed by: brooks
Obtained from: OpenBSD (partly - I'm not convinced their solution can work)
MFC after: 1 week (pending re approval)

14 years agoAfter the installation of the /usr/share/zoneinfo, run tzsetup if
Edwin Groothuis [Wed, 21 Oct 2009 20:59:12 +0000 (20:59 +0000)]
After the installation of the /usr/share/zoneinfo, run tzsetup if
/var/db/zoneinfo exists.

MFC after: 1 week

14 years ago- Add support for chrooted installs.
Edwin Groothuis [Wed, 21 Oct 2009 20:55:04 +0000 (20:55 +0000)]
- Add support for chrooted installs.
- Add examples to the man-page.

MFC after: 1 week

14 years agoMove sed(1) from cross-tools to bootstrap-tools.
Ruslan Ermilov [Wed, 21 Oct 2009 19:39:34 +0000 (19:39 +0000)]
Move sed(1) from cross-tools to bootstrap-tools.

14 years agoDon't call the newstate callback as that's dangerous. Rely no ENETRESET
Rui Paulo [Wed, 21 Oct 2009 19:31:23 +0000 (19:31 +0000)]
Don't call the newstate callback as that's dangerous. Rely no ENETRESET
to DTRT.

MFC after: 3 days

14 years agoChange gcc to assume a default machine architecture of 486 instead of 386
John Baldwin [Wed, 21 Oct 2009 19:26:12 +0000 (19:26 +0000)]
Change gcc to assume a default machine architecture of 486 instead of 386
on "i386".  Doing it in the compiler is deemed to be less fragile then
attempting to provide a default -march setting via bsd.cpu.mk.  FreeBSD
itself has not supported plain 386 CPUs since 5.x.

Suggested by: kan
Requested by: rdivacky
MFC after: 1 month

14 years agoHandle the case where there is only one PMC in the system.
Fabien Thomas [Wed, 21 Oct 2009 18:46:36 +0000 (18:46 +0000)]
Handle the case where there is only one PMC in the system.

Approved by: jkoshy (mentor)
MFC after: 3 days

14 years agoReview previous change. It has no relation to the I-cache coherency
Marcel Moolenaar [Wed, 21 Oct 2009 18:44:00 +0000 (18:44 +0000)]
Review previous change. It has no relation to the I-cache coherency
changes and thus unintentional.

Spotted by: rdivacky@

14 years agoo Introduce vm_sync_icache() for making the I-cache coherent with
Marcel Moolenaar [Wed, 21 Oct 2009 18:38:02 +0000 (18:38 +0000)]
o   Introduce vm_sync_icache() for making the I-cache coherent with
    the memory or D-cache, depending on the semantics of the platform.
    vm_sync_icache() is basically a wrapper around pmap_sync_icache(),
    that translates the vm_map_t argumument to pmap_t.
o   Introduce pmap_sync_icache() to all PMAP implementation. For powerpc
    it replaces the pmap_page_executable() function, added to solve
    the I-cache problem in uiomove_fromphys().
o   In proc_rwmem() call vm_sync_icache() when writing to a page that
    has execute permissions. This assures that when breakpoints are
    written, the I-cache will be coherent and the process will actually
    hit the breakpoint.
o   This also fixes the Book-E PMAP implementation that was missing
    necessary locking while trying to deal with the I-cache coherency
    in pmap_enter() (read: mmu_booke_enter_locked).

The key property of this change is that the I-cache is made coherent
*after* writes have been done. Doing it in the PMAP layer when adding
or changing a mapping means that the I-cache is made coherent *before*
any writes happen. The difference is key when the I-cache prefetches.

14 years agoMake input parsing in Farhenheit actually work.
Ed Schouten [Wed, 21 Oct 2009 18:31:54 +0000 (18:31 +0000)]
Make input parsing in Farhenheit actually work.

Don't clobber *p with '\0' when testing whether it has the value of 'F'.
Just use the semantics of strtof() properly. If it returns p, we know
that it parsed the string until it reached 'C' or 'F'.

The code has not changed since it has been imported (r161951, Sep 3,
2006).

Submitted by: Alexandre Perrin <kaworu@kaworu.ch>
MFC after: 1 week

14 years agoPR: 139751
Fabien Thomas [Wed, 21 Oct 2009 18:29:26 +0000 (18:29 +0000)]
PR: 139751
Approved by: des
Obtained from: Xavier Heiny <xavier.heiny@netasq.com>
MFC after: 3 weeks

14 years agoo Align function on a 32-byte boundary so that the core's front-end
Marcel Moolenaar [Wed, 21 Oct 2009 18:09:48 +0000 (18:09 +0000)]
o   Align function on a 32-byte boundary so that the core's front-end
    can deliver 2 bundles per cycle to the back-end.
o   Mark syscall stubs with a special unwind ABI tag so that unwind
    libraries know how to unwind.

14 years agoSet CSTD in all cases except when CC=icc and NO_WARNS is set. This
Roman Divacky [Wed, 21 Oct 2009 17:07:46 +0000 (17:07 +0000)]
Set CSTD in all cases except when CC=icc and NO_WARNS is set. This
way we can set desired C standard even for cross tools etc.

Tested by: make universe
Approved by: ed (maintainer)
OK by: das

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 15:57:16 +0000 (15:57 +0000)]
MFp4:
Do not search for bus when it is not needed,

14 years agoCheck pointer for NULL before dereferencing it, not after.
Christian Brueffer [Wed, 21 Oct 2009 15:54:45 +0000 (15:54 +0000)]
Check pointer for NULL before dereferencing it, not after.

PR: 138383
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
Reviewed by: rnoland
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 15:27:48 +0000 (15:27 +0000)]
MFp4:
Separate CAM_DEV_IDENTIFY_DATA_VALID flag from CAM_DEV_INQUIRY_DATA_VALID.
Add workaround for very old devices without support for mode setting.
Add some PATA bus scanning support.
Remove some SCSIsms.

14 years agoCheck pointer for NULL before dereferencing it, not after.
Christian Brueffer [Wed, 21 Oct 2009 15:04:50 +0000 (15:04 +0000)]
Check pointer for NULL before dereferencing it, not after.

PR: 138384
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 14:20:55 +0000 (14:20 +0000)]
MFp4:
Add support for PIO-only devices.
Fix maxio values and 256 sectors transactions for 28bits commands.
Implement periodic ordered commands insertion, sames as da driver does.
Remove some SCSIsms.

14 years agoAdd a missing free() call.
Christian Brueffer [Wed, 21 Oct 2009 14:09:06 +0000 (14:09 +0000)]
Add a missing free() call.

PR: 138379
Submitted by: Patroklos Argyroudis <argp@census-labs.com>
Reviewed by: gibbs
MFC after: 1 week

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 13:00:01 +0000 (13:00 +0000)]
MFp4:
Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
It is XPT business.

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 12:47:39 +0000 (12:47 +0000)]
MFp4:
Freeze device queue on error to permit periph driver to do proper recovery.

14 years ago- Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header
Stanislav Sedov [Wed, 21 Oct 2009 12:47:09 +0000 (12:47 +0000)]
- Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header
  splitting in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not
  propagated into if_bce.c anyway.  It is disabled by default.

Approved by: davidch
MFC after: 3 days

14 years agoMFp4:
Alexander Motin [Wed, 21 Oct 2009 12:42:25 +0000 (12:42 +0000)]
MFp4:
On error, freeze device queue, to allow periph driver to do proper recovery.
Freeze SIM queue only in some cases, when it is needed to protect SIM.

Implement better command timeout detection logic for non-queued commands.
This fixes false positives when command with short timeout waiting for the
long one. For example, when hald tastes CD during burning process.

Read and clear SERR register on interrupt.

14 years ago- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
Stanislav Sedov [Wed, 21 Oct 2009 11:50:18 +0000 (11:50 +0000)]
- On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
  instead of POSTREAD: the hardware do not touch this memory (CPU
  updates it).  It is already synchronized as PREWRITE after the
  processing is done.

- Synchronize RX return ring memory in rx_eof.  This is needed
  as the deviced updates this memory when receives packets.

- Decouple the synchronization of BGE status block in the interrupt
  service routine: perfrom PREREAD synchronization only all accesses
  to this block are finished.  This seems to be more natural.

Reviewed by: yongari, marius
MFC after: 2 weeks

14 years agoIntroduce 'netDev=ANY' support for scripted (install.cfg) installs, which results...
Rink Springer [Wed, 21 Oct 2009 11:10:34 +0000 (11:10 +0000)]
Introduce 'netDev=ANY' support for scripted (install.cfg) installs, which results in the first ethernet interface with physical link being selected.

While here, fix a minor typo causing an 'if' to be missed.

Submitted by: randi

14 years agoThe tunefs utility does not work on active filesystems.
Remko Lodder [Wed, 21 Oct 2009 10:15:26 +0000 (10:15 +0000)]
The tunefs utility does not work on active filesystems.

PR: docs/139705
Submitted by: Warren Block <wblock at wonkity dot com>
Approved by: imp (mentor, implicit)

14 years agoAdd empty watchdogd_flags.
Christian Brueffer [Wed, 21 Oct 2009 09:43:22 +0000 (09:43 +0000)]
Add empty watchdogd_flags.

PR: 136620
Submitted by: amdmi3
MFC after: 3 days

14 years agoImprove the description of the malofw kernel module installation.
Christian Brueffer [Wed, 21 Oct 2009 09:22:40 +0000 (09:22 +0000)]
Improve the description of the malofw kernel module installation.

PR: 132193
Submitted by: Frank Staals <frank@fstaals.net>
Based on a patch by: gavin
MFC after: 3 days

14 years agoChange from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device
Andrew Thompson [Tue, 20 Oct 2009 21:29:46 +0000 (21:29 +0000)]
Change from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device
has been yanked, this works around a cam recounting bug when
CAM_DEV_UNCONFIGURED is set late in the detach. In certain conditions the
reference to the XPT device would not be released which would cause the usb
explore thread to sleep forever on "simfree", preventing any new usb devices to
be found/ejected on the bus.

This is intended to be a quick workaround to the problem without touching CAM
so it can be merged to 8.0.

Suggested by: mav
MFC after: 3 days

14 years agoThe flow-table function flowtable_route_flush() may be called
Qing Li [Tue, 20 Oct 2009 21:27:03 +0000 (21:27 +0000)]
The flow-table function flowtable_route_flush() may be called
during system initialization time. Since the flow-table is
designed to maintain per CPU flow cache, the existing code
did not check whether "smp_started" is true before calling
sched_bind() and sched_unbind(), which triggers a page fault.

Reviewed by: jeff
MFC after: immediately

14 years agoFix a case where rename actually succeeds, which is also expected behaviour
Pawel Jakub Dawidek [Tue, 20 Oct 2009 21:08:32 +0000 (21:08 +0000)]
Fix a case where rename actually succeeds, which is also expected behaviour
according to POSIX. This fixes ZFS on Solaris testing.

Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>

14 years agoMake mxge do a better job recovering from NIC h/w faults
Andrew Gallatin [Tue, 20 Oct 2009 18:58:28 +0000 (18:58 +0000)]
Make mxge do a better job recovering from NIC h/w faults
by checking PCI config space when the NIC is not
transmitting.  Previously, a h/w fault would not have been
detected if the NIC was down, or handling an RX only
workload.

14 years agoIn the ARP callout timer expiration function, the current time_second
Qing Li [Tue, 20 Oct 2009 17:55:42 +0000 (17:55 +0000)]
In the ARP callout timer expiration function, the current time_second
is compared against the entry expiration time value (that was set based
on time_second) to check if the current time is larger than the set
expiration time. Due to the +/- timer granularity value, the comparison
returns false, causing the alternative code to be executed. The
alternative code path freed the memory without removing that entry
from the table list, causing a use-after-free bug.

Reviewed by: discussed with kmacy
MFC after: immediately
Verified by: rnoland, yongari

14 years agoRandom number generator initialization cleanup:
Ruslan Ermilov [Tue, 20 Oct 2009 16:36:51 +0000 (16:36 +0000)]
Random number generator initialization cleanup:

- Introduce new SI_SUB_RANDOM point in boot sequence to make it
clear from where one may start using random(9).  It should be as
early as possible, so place it just after SI_SUB_CPU where we
have some randomness on most platforms via get_cyclecount().

- Move stack protector initialization to be after SI_SUB_RANDOM
as before this point we have no randomness at all.  This fixes
stack protector to actually protect stack with some random guard
value instead of a well-known one.

Note that this patch doesn't try to address arc4random(9) issues.
With current code, it will be implicitly seeded by stack protector
and hence will get the same entropy as random(9).  It will be
securely reseeded once /dev/random is feeded by some entropy from
userland.

Submitted by: Maxim Dounin <mdounin@mdounin.ru>
MFC after: 3 days

14 years agoUnloading of the nfscl module is unsupported because newnfslock doesn't
Jaakko Heinonen [Tue, 20 Oct 2009 15:06:18 +0000 (15:06 +0000)]
Unloading of the nfscl module is unsupported because newnfslock doesn't
support unloading. It's not trivial to implement newnfslock unloading so
for now just admit that unloading is unsupported and refuse to attempt
unload in all nfscl module event handlers.

Reviewed by: rmacklem
Approved by: trasz (mentor)

14 years agoFix ordering of nfscl_modevent() and ncl_uninit(). nfscl_modevent() must
Jaakko Heinonen [Tue, 20 Oct 2009 15:01:46 +0000 (15:01 +0000)]
Fix ordering of nfscl_modevent() and ncl_uninit(). nfscl_modevent() must
be called after ncl_uninit() when unloading the nfscl module because
ncl_uninit() uses ncl_iod_mutex which is destroyed in nfscl_modevent().

Reviewed by: rmacklem
Approved by: trasz (mentor)

14 years agoFix comment typos.
Jaakko Heinonen [Tue, 20 Oct 2009 14:57:26 +0000 (14:57 +0000)]
Fix comment typos.

Reviewed by: rmacklem
Approved by: trasz (mentor)

14 years agoichwd.4: fix r198272, restore watchdogd(8) reference
Andriy Gapon [Tue, 20 Oct 2009 14:06:07 +0000 (14:06 +0000)]
ichwd.4: fix r198272, restore watchdogd(8) reference

In r198272 I didn't notice that watchdog(8) and watchdogd(8)
are different things and instead of fixing watchdogd markup
I simply nuked the line.

Noticed by: emaste
Pointy hat to: avg

14 years agoUpdate package list for 8.0-REL.
Ken Smith [Tue, 20 Oct 2009 13:58:30 +0000 (13:58 +0000)]
Update package list for 8.0-REL.

Reviewed by: re@, portmgr@
MFC after: 1 day

14 years agominor: fix sorting of some amd* entries in some makefiles
Andriy Gapon [Tue, 20 Oct 2009 13:22:54 +0000 (13:22 +0000)]
minor: fix sorting of some amd* entries in some makefiles

MFC after: 1 week

14 years agoAllow KMOD with hypens and dots.
Max Khon [Tue, 20 Oct 2009 11:54:06 +0000 (11:54 +0000)]
Allow KMOD with hypens and dots.

MFC after: 1 week

14 years agoichwd.4: remove a stray line
Andriy Gapon [Tue, 20 Oct 2009 09:32:22 +0000 (09:32 +0000)]
ichwd.4: remove a stray line

Nod from: des
MFC after: 3 days

14 years agoadd amdtemp to i386 NOTES
Andriy Gapon [Tue, 20 Oct 2009 09:31:57 +0000 (09:31 +0000)]
add amdtemp to i386 NOTES

essentially this is a MFamd64

Nod from: rpaulo

14 years agoMFV of tzdata2009o:
Edwin Groothuis [Tue, 20 Oct 2009 07:03:06 +0000 (07:03 +0000)]
MFV of tzdata2009o:

- Somoa has not moved to DST this year (comment only)
- Bangladesh stays on DST for now.
- Pakistan went back to standard time in 1 October 2009

MFC after: 1 week

14 years agoVendor import of tzdata2009o:
Edwin Groothuis [Tue, 20 Oct 2009 07:00:00 +0000 (07:00 +0000)]
Vendor import of tzdata2009o:

- Somoa has not moved to DST this year (comment only)
- Bangladesh stays on DST for now.
- Pakistan went back to standard time in 1 October 2009

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years agoInstead of having to know which timezone was picked last time, you
Edwin Groothuis [Tue, 20 Oct 2009 06:54:31 +0000 (06:54 +0000)]
Instead of having to know which timezone was picked last time, you
now can run "tzsetup -r" which will reinstall the last choice. This
data is recorded in /var/db/zoneinfo.

MFC after:  1 week

14 years agoUse callout_init_mtx on FreeBSD versions recent enough. This closes
Alexander Kabaev [Tue, 20 Oct 2009 02:35:12 +0000 (02:35 +0000)]
Use callout_init_mtx on FreeBSD versions recent enough. This closes
the race where interrupt thread can complete the request for which
timeout has fired and while mpt_timeout has blocked on mpt_lock.

Do a best effort to keep 4.x ang Giant-locked configurartions
compiling still.

Reported by: ups
Reviewed by: scottl

14 years agoFix a bug in composing PERR frames introduced by latest draft update.
Rui Paulo [Mon, 19 Oct 2009 23:11:43 +0000 (23:11 +0000)]
Fix a bug in composing PERR frames introduced by latest draft update.

MFC after: 3 days

14 years agoRemove a redundant option ROM check, which was never meant to be committed.
Jung-uk Kim [Mon, 19 Oct 2009 23:09:39 +0000 (23:09 +0000)]
Remove a redundant option ROM check, which was never meant to be committed.

14 years agoAdd opt_gdb.h which is now needed by ucom.
Andrew Thompson [Mon, 19 Oct 2009 21:54:41 +0000 (21:54 +0000)]
Add opt_gdb.h which is now needed by ucom.

14 years agoAdd support for newer WinChipHead CH341 chips, previously in the uch341 driver.
Andrew Thompson [Mon, 19 Oct 2009 21:52:02 +0000 (21:52 +0000)]
Add support for newer WinChipHead CH341 chips, previously in the uch341 driver.

Submitted by: HPS

14 years agoRemove the newly added uch341 driver, it will be merged into uchcom instead.
Andrew Thompson [Mon, 19 Oct 2009 21:43:59 +0000 (21:43 +0000)]
Remove the newly added uch341 driver, it will be merged into uchcom instead.

Suggested by: takawata
Submitted by: HPS

14 years agoMake the usage of the default zoneinfo file to install clearer.
Edwin Groothuis [Mon, 19 Oct 2009 21:37:31 +0000 (21:37 +0000)]
Make the usage of the default zoneinfo file to install clearer.

MFC after:  1 week

14 years agoWhen tzsetup is run as non-root and the "CMOS clock question on
Edwin Groothuis [Mon, 19 Oct 2009 21:24:19 +0000 (21:24 +0000)]
When tzsetup is run as non-root and the "CMOS clock question on
UTC" is answered as No, it would abort without properly ending the
dialog session.

MFC after:  1 week

14 years agoFix a copy-and-pasto in the previous commit.
Jung-uk Kim [Mon, 19 Oct 2009 21:01:42 +0000 (21:01 +0000)]
Fix a copy-and-pasto in the previous commit.

14 years agoRewrite x86bios and update its dependent drivers.
Jung-uk Kim [Mon, 19 Oct 2009 20:58:10 +0000 (20:58 +0000)]
Rewrite x86bios and update its dependent drivers.

- Do not map entire real mode memory (1MB).  Instead, we map IVT/BDA and
ROM area separately.  Most notably, ROM area is mapped as device memory
(uncacheable) as it should be.  User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9).  Remove now redundant and
potentially dangerous x86bios_alloc.c.  If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c.  Currently, non-PC hardware is not
supported.  We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs().  This function also initializes DS and SS properly.
- Add x86bios_get_intr().  This function checks if the interrupt vector is
available for the platform.  It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them.  They may or may not be accessible always.  Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4).  This function calls VGA
BIOS POST code from the current VGA option ROM.  Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported.  Usually the symptom is blank display after resuming from suspend
state.  If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state.  Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS.  This is very useful for multi-display
adapter setup.  By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number.  You may override it from loader but it is very unlikely
to be necessary.  Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function.  The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0.  If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).

14 years agoMove mxge(4)'s NIC watchdog reset handler from
Andrew Gallatin [Mon, 19 Oct 2009 20:51:27 +0000 (20:51 +0000)]
Move mxge(4)'s NIC watchdog reset handler from
a callout to a taskqueue

14 years agoImplement the missing support for updating the mesh conf number of
Rui Paulo [Mon, 19 Oct 2009 18:46:22 +0000 (18:46 +0000)]
Implement the missing support for updating the mesh conf number of
neighbors via ieee80211_beacon_notify().

MFC after: 3 days

14 years agoMerge ACPICA 20091013.
Jung-uk Kim [Mon, 19 Oct 2009 16:12:58 +0000 (16:12 +0000)]
Merge ACPICA 20091013.

14 years agoSwitch the default WARNS level for sbin/ to 6.
Ruslan Ermilov [Mon, 19 Oct 2009 16:00:24 +0000 (16:00 +0000)]
Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein

14 years agoClean up markup (mainly).
Ruslan Ermilov [Mon, 19 Oct 2009 15:50:59 +0000 (15:50 +0000)]
Clean up markup (mainly).

14 years agoClean up comments, white space, and style in pfil.c (especially new VNET
Robert Watson [Mon, 19 Oct 2009 15:19:14 +0000 (15:19 +0000)]
Clean up comments, white space, and style in pfil.c (especially new VNET
bits).

MFC after: 3 days (not VNET bits)

14 years agoPowercrypt and NetSec seem to be defunct (webpages point to link farms
Christian Brueffer [Mon, 19 Oct 2009 14:36:12 +0000 (14:36 +0000)]
Powercrypt and NetSec seem to be defunct (webpages point to link farms
and a google search yields no alternative).  Remove the links but
keep the entries around for reference.

PR: 139756
Submitted by: Patrick Oonk <patrick@pine.nl>
MFC after: 3 days