]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix an incorrect parameter usage here.
adrian [Thu, 22 Mar 2012 21:22:58 +0000 (21:22 +0000)]
Fix an incorrect parameter usage here.

Submitted by: monthadar@gmail.com

12 years agoImprove FDT handling in loader(8) and make it more robust.
raj [Thu, 22 Mar 2012 20:34:26 +0000 (20:34 +0000)]
Improve FDT handling in loader(8) and make it more robust.

o Fix buffer overflows when using a long property body in node paths.
o Fix loop end condition when iterating through the symbol table.
o Better error handling during node modification, better problem reporting.
o Eliminate build time warnings.

Submitted by: Lukasz Wojcik
Obtained from: Semihalf
MFC after: 1 week

12 years agoCorrect a function prototype.
jkoshy [Thu, 22 Mar 2012 19:04:22 +0000 (19:04 +0000)]
Correct a function prototype.

Submitted by: "Anders Magnusson" <ragge at ludd.ltu.se>, via joel

12 years agoMake reusable part of code have mips prefix, not mips24
gonzo [Thu, 22 Mar 2012 18:07:44 +0000 (18:07 +0000)]
Make reusable part of code have mips prefix, not mips24

12 years agoRework MIPS PMC code:
gonzo [Thu, 22 Mar 2012 18:01:23 +0000 (18:01 +0000)]
Rework MIPS PMC code:

- Replace MIPS24K-specific code with more generic framework that will
    make adding new CPU support easier
- Add MIPS24K support for new framework
- Limit backtrace depth to 1 for stability reasons and add option
    HWPMC_MIPS_BACKTRACE to override this limitation

12 years agoMove PMC hook invocation to cpu_intr. The idea is the same as with ast()
gonzo [Thu, 22 Mar 2012 17:47:52 +0000 (17:47 +0000)]
Move PMC hook invocation to cpu_intr. The idea is the same as with ast()
call but there is no reason to implement it in assembler.

12 years agoFix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
gonzo [Thu, 22 Mar 2012 17:44:36 +0000 (17:44 +0000)]
Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
mandatory for ELF binaries so we'll use the segment with offset less then
alignment and align it appropriately (which covers pt_offset == 0 case)

12 years agoFix PMC syscall on 64-bit big endian systems.
gonzo [Thu, 22 Mar 2012 17:36:53 +0000 (17:36 +0000)]
Fix PMC syscall on 64-bit big endian systems.

Sycall argument is pointer to array of register_t values. Casting it to
pointer to structure with fields of size smaller then register_t we rely
on compiler-dependent memory layout of structure.

Tested on: mips64 and amd64 systems

12 years agoAdd ACPI_LV_REPAIR debug level, available since ACPICA 20091214 (r200553).
jkim [Thu, 22 Mar 2012 17:01:25 +0000 (17:01 +0000)]
Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214 (r200553).

MFC after: 3 days

12 years agoUpdate snd_cmi, snd_csa and snd_emu10kx status.
joel [Thu, 22 Mar 2012 16:24:50 +0000 (16:24 +0000)]
Update snd_cmi, snd_csa and snd_emu10kx status.

12 years agoSmall cleanup of the code. No functional change (in FreeBSD kernel).
tuexen [Thu, 22 Mar 2012 16:22:16 +0000 (16:22 +0000)]
Small cleanup of the code. No functional change (in FreeBSD kernel).

MFC after: 1 week.

12 years agoAdd snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64.
joel [Thu, 22 Mar 2012 16:19:04 +0000 (16:19 +0000)]
Add snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64.

The GPL infected parts which were blocking the inclusion of snd_csa
and snd_emu10kx in GENERIC have recently been removed from the tree.
I'm also adding snd_cmi to GENERIC, which I originally intended to
add when we enabled sound support by default.

Discussed with: jhb, pfg, Yuriy Tsibizov <yuriy.tsibizov@gfk.ru>
Approved by: jhb

12 years agoFix return type of mips pmap_kextract()
jchandra [Thu, 22 Mar 2012 15:14:10 +0000 (15:14 +0000)]
Fix return type of mips pmap_kextract()

The return type should be vm_paddr_t, not vm_offset_t.

12 years agoUse xmalloc() instead of malloc() in the places where malloc() calls
kib [Thu, 22 Mar 2012 14:20:51 +0000 (14:20 +0000)]
Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail.

Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().

Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.

Reviewed by: kan
Discussed with: bde
MFC after: 2 weeks

12 years agoRemove the fragments which are not needed on FreeBSD. The caltech
kib [Thu, 22 Mar 2012 14:11:10 +0000 (14:11 +0000)]
Remove the fragments which are not needed on FreeBSD.  The caltech
malloc hardly would ever be updated.

Reviewed by:  bde, kan
MFC after:    2 weeks

12 years agoMark the 'lapics' and 'ioapics' arrays here static since they are
jhb [Thu, 22 Mar 2012 12:23:32 +0000 (12:23 +0000)]
Mark the 'lapics' and 'ioapics' arrays here static since they are
private to this file.  The 'lapics' array was actually shadowing a
completely different 'lapics' array that is private to local_apic.c.

Reported by: bde
MFC after: 2 weeks

12 years ago- Avoid use of deprecated KRB5 functions.
stas [Thu, 22 Mar 2012 11:18:14 +0000 (11:18 +0000)]
- Avoid use of deprecated KRB5 functions.

12 years agoFix style. Somehow I managed to lost a space when copy&paste.
pluknet [Thu, 22 Mar 2012 09:51:31 +0000 (09:51 +0000)]
Fix style. Somehow I managed to lost a space when copy&paste.

Pointed out by: stefanf

12 years agoGarbage collect defunct nlist(3) symbols.
pluknet [Thu, 22 Mar 2012 09:47:14 +0000 (09:47 +0000)]
Garbage collect defunct nlist(3) symbols.

MFC after: 1 week

12 years agoPrevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
pluknet [Thu, 22 Mar 2012 09:42:27 +0000 (09:42 +0000)]
Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
when passing damaged user-supplied fstab file data.

MFC after: 1 week

12 years agoCorrect debug message.
ae [Thu, 22 Mar 2012 09:29:07 +0000 (09:29 +0000)]
Correct debug message.

12 years ago- Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
stas [Thu, 22 Mar 2012 08:48:42 +0000 (08:48 +0000)]
- Update FreeBSD Heimdal distribution to version 1.5.1.  This also brings
  several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.

12 years agoHandle spurious page faults that may occur in no-fault sections of the
alc [Thu, 22 Mar 2012 04:52:51 +0000 (04:52 +0000)]
Handle spurious page faults that may occur in no-fault sections of the
kernel.

When access restrictions are added to a page table entry, we flush the
corresponding virtual address mapping from the TLB.  In contrast, when
access restrictions are removed from a page table entry, we do not
flush the virtual address mapping from the TLB.  This is exactly as
recommended in AMD's documentation.  In effect, when access
restrictions are removed from a page table entry, AMD's MMUs will
transparently refresh a stale TLB entry.  In short, this saves us from
having to perform potentially costly TLB flushes.  In contrast,
Intel's MMUs are allowed to generate a spurious page fault based upon
the stale TLB entry.  Usually, such spurious page faults are handled
by vm_fault() without incident.  However, when we are executing
no-fault sections of the kernel, we are not allowed to execute
vm_fault().  This change introduces special-case handling for spurious
page faults that occur in no-fault sections of the kernel.

In collaboration with: kib
Tested by: gibbs (an earlier version)

I would also like to acknowledge Hiroki Sato's assistance in
diagnosing this problem.

MFC after: 1 week

12 years agoChange pv_entry_count to a long. During the lifetime of FreeBSD 10.x,
alc [Thu, 22 Mar 2012 04:40:22 +0000 (04:40 +0000)]
Change pv_entry_count to a long.  During the lifetime of FreeBSD 10.x,
physical memory sizes at the high-end will likely reach a point that
the number of pv entries could overflow an int.

Submitted by: kib

12 years agoDeclare the CRC lookup-tables const as they hardly should change at
marius [Wed, 21 Mar 2012 20:55:21 +0000 (20:55 +0000)]
Declare the CRC lookup-tables const as they hardly should change at
run-time.

12 years agoUse the common/shared CRC-32 implementation instead of duplicating it.
marius [Wed, 21 Mar 2012 20:53:47 +0000 (20:53 +0000)]
Use the common/shared CRC-32 implementation instead of duplicating it.

MFC after: 1 week

12 years agoUpdate the firmware to version 0.236
bschmidt [Wed, 21 Mar 2012 19:09:52 +0000 (19:09 +0000)]
Update the firmware to version 0.236

Submitted by: PseudoCylon
MFC after: 2 weeks

12 years agoLoad the firmware during init not attach, as a root filesystem might
bschmidt [Wed, 21 Mar 2012 19:08:44 +0000 (19:08 +0000)]
Load the firmware during init not attach, as a root filesystem might
not yet be available. While here, also print the firmware version.

Submitted by: PseudoCylon
MFC after: 3 days

12 years ago- First pass at const'ifying ata(4) as appropriate.
marius [Wed, 21 Mar 2012 16:59:39 +0000 (16:59 +0000)]
- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers

MFC after: 1 week

12 years agoo) Don't keep drive parameters in a global, put them in the softc.
jmallett [Wed, 21 Mar 2012 10:27:12 +0000 (10:27 +0000)]
o) Don't keep drive parameters in a global, put them in the softc.
o) Don't report a bogus stripesize.
o) Eliminate a nearby gratuitous "proxy" indirection.

12 years agoAcquire modules lock before call module_getname() in the KLD_DEBUG case.
ae [Wed, 21 Mar 2012 09:48:32 +0000 (09:48 +0000)]
Acquire modules lock before call module_getname() in the KLD_DEBUG case.

MFC after: 1 week

12 years agoRemove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
marius [Wed, 21 Mar 2012 08:57:15 +0000 (08:57 +0000)]
Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
along with functions, SYSCTLs and tunables that are not used with
ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
code for the other way around. This makes it easier to understand
which parts of ata(4) actually are used in the new world order and
to later on remove the !ATA_CAM bits. It also makes it obvious that
there is something fishy with the C-bus front-end as well as in the
ATP850 support, as these used ATA_LOCKING which is defunct in the
ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
be brought back in some form or other.

Reviewed by: mav
MFC after: 1 week

12 years agoExclude devices which are mutually exclusive with ATA_CAM. For better
marius [Wed, 21 Mar 2012 08:50:47 +0000 (08:50 +0000)]
Exclude devices which are mutually exclusive with ATA_CAM. For better
or worse, the former are still built as modules as part of the LINT
builds

Reviewed by: mav
MFC after: 1 week

12 years agoin6_pcblookup_local() still can return a pcb with NULL
glebius [Wed, 21 Mar 2012 08:43:38 +0000 (08:43 +0000)]
in6_pcblookup_local() still can return a pcb with NULL
inp_socket. To avoid panic, do not dereference inp_socket,
but obtain reuse port option from inp_flags2, like this
is done after next call to in_pcblookup_local() a few lines
down below.

Submitted by: rwatson

12 years agoRemove pty(4) from our kernel configurations.
ed [Wed, 21 Mar 2012 08:38:42 +0000 (08:38 +0000)]
Remove pty(4) from our kernel configurations.

As of FreeBSD 8, this driver should not be used. Applications that use
posix_openpt(2) and openpty(3) use the pts(4) that is built into the
kernel unconditionally. If it turns out high profile depend on the
pty(4) module anyway, I'd rather get those fixed. So please report any
issues to me.

The pty(4) module is still available as a kernel module of course, so a
simple `kldload pty' can be used to run old-style pseudo-terminals.

12 years agoAdd multibyte char support.
glebius [Wed, 21 Mar 2012 08:03:07 +0000 (08:03 +0000)]
Add multibyte char support.

PR: 165429
Submitted by: amdmi3

12 years agoRevert previous change. It is an incomplete change from old branch. :-(
davidxu [Wed, 21 Mar 2012 07:16:58 +0000 (07:16 +0000)]
Revert previous change. It is an incomplete change from old branch. :-(

12 years agoUse version 2 of semaphore provided by kernel umtx code, now if there is
davidxu [Wed, 21 Mar 2012 07:12:52 +0000 (07:12 +0000)]
Use version 2 of semaphore provided by kernel umtx code, now if there is
no waiters, we still increase and decrease count in user mode without
entering kernel, once there is a waiter, sem_post will enter kernel to
increase count and wake thread up, this is atomicy and allow us to
gracefully destroy semaphore after sem_wait returned.

12 years agoFix a sentence in a paragraph that describes time and interval based
glebius [Wed, 21 Mar 2012 07:02:17 +0000 (07:02 +0000)]
Fix a sentence in a paragraph that describes time and interval based
trimming. This sentence vaguely can be interpreted as if it was speaking
about time and size interaction, while it wasn't about it.

12 years agoDon't run through time checks when entry is definitely oversized. This
glebius [Wed, 21 Mar 2012 06:51:45 +0000 (06:51 +0000)]
Don't run through time checks when entry is definitely oversized. This
leads to newsyslog rotating on (size OR time) if both are specified.

PR: 100018, 160432

12 years agoEliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
alc [Wed, 21 Mar 2012 04:00:58 +0000 (04:00 +0000)]
Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
longer serve any purpose.  Prior to r157446, they served a purpose
because there was a fixed amount of kernel virtual address space
reserved for pv entries at boot time.  However, since that change pv
entries are accessed through the direct map, and so there is no limit
imposed by a fixed amount of kernel virtual address space.

Fix a couple of nearby style issues.

Reviewed by: jhb, kib
MFC after: 1 week

12 years agoRe-commit this - store the alq payload in network order.
adrian [Wed, 21 Mar 2012 03:19:50 +0000 (03:19 +0000)]
Re-commit this - store the alq payload in network order.

12 years agoMerge ACPICA 20120320.
jkim [Tue, 20 Mar 2012 21:37:52 +0000 (21:37 +0000)]
Merge ACPICA 20120320.

12 years agoFix another witness panic. We cannot enter critical section at all because
jkim [Tue, 20 Mar 2012 20:37:23 +0000 (20:37 +0000)]
Fix another witness panic.  We cannot enter critical section at all because
AcpiEnterSleepState() executes (optional) _GTS method since ACPICA 20120215
(r231844).  To evaluate the method, we need malloc(9), which may sleep.

Reported by: bschmidt
MFC after: 3 days

12 years agoImport ACPICA 20120320.
jkim [Tue, 20 Mar 2012 18:17:33 +0000 (18:17 +0000)]
Import ACPICA 20120320.

12 years agoAdd sys/ofed to the 'make cscope' target.
jhb [Tue, 20 Mar 2012 18:05:15 +0000 (18:05 +0000)]
Add sys/ofed to the 'make cscope' target.

MFC after: 1 week

12 years agoImport new version of libcxxrt. Now works correctly with libobjc2 to implement
theraven [Tue, 20 Mar 2012 17:58:15 +0000 (17:58 +0000)]
Import new version of libcxxrt.  Now works correctly with libobjc2 to implement
the unified exception model for Objective-C++.

Approved by: dim (mentor)

12 years agoUpdate the list of struct ifnet fields.
pluknet [Tue, 20 Mar 2012 16:56:35 +0000 (16:56 +0000)]
Update the list of struct ifnet fields.
- Document if_vnet, if_home_vnet, if_carp, if_vlantrunk, if_multiaddrs,
  if_amcount, if_addr, if_llsoftc stub, if_broadcastaddr, if_bridge,
  if_label, if_afdata, if_afdata_initialized, if_afdata_lock, if_linktask,
  if_addr_mtx (now if_addr_lock), if_clones, if_groups, if_pf_kif, if_lagg,
  if_alloctype
- G/c now defunct and/or commented out in the manual page if_ipending,
  if_poll_slowq, if_done, if_poll_recv, if_poll_xmit, if_poll_slowinput,
  if_poll_intren
- Update if_snd type changed with ALTQ integration.

MFC after: 1 week

12 years agoFix several problems with our ELF filters implementation.
kib [Tue, 20 Mar 2012 13:20:49 +0000 (13:20 +0000)]
Fix several problems with our ELF filters implementation.

Do not relocate twice an object which happens to be needed by loaded
binary (or dso) and some filtee opened due to symbol resolution when
relocating need objects.  Record the state of the relocation
processing in Obj_Entry and short-circuit relocate_objects() if
current object already processed.

Do not call constructors for filtees loaded during the early
relocation processing before image is initialized enough to run
user-provided code.  Filtees are loaded using dlopen_object(), which
normally performs relocation and initialization.  If filtee is
lazy-loaded during the relocation of dso needed by the main object,
dlopen_object() runs too earlier, when most runtime services are not
yet ready.

Postpone the constructors call to the time when main binary and
depended libraries constructors are run, passing the new flag
RTLD_LO_EARLY to dlopen_object().  Symbol lookups callers inform
symlook_* functions about early stage of initialization with
SYMLOOK_EARLY.  Pass flags through all functions participating in
object relocation.

Use the opportunity and fix flags argument to find_symdef() in
arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of
true, which happen to have the same numeric value.

Reported and tested by: theraven
Reviewed by: kan
MFC after: 2 weeks

12 years agoImprove device tree blob (DTB) handling in loader(8).
raj [Tue, 20 Mar 2012 13:08:57 +0000 (13:08 +0000)]
Improve device tree blob (DTB) handling in loader(8).

Enable using the statically embedded blob from the kernel, if present. The KLD
loaded DTB takes precedence, but they are both recognized and handled in the
same way.

Submitted by: Lukasz Wojcik
Obtained from: Semihalf
MFC after: 1 week

12 years agoo Xr siftr.4 in order to expose it to a wider audience.
maxim [Tue, 20 Mar 2012 12:24:36 +0000 (12:24 +0000)]
o Xr siftr.4 in order to expose it to a wider audience.

Reviewed by: lstewart

12 years agoDelay sequence number allocation for A-MPDU until just before the frame
adrian [Tue, 20 Mar 2012 04:50:25 +0000 (04:50 +0000)]
Delay sequence number allocation for A-MPDU until just before the frame
is queued to the hardware.

Because multiple concurrent paths can execute ath_start(), multiple
concurrent paths can push frames into the software/hardware TX queue
and since preemption/interrupting can occur, there's the possibility
that a gap in time will occur between allocating the sequence number
and queuing it to the hardware.

Because of this, it's possible that a thread will have allocated a
sequence number and then be preempted by another thread doing the same.
If the second thread sneaks the frame into the BAW, the (earlier) sequence
number of the first frame will be now outside the BAW and will result
in the frame being constantly re-added to the tail of the queue.
There it will live until the sequence numbers cycle around again.

This also creates a hole in the RX BAW tracking which can also cause
issues.

This patch delays the sequence number allocation to occur only just before
the frame is going to be added to the BAW.  I've been wanting to do this
anyway as part of a general code tidyup but I've not gotten around to it.
This fixes the PR.

However, it still makes it quite difficult to try and ensure in-order
queuing and dequeuing of frames. Since multiple copies of ath_start()
can be run at the same time (eg one TXing process thread, one TX completion
task/one RX task) the driver may end up having frames dequeued and pushed
into the hardware slightly/occasionally out of order.

And, to make matters more annoying, net80211 may have the same behaviour -
in the non-aggregation case, the TX code allocates sequence numbers
before it's thrown to the driver.  I'll open another PR to investigate
this and potentially introduce some kind of final-pass TX serialisation
before frames are thrown to the hardware.  It's also very likely worthwhile
adding some debugging code into ath(4) and net80211 to catch when/if this
does occur.

PR: kern/166190

12 years agoCopy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace
tijl [Mon, 19 Mar 2012 21:57:31 +0000 (21:57 +0000)]
Copy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace
amd64/i386/pc98 sysarch.h with stubs.

12 years agoFix a witness panic introduced in r231797.
jkim [Mon, 19 Mar 2012 21:47:50 +0000 (21:47 +0000)]
Fix a witness panic introduced in r231797.

Reported by: bschmidt
Reviewed by: jhb
Pointy hat to: jkim
MFC after: 3 days

12 years agoCopy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace
tijl [Mon, 19 Mar 2012 21:34:11 +0000 (21:34 +0000)]
Copy i386 specialreg.h to x86 and merge with amd64 specialreg.h. Replace
amd64/i386/pc98 specialreg.h with stubs.

12 years agoCopy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs.
tijl [Mon, 19 Mar 2012 21:29:57 +0000 (21:29 +0000)]
Copy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs.

12 years agoMove userland bits (and some common kernel bits) from amd64 and i386
tijl [Mon, 19 Mar 2012 21:24:50 +0000 (21:24 +0000)]
Move userland bits (and some common kernel bits) from amd64 and i386
segments.h to a new x86 segments.h.

Add __packed attribute to some structs (just to be sure).
Also make it clear that i386 GDT and LDT entries are used in ia64 code.

12 years agoRetire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD.
jhb [Mon, 19 Mar 2012 21:09:12 +0000 (21:09 +0000)]
Retire the IF_ADDR_LOCK() and IF_ADDR_UNLOCK() compat macros from HEAD.
The new [RW]LOCK macros are merged back to 8.x so should be suitable for
new code in HEAD even if it is to be MFC'd.

12 years agoFix build of OFED bits with debugging options enabled.
jhb [Mon, 19 Mar 2012 19:53:53 +0000 (19:53 +0000)]
Fix build of OFED bits with debugging options enabled.

12 years agoo Sort Xrs.
maxim [Mon, 19 Mar 2012 19:27:43 +0000 (19:27 +0000)]
o Sort Xrs.

12 years agoo Trim EoL whitespaces.
maxim [Mon, 19 Mar 2012 19:25:22 +0000 (19:25 +0000)]
o Trim EoL whitespaces.

12 years agoFix the following warning from clang trunk:
dim [Mon, 19 Mar 2012 19:17:55 +0000 (19:17 +0000)]
Fix the following warning from clang trunk:

usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
        snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset);
                                                                     ~~^            ~~~~~~~~~
                                                                     %llx

Silence this by casting dc->reset to intmax_t, and using the appropriate
length modifier.  While here, wrap the line to a 80 character margin.

MFC after: 3 days

12 years agoBah, just revert my earlier change entirely. (Missed alc's request to do
jhb [Mon, 19 Mar 2012 19:06:40 +0000 (19:06 +0000)]
Bah, just revert my earlier change entirely.  (Missed alc's request to do
this earlier.)

Requested by: alc

12 years agoAdd explicit braces to avoid dangling else in stl_tree.h. This silences
dim [Mon, 19 Mar 2012 19:01:34 +0000 (19:01 +0000)]
Add explicit braces to avoid dangling else in stl_tree.h.  This silences
the following warning produced by clang trunk:

  In file included from /usr/src/sbin/devd/devd.cc:91:
  In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
  /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
  else
  ^

MFC after: 3 days

12 years agoFix madvise(MADV_WILLNEED) to properly handle individual mappings larger
jhb [Mon, 19 Mar 2012 18:47:34 +0000 (18:47 +0000)]
Fix madvise(MADV_WILLNEED) to properly handle individual mappings larger
than 4GB.  Specifically, the inlined version of 'ptoa' of the the 'int'
count of pages overflowed on 64-bit platforms.  While here, change
vm_object_madvise() to accept two vm_pindex_t parameters (start and end)
rather than a (start, count) tuple to match other VM APIs as suggested
by alc@.

12 years agoAlter the previous commit to use vm_size_t instead of vm_pindex_t.
jhb [Mon, 19 Mar 2012 18:43:44 +0000 (18:43 +0000)]
Alter the previous commit to use vm_size_t instead of vm_pindex_t.
vm_pindex_t is not a count of pages per se, it is more like vm_ooffset_t,
but a page index instead of a byte offset.

12 years agoProvide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
andreast [Mon, 19 Mar 2012 18:03:20 +0000 (18:03 +0000)]
Provide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
info.

Tested by: Robert Hish
MFC after: 1 week

12 years agoDo not reuse the previous address when restoring linear frame buffer.
jkim [Mon, 19 Mar 2012 17:14:12 +0000 (17:14 +0000)]
Do not reuse the previous address when restoring linear frame buffer.

12 years agoAn intel RAID can have any arbitrary name.
jpaetzel [Mon, 19 Mar 2012 16:13:14 +0000 (16:13 +0000)]
An intel RAID can have any arbitrary name.

12 years agoRe-apply r233122 erronously reverted in r233168.
kib [Mon, 19 Mar 2012 15:50:14 +0000 (15:50 +0000)]
Re-apply r233122 erronously reverted in r233168.

Submitted by:  jhb
Pointy hat to:  kib
MFC after: 2 weeks

12 years agoRemove this - it's not needed as it's defined in ieee80211_freebsd.h.
adrian [Mon, 19 Mar 2012 13:54:15 +0000 (13:54 +0000)]
Remove this - it's not needed as it's defined in ieee80211_freebsd.h.

12 years agoAdd CTLFLAG_TUN to sysctls.
ae [Mon, 19 Mar 2012 13:21:10 +0000 (13:21 +0000)]
Add CTLFLAG_TUN to sysctls.

MFC after: 1 month

12 years agoDocument GEOM_PART_LDM scheme and partition types.
ae [Mon, 19 Mar 2012 13:17:47 +0000 (13:17 +0000)]
Document GEOM_PART_LDM scheme and partition types.

MFC after: 1 month

12 years agoConnect geom_part_ldm to the kernel build.
ae [Mon, 19 Mar 2012 13:16:46 +0000 (13:16 +0000)]
Connect geom_part_ldm to the kernel build.

MFC after: 1 month

12 years agoConnect geom_part_ldm module to the build.
ae [Mon, 19 Mar 2012 13:15:48 +0000 (13:15 +0000)]
Connect geom_part_ldm module to the build.

MFC after: 1 month

12 years agoAdd new GEOM_PART_LDM module that implements the Logical Disk Manager
ae [Mon, 19 Mar 2012 13:14:44 +0000 (13:14 +0000)]
Add new GEOM_PART_LDM module that implements the Logical Disk Manager
scheme. The LDM is a logical volume manager for MS Windows NT and it
is also known as dynamic volumes. It supports about 2000 partitions
and also provides the capability for software RAID implementations.

This version implements only partitioning scheme capability and based
on the linux-ntfs project documentation and several publications across
the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported.

An access to the LDM metadata is read-only. When LDM is on the disk
partitioned with MBR we can also destroy metadata. For the GPT
partitioned disks destroy action is not supported.

Reviewed by: ivoras (previous version)
MFC after: 1 month

12 years agoMake kern.geom.part node not static. Also add CTLFLAG_TUN to the
ae [Mon, 19 Mar 2012 12:57:52 +0000 (12:57 +0000)]
Make kern.geom.part node not static. Also add CTLFLAG_TUN to the
check_integrity sysctl.

MFC after: 1 month

12 years agoAdd symbol versioning to libcxxrt.
theraven [Mon, 19 Mar 2012 11:53:33 +0000 (11:53 +0000)]
Add symbol versioning to libcxxrt.

Approved by: dim (mentor)

12 years agoMake __get_locale() static inline, not just inline, so when compiling libc in
theraven [Mon, 19 Mar 2012 11:47:37 +0000 (11:47 +0000)]
Make __get_locale() static inline, not just inline, so when compiling libc in
debug mode (without optimisations) it doesn't generate a linker failure.

Approved by: dim (mentor)

12 years agoIf we ever allow for managed fictitious pages, the pages shall be
kib [Mon, 19 Mar 2012 09:34:22 +0000 (09:34 +0000)]
If we ever allow for managed fictitious pages, the pages shall be
excluded from superpage promotions.  At least one of the reason is
that pv_table is sized for non-fictitious pages only.

Consistently check for the page to be non-fictitious before accesing
superpage pv list.

Sponsored by: The FreeBSD Foundation
Reviewed by: alc
MFC after: 2 weeks

12 years agoRotate auth.log and messages at the beginning of a year. Otherwise,
glebius [Mon, 19 Mar 2012 09:30:40 +0000 (09:30 +0000)]
Rotate auth.log and messages at the beginning of a year. Otherwise,
daily security checks 800.loginfail and 900.tcpwrap may produce
false positive alerts.

12 years agoRemove trailing whitespace.
bjk [Mon, 19 Mar 2012 05:08:09 +0000 (05:08 +0000)]
Remove trailing whitespace.

Approved by: hrs (mentor)

12 years agoExpound a bit more about the system maximum number of FIBs,
bjk [Mon, 19 Mar 2012 04:46:11 +0000 (04:46 +0000)]
Expound a bit more about the system maximum number of FIBs,
how it may be set, and current limitations on the value.

Approved by: hrs (mentor)
PR: docs/157453
MFC after: 1 week

12 years agofix ABI detection logic: for 64-bit elf objects set default ABI to n64.
gonzo [Mon, 19 Mar 2012 03:27:08 +0000 (03:27 +0000)]
fix ABI detection logic: for 64-bit elf objects set default ABI to n64.

12 years agoDo not change current media when driver is already running. If
yongari [Mon, 19 Mar 2012 02:10:40 +0000 (02:10 +0000)]
Do not change current media when driver is already running.  If
driver is running driver would have already completed flow control
configuration.  This change removes unnecessary media changes in
controller reconfiguration cases such that it does not trigger link
reestablishment for configuration change requests like promiscuous
mode change.

Reported by: Many
Tested by: Mike Tancsa <mike <> sentex dot net>
MFC after: 1 week

12 years agodraft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007
eadler [Mon, 19 Mar 2012 00:47:01 +0000 (00:47 +0000)]
draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR: docs/163771
Submitted by: phk
Reviewed by: If someone else reviewed your modification.
Approved by: cperciva
MFC after: 1 week

12 years agorm[0].rm_so must be zero (an explicit check is made for zero in the
eadler [Mon, 19 Mar 2012 00:45:01 +0000 (00:45 +0000)]
rm[0].rm_so must be zero (an explicit check is made for zero in the
outer if condition)

Reviewed by: se
Approved by: cperciva

12 years agoX11BASE is not used any more and has been killed by the x11 team.
eadler [Mon, 19 Mar 2012 00:41:40 +0000 (00:41 +0000)]
X11BASE is not used any more and has been killed by the x11 team.

Reviewed by: ???
Approved by: ???
MFC after: 3 days

12 years ago- Clean up timestamps in msgbuf code. The timestamps should now be
eadler [Mon, 19 Mar 2012 00:36:32 +0000 (00:36 +0000)]
- Clean up timestamps in msgbuf code.  The timestamps should now be
    inserted after the priority token thus cleaning up the output.
- Remove the needless double internal do_add_char function.
- Resolve a possible deadlock if interrupts are
    disabled and getnanotime is called

Reviewed by: bde  kmacy, avg, sbruno (various versions)
Approved by: cperciva
MFC after: 2 weeks

12 years agoUse clockid parameter instead of hard-coded CLOCK_REALTIME.
davidxu [Mon, 19 Mar 2012 00:07:10 +0000 (00:07 +0000)]
Use clockid parameter instead of hard-coded CLOCK_REALTIME.

Reported by: pjd

12 years ago.. revert out a local change that I hadn't yet completely finished fleshing
adrian [Sun, 18 Mar 2012 21:54:59 +0000 (21:54 +0000)]
.. revert out a local change that I hadn't yet completely finished fleshing
out and testing.

sorry!

12 years agofts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on the returned
jilles [Sun, 18 Mar 2012 21:46:27 +0000 (21:46 +0000)]
fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on the returned
pathnames.

With the current API (no *at functions), FTS_NOCHDIR requires that the
fts_accpath start with the original path passed to fts_open(); therefore,
the depth that can be reached is limited by the {PATH_MAX} constraint on
this pathname.

MFC after: 1 week

12 years agoRedirect camcontrol stderr to /dev/null.
jpaetzel [Sun, 18 Mar 2012 21:19:21 +0000 (21:19 +0000)]
Redirect camcontrol stderr to /dev/null.

12 years agofts(3): Document cases where FTS_NOCHDIR is set implicitly.
jilles [Sun, 18 Mar 2012 20:34:01 +0000 (20:34 +0000)]
fts(3): Document cases where FTS_NOCHDIR is set implicitly.

PR: docs/166091
Submitted by: Matthew Story
MFC after: 1 week

12 years agoAdd a missing endian conversion.
adrian [Sun, 18 Mar 2012 19:35:30 +0000 (19:35 +0000)]
Add a missing endian conversion.

12 years agomemset() wants the size of the structure to clear, not the size
harti [Sun, 18 Mar 2012 19:28:52 +0000 (19:28 +0000)]
memset() wants the size of the structure to clear, not the size
of the pointer to it.

Submitted by: Pawel Worach

12 years agoRemove some unnecessary includes.
tijl [Sun, 18 Mar 2012 19:15:11 +0000 (19:15 +0000)]
Remove some unnecessary includes.

12 years agoCast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.
jh [Sun, 18 Mar 2012 19:13:32 +0000 (19:13 +0000)]
Cast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.

PR: kern/161552
Reviewed by: trasz
Tested by: Nikos Vassiliadis
MFC after: 1 week

12 years agoEliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h.
tijl [Sun, 18 Mar 2012 19:12:11 +0000 (19:12 +0000)]
Eliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h.

Reviewed by: kib

12 years agoCopy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98
tijl [Sun, 18 Mar 2012 19:06:38 +0000 (19:06 +0000)]
Copy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98
reg.h with stubs.

The tREGISTER macros are only made visible on i386. These macros are
deprecated and should not be available on amd64.

The i386 and amd64 versions of struct reg have been renamed to struct
__reg32 and struct __reg64. During compilation either __reg32 or __reg64
is defined as reg depending on the machine architecture. On amd64 the i386
struct is also available as struct reg32 which is used in COMPAT_FREEBSD32
code.

Most of compat/ia32/ia32_reg.h is now IA64 only.

Reviewed by: kib (previous version)