]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoEscape Ed to prevent mandoc to avoid confusion with the mdoc's Ed macros
bapt [Fri, 26 Dec 2014 21:11:33 +0000 (21:11 +0000)]
Escape Ed to prevent mandoc to avoid confusion with the mdoc's Ed macros

9 years agomdoc fixes (escape the dot to prevent ... to be considered as a macro)
bapt [Fri, 26 Dec 2014 21:03:56 +0000 (21:03 +0000)]
mdoc fixes (escape the dot to prevent ... to be considered as a macro)

9 years agomdoc fixes
bapt [Fri, 26 Dec 2014 20:57:10 +0000 (20:57 +0000)]
mdoc fixes

9 years agomdoc fixes
bapt [Fri, 26 Dec 2014 20:50:40 +0000 (20:50 +0000)]
mdoc fixes

9 years agomdoc fixes
bapt [Fri, 26 Dec 2014 20:49:23 +0000 (20:49 +0000)]
mdoc fixes

9 years agoDOF tables are aligned according to the DOF section's alignment constraint,
markj [Fri, 26 Dec 2014 18:53:29 +0000 (18:53 +0000)]
DOF tables are aligned according to the DOF section's alignment constraint,
so take this into account when iterating over DOF tables.

PR: 195555
Submitted by: Fedor Indutny <fedor@indutny.com> (original version)
MFC after: 1 week

9 years agoFix the musb initialization sequence on AM335x.
loos [Fri, 26 Dec 2014 17:45:49 +0000 (17:45 +0000)]
Fix the musb initialization sequence on AM335x.

According to http://e2e.ti.com/support/arm/sitara_arm/f/791/t/210729 the
USB reset pulse has an undocumented duration of 200ns and during this
period the module must not be acessed.

We wait for 100us to take into account for some imprecision of the early
DELAY() loop.

This fixes the eventual 'External Non-Linefetch Abort (S)' that happens at
boot while resetting the musb subsystem.

While here, enable the USB subsystem clock before the first access.

Discussed with:  ian, adrian
MFC after: 2 weeks

9 years agoInclude acle-compat.h directly (we use its symbols) rather than getting
ian [Fri, 26 Dec 2014 14:29:27 +0000 (14:29 +0000)]
Include acle-compat.h directly (we use its symbols) rather than getting
it via sysreg.h.

9 years agoSquelch a (bogus) gcc use-before-init warning.
ian [Fri, 26 Dec 2014 13:44:41 +0000 (13:44 +0000)]
Squelch a (bogus) gcc use-before-init warning.

9 years agoAdd more USB devices.
hselasky [Fri, 26 Dec 2014 10:57:39 +0000 (10:57 +0000)]
Add more USB devices.

MFC after: 1 day
Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agoAdd more quirks.
hselasky [Fri, 26 Dec 2014 10:53:22 +0000 (10:53 +0000)]
Add more quirks.

PR: 180617
MFC after: 1 day

9 years agoAdd proper Makefiles to build some infiniband example utilities.
hselasky [Fri, 26 Dec 2014 10:25:34 +0000 (10:25 +0000)]
Add proper Makefiles to build some infiniband example utilities.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoMinor mdoc fixes.
joel [Fri, 26 Dec 2014 09:35:23 +0000 (09:35 +0000)]
Minor mdoc fixes.

9 years agoMinor Xr fix.
joel [Fri, 26 Dec 2014 09:18:33 +0000 (09:18 +0000)]
Minor Xr fix.

9 years agoRemove unknown macro
bapt [Fri, 26 Dec 2014 07:36:42 +0000 (07:36 +0000)]
Remove unknown macro

9 years agoFix .TH having too many arguments
bapt [Fri, 26 Dec 2014 07:34:42 +0000 (07:34 +0000)]
Fix .TH having too many arguments

9 years agoBackport fix for binutils 11867: .quad directive not assembled correctly
pfg [Fri, 26 Dec 2014 04:33:53 +0000 (04:33 +0000)]
Backport fix for binutils 11867: .quad directive not assembled correctly

Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.

Obtained from: OpenBSD
MFC after: 5 days

9 years agogas: use memmove instead of bogus memcpy.
pfg [Fri, 26 Dec 2014 03:03:41 +0000 (03:03 +0000)]
gas: use memmove instead of bogus memcpy.

partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Sourceware-PR 11456.

Obtained from: OpenBSD (CVS rev. 1.2)
MFC after: 3 days

9 years agoMention cc_cdg.
kevlo [Fri, 26 Dec 2014 01:48:44 +0000 (01:48 +0000)]
Mention cc_cdg.

9 years agoEnhancements to zpool upgrade processing
smh [Fri, 26 Dec 2014 01:12:02 +0000 (01:12 +0000)]
Enhancements to zpool upgrade processing

Introduce a seperate phase to list all unavailable pools when listing
pools to upgrade. This avoids confusing output when displaying older
and disabled feature pools. These existing phases now silently skip
unavailable pools.

Introduce cb_unavail to upgrade_cbdata_t which enables the final
output for zpool list to correctly detail if all pools or only all
available pools where up-to-date on version / features.

Correct the type of upgrade_cbdata_t.cb_first from int -> boolean_t.

Change the pool iteration when upgrading named pools to include
unavailable pools and update upgrade_one so it doesn't try to upgrade
unavailable pools but warns about them. This allows the correct error
to be displayed as well as upgrades with available and unavailable
pools intermixed to partially complete.

Also correct some missing trailing \n's from output in upgrade_one.

MFC after: 1 month
X-MFC-With: r276194

9 years agoLet's see if we can fix the NOINET if_gif(4) module build after r276215
bz [Fri, 26 Dec 2014 00:01:00 +0000 (00:01 +0000)]
Let's see if we can fix the NOINET if_gif(4) module build after r276215
going by example.

9 years agoDelete some duplicate code that was harmless because
rmacklem [Thu, 25 Dec 2014 22:29:37 +0000 (22:29 +0000)]
Delete some duplicate code that was harmless because
exactly the same code is at the end of the nfscl_checksattr()
function that is called just before it. As such, this code
had already been executed and didn't do anything.

MFC after: 1 week

9 years agomandoc -Tlocale is now the default, no need to enforce it anymore
bapt [Thu, 25 Dec 2014 22:04:16 +0000 (22:04 +0000)]
mandoc -Tlocale is now the default, no need to enforce it anymore

9 years agoUpdate mandoc to 1.13.2
bapt [Thu, 25 Dec 2014 21:56:56 +0000 (21:56 +0000)]
Update mandoc to 1.13.2

9 years agopatch: Bring in xstrdup and use it when appropriate.
pfg [Thu, 25 Dec 2014 21:51:28 +0000 (21:51 +0000)]
patch: Bring in xstrdup and use it when appropriate.

The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in.  In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).

Clean up some whitespaces while here

Obtained from: OpenBSD
MFC after: 2 weeks

9 years agoImport mandoc 1.13.2
bapt [Thu, 25 Dec 2014 21:33:25 +0000 (21:33 +0000)]
Import mandoc 1.13.2

9 years agoExtern declarations in C files loses compile-time checking that
ae [Thu, 25 Dec 2014 21:32:37 +0000 (21:32 +0000)]
Extern declarations in C files loses compile-time checking that
the functions' calls match their definitions. Move them to header files.

Reviewed by: jilles (previous version)

9 years agoDeorbit the IEEE-488/GPIB support.
phk [Thu, 25 Dec 2014 20:15:13 +0000 (20:15 +0000)]
Deorbit the IEEE-488/GPIB support.

9 years agoDefine only the CP15 register operations that are valid for the architecture.
ian [Thu, 25 Dec 2014 19:22:02 +0000 (19:22 +0000)]
Define only the CP15 register operations that are valid for the architecture.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
              Michal Meloun <meloun@miracle.cz

9 years agoAdd macros for asm barrier instructions with arch-specific implementations.
ian [Thu, 25 Dec 2014 19:08:39 +0000 (19:08 +0000)]
Add macros for asm barrier instructions with arch-specific implementations.

9 years agoCreate the PKG_DIR if it is missing
phk [Thu, 25 Dec 2014 17:54:22 +0000 (17:54 +0000)]
Create the PKG_DIR if it is missing

9 years agoFix OLD_LIBS for libxo moved to /lib
alfred [Thu, 25 Dec 2014 17:53:43 +0000 (17:53 +0000)]
Fix OLD_LIBS for libxo moved to /lib

Pointed out by: kib

9 years agoUse compiled in default keymaps which are available both in syscons and vt.
phk [Thu, 25 Dec 2014 17:50:04 +0000 (17:50 +0000)]
Use compiled in default keymaps which are available both in syscons and vt.

9 years agoAdd interrupt support for GPIO pins on OMAP4 and AM335x.
loos [Thu, 25 Dec 2014 17:28:26 +0000 (17:28 +0000)]
Add interrupt support for GPIO pins on OMAP4 and AM335x.

This enables the use of GPIO pins as interrupt sources for kernel devices
directly attached to gpiobus (userland notification will be added soon).

The use of gpio interrupts for other kernel devices will be possible when
intrng is complete.

All GPIO pins can be set to trigger on:

- active-low;
- active-high;
- rising edge;
- falling edge.

Tested on: Beaglebone-black

9 years agoFor data and instruction prefetch aborts, call the same handler in the C
ian [Thu, 25 Dec 2014 17:06:58 +0000 (17:06 +0000)]
For data and instruction prefetch aborts, call the same handler in the C
code, passing a 0/1 flag that indicates which type of abort it was.  This
sets the stage for unifying the handling of page faults in a single routine.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
      Michal Meloun <meloun@miracle.cz

9 years agoCreate 'L' variants of all the ENTRY macros for file-static/local symbols.
ian [Thu, 25 Dec 2014 16:49:33 +0000 (16:49 +0000)]
Create 'L' variants of all the ENTRY macros for file-static/local symbols.

If it seems like this is getting out of hand, I quite agree.  I wonder if
it's safe, here in the 21st century, to lose the distinction between C and
ASM symbols?

9 years agoFix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.
ian [Thu, 25 Dec 2014 16:43:15 +0000 (16:43 +0000)]
Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.

9 years agoStylish changes... put tabs where they need to be in macros, move lines
ian [Thu, 25 Dec 2014 16:36:02 +0000 (16:36 +0000)]
Stylish changes... put tabs where they need to be in macros, move lines
around so that related things are more grouped together, rewrite comments.

No functional changes, this is all so that the functional changes in the
next commit will stand out.

9 years agoReplace CC_VAR with CCV, since the CC_VAR macro doesn't exist.
kevlo [Thu, 25 Dec 2014 15:17:57 +0000 (15:17 +0000)]
Replace CC_VAR with CCV, since the CC_VAR macro doesn't exist.
While here, add MLINK for CCV.9 and DECLARE_CC_MODULE.9.

9 years agoFix the comment introduced in r276192 so that it clearly
rmacklem [Thu, 25 Dec 2014 14:44:04 +0000 (14:44 +0000)]
Fix the comment introduced in r276192 so that it clearly
states that the change is needed to avoid a deadlock.

Suggested by: kib
MFC after: 1 week

9 years agoFix VIMAGE build.
ae [Thu, 25 Dec 2014 13:38:51 +0000 (13:38 +0000)]
Fix VIMAGE build.

9 years agoRemove _PROF_PROLOGUE from the EENTRY() macros. These macros define
ian [Thu, 25 Dec 2014 04:41:43 +0000 (04:41 +0000)]
Remove _PROF_PROLOGUE from the EENTRY() macros.  These macros define
'extra' entry points which are nested within or provide a synonym name
for another function.  It's most likely not safe to be messing with the
IP and LR registers at anything other than the primary entry point to a
function.  Anywhere beyond initial function entry, those registers may
be in use as scratch or variable registers.

9 years agoOops, I fumbled a semicolon on the style changes; recover it.
ian [Thu, 25 Dec 2014 04:18:31 +0000 (04:18 +0000)]
Oops, I fumbled a semicolon on the style changes; recover it.

9 years agoChange the style of the DO_AST macro to match the others in this file --
ian [Thu, 25 Dec 2014 03:41:56 +0000 (03:41 +0000)]
Change the style of the DO_AST macro to match the others in this file --
semicolons between the code and comments instead of after the comments,
and line continuations in the arbitrary but now consistant column 76.

No functional changes.

9 years agoMove libxo to /lib
alfred [Thu, 25 Dec 2014 03:15:56 +0000 (03:15 +0000)]
Move libxo to /lib

Update ObsoleteFiles to reflect libxo move.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D1370

9 years agoPrevent zpool upgrade failing due to unavailable pools
smh [Thu, 25 Dec 2014 02:17:17 +0000 (02:17 +0000)]
Prevent zpool upgrade failing due to unavailable pools

Prior to this fix "zpool upgrade" and "zpool upgrade -a" would fail due to
an assert when operating on unavailable pools.

We now print a warning to stderr but allow the processing of other pools
to procesed.

MFC after: 1 month

9 years agoA deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
rmacklem [Thu, 25 Dec 2014 01:55:17 +0000 (01:55 +0000)]
A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
was reported via email. This was caused by a LOR between the
sleep lock used to serialize the local locking (nfsrv_locklf())
and locking the vnode. I believe this patch fixes the problem
by delaying relocking of the vnode until the sleep lock is
unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side
effect of unlocking the vnode, unlocking the vnode was moved to before
the functions that call nfsvno_advlock().
It shouldn't affect the execution of the default case where
vfs.nfsd.enable_locallocks=0.

Reported by: loic.blot@unix-experience.fr
Discussed with: kib
MFC after: 1 week

9 years agoModify vop_stdadvlock{async}() so that it only
rmacklem [Wed, 24 Dec 2014 22:58:08 +0000 (22:58 +0000)]
Modify vop_stdadvlock{async}() so that it only
locks/unlocks the vnode and does a VOP_GETATTR()
for the SEEK_END case. This is safe to do, since
lf_advlock{async}() only uses the size argument
for the SEEK_END case.
The NFSv4 server needs this when
vfs.nfsd.enable_locallocks!=0 since locking the
vnode results in a LOR that can cause a deadlock
for the nfsd threads.

Reviewed by: kib
MFC after: 1 week

9 years agoDisplay the correct value for cache Level of Coherency. Like the other
ian [Wed, 24 Dec 2014 19:47:50 +0000 (19:47 +0000)]
Display the correct value for cache Level of Coherency.  Like the other
levels being displayed here, its value needs a +1 adjustment.

9 years agoCleanup up ARM *frame structures...
ian [Wed, 24 Dec 2014 18:54:31 +0000 (18:54 +0000)]
Cleanup up ARM *frame structures...

 - Eliminate unused irqframe
 - Eliminate unused saframe
 - Instead of splitting r4-sp storage between the stack and switchframe,
   just put all the registers in switchframe and eliminate the un_32 struct.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
Michal Meloun <meloun@miracle.cz>

9 years agoBuild gperf before gcc
emaste [Wed, 24 Dec 2014 18:51:25 +0000 (18:51 +0000)]
Build gperf before gcc

The ARM image builds build the in-tree gcc in order to build u-boot
and gperf is needed to build gcc, but is no longer installed on archs
that use clang.

Invoking the make targets as separate steps is done to work around
a build failure which is not yet fully understood.

Reviewed by: gjb, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1317

9 years agoRename ip4_def_policy variable to def_policy. It is used by both IPv4 and
ae [Wed, 24 Dec 2014 18:34:56 +0000 (18:34 +0000)]
Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and
IPv6. Initialize it only once in def_policy_init(). Remove its
initialization from key_init() and make it static.

Remove several fields from struct secpolicy:
* lock - it isn't so useful having mutex in the structure, but the only
  thing we do with it is initialization and destroying.
* state - it has only two values - DEAD and ALIVE. Instead of take a lock
  and change the state to DEAD, then take lock again in GC function and
  delete policy from the chain - keep in the chain only ALIVE policies.
* scangen - it was used in GC function to protect from sending several
  SADB_SPDEXPIRE messages for one SPD entry. Now we don't keep DEAD entries
  in the chain and there is no need to have scangen variable.

Use TAILQ to implement SPD entries chain. Use rmlock to protect access
to SPD entries chain. Protect all SP lookup with RLOCK, and use WLOCK
when we are inserting (or removing) SP entry in the chain.

Instead of using pattern "LOCK(); refcnt++; UNLOCK();", use refcount(9)
API to implement refcounting in SPD. Merge code from key_delsp() and
_key_delsp() into _key_freesp(). And use KEY_FREESP() macro in all cases
when we want to release reference or just delete SP entry.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoEliminate unnecessary references to pte.h internals by using the standard
ian [Wed, 24 Dec 2014 17:12:51 +0000 (17:12 +0000)]
Eliminate unnecessary references to pte.h internals by using the standard
pmap_kenter_temporary() to map pages while dumping.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
Michal Meloun <meloun@miracle.cz>

9 years agoRename pic_ipi_get to pic_ipi_read for intrng.
andrew [Wed, 24 Dec 2014 15:25:18 +0000 (15:25 +0000)]
Rename pic_ipi_get to pic_ipi_read for intrng.

9 years agoFix missing \n in committers-ports.dot while adding myself
bofh [Wed, 24 Dec 2014 13:25:22 +0000 (13:25 +0000)]
Fix missing \n in committers-ports.dot while adding myself

Differential Revision: https://reviews.freebsd.org/D1365
Submitted by: danfe
Approved by: bapt(mentor)

9 years agoSwitch i.MX to use the platform code to help with a single Freescale kernel.
andrew [Wed, 24 Dec 2014 12:26:43 +0000 (12:26 +0000)]
Switch i.MX to use the platform code to help with a single Freescale kernel.

Differential Revision: https://reviews.freebsd.org/D1349
Reviewed by: ian, rpaulo

9 years agoClarify to explain that C99 conforming compilers don't need CMPLX*().
ed [Wed, 24 Dec 2014 10:13:53 +0000 (10:13 +0000)]
Clarify to explain that C99 conforming compilers don't need CMPLX*().

Discussed with: kargl@

9 years agoUpdate Mentor and Mentee Information (bofh)
bofh [Wed, 24 Dec 2014 09:25:16 +0000 (09:25 +0000)]
Update Mentor and Mentee Information (bofh)

Differential Revision: https://reviews.freebsd.org/D1363
Reviewed by: bapt
Approved by: bapt

9 years agoFix tunable and sysctl handling of the fail_on_task_timeout knob.
scottl [Wed, 24 Dec 2014 07:04:04 +0000 (07:04 +0000)]
Fix tunable and sysctl handling of the fail_on_task_timeout knob.

Reviewed by: emax
Obtained from: Netflix, Inc.
MFC after: 3 days

9 years agoBring in the last round of updates before adding the interrupt support.
loos [Wed, 24 Dec 2014 04:24:08 +0000 (04:24 +0000)]
Bring in the last round of updates before adding the interrupt support.

Fix the following issues:

- Removed revision from device softc, it isn't used anywhere else out of
  device attach routine;

- Move the duplicated code for verification of valid banks (and pins) to
  a single function;

- Use some macros to simplify the handling of some constants;

- Update some stale comments.

9 years agoAdd Intel vendor ID to the device table to make it more uniform so
imp [Wed, 24 Dec 2014 03:49:33 +0000 (03:49 +0000)]
Add Intel vendor ID to the device table to make it more uniform so
that all the pnp info to match the device is in the fxp_ident_table.

9 years agoImproves the GPIO API description a little bit.
loos [Wed, 24 Dec 2014 03:24:50 +0000 (03:24 +0000)]
Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.

PR: 157070
Submitted by: brix

9 years agoRevert a glitched mismerge that got caught up in the prior commit.
ian [Wed, 24 Dec 2014 03:09:55 +0000 (03:09 +0000)]
Revert a glitched mismerge that got caught up in the prior commit.
The PJ4B family is still armv7, not armv6.

9 years agoDefine the old-school arm arch constants we still use internally based on
ian [Wed, 24 Dec 2014 03:02:12 +0000 (03:02 +0000)]
Define the old-school arm arch constants we still use internally based on
the somewhat newer constants predefined by the compiler.  This will allow
userland apps to use various machine/foo.h headers without CPUTYPE defined.

9 years agoAllow info to display correctly in for varying tabstop settings
smh [Wed, 24 Dec 2014 01:50:44 +0000 (01:50 +0000)]
Allow info to display correctly in for varying tabstop settings

The SAMPLE message and notes where tab seperated for some parts and hence
displayed incorrectly unless tabstop was set to 8. Switch to spaces to it
displays correctly independent of the tabstop setting.

Sponsored by: Multiplay

9 years agoDon't assume required FDT properties are present.
ian [Wed, 24 Dec 2014 01:19:11 +0000 (01:19 +0000)]
Don't assume required FDT properties are present.

9 years agoRevert r276101, it didn't fix the problem and causes a compile error
ian [Wed, 24 Dec 2014 01:10:53 +0000 (01:10 +0000)]
Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).

9 years agoRemove if_stf.h. It contains only one function declaration used by if_stf(4).
ae [Tue, 23 Dec 2014 20:54:59 +0000 (20:54 +0000)]
Remove if_stf.h. It contains only one function declaration used by if_stf(4).
Also make in_stf_protosw structure static.

9 years agoDo not return the total number of available pins but the maximum pin number
loos [Tue, 23 Dec 2014 19:31:56 +0000 (19:31 +0000)]
Do not return the total number of available pins but the maximum pin number
we can cope.

Previously the returned value could prevent access to some of the pins.

9 years agoBump the valid GPIO range for rfkill up from 8 to 16.
adrian [Tue, 23 Dec 2014 18:48:45 +0000 (18:48 +0000)]
Bump the valid GPIO range for rfkill up from 8 to 16.

AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins.
So to support rfkill on these NICs we need to bump this up or the
rfkill GPIO pin may get reset to the wrong value.

Noticed by: Anthony Jenkins <scoobi_doo@yahoo.com>

9 years agoRemove in_gif.h and in6_gif.h files. They only contain function
ae [Tue, 23 Dec 2014 16:17:37 +0000 (16:17 +0000)]
Remove in_gif.h and in6_gif.h files. They only contain function
declarations used by gif(4). Instead declare these functions in C files.
Also make some variables static.

9 years agoUpdate comment: only one file in the FAT file system EFI boot image
emaste [Tue, 23 Dec 2014 16:00:25 +0000 (16:00 +0000)]
Update comment: only one file in the FAT file system EFI boot image

Sponsored by: The FreeBSD Foundation

9 years agoUse explicit --output-target to set EFI file format
emaste [Tue, 23 Dec 2014 15:58:45 +0000 (15:58 +0000)]
Use explicit --output-target to set EFI file format

According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by: The FreeBSD Foundation

9 years agoConvert a couple lingering NO_FORTH conditionals to test MK_FORTH.
ian [Tue, 23 Dec 2014 15:42:34 +0000 (15:42 +0000)]
Convert a couple lingering NO_FORTH conditionals to test MK_FORTH.

9 years agoWe can stop iterating once we've found the DOF section.
markj [Tue, 23 Dec 2014 15:42:33 +0000 (15:42 +0000)]
We can stop iterating once we've found the DOF section.

Submitted by: Fedor Indutny <fedor@indutny.com>

9 years agoFix a memory leak that occured when looking up CTF info for a symbol.
markj [Tue, 23 Dec 2014 15:40:57 +0000 (15:40 +0000)]
Fix a memory leak that occured when looking up CTF info for a symbol.

9 years agoRestore the trap type argument to the DTrace trap hook, removed in r268600.
markj [Tue, 23 Dec 2014 15:38:19 +0000 (15:38 +0000)]
Restore the trap type argument to the DTrace trap hook, removed in r268600.
It's redundant at the moment since it can be obtained from the trapframe
on the architectures where DTrace is supported, but this won't be the case
with ARM.

9 years agoHide block device VPD pages for non-block devices.
mav [Tue, 23 Dec 2014 15:18:28 +0000 (15:18 +0000)]
Hide block device VPD pages for non-block devices.

MFC after: 2 weeks

9 years agoFix kernel builds with "options NFS_DEBUG" that
rmacklem [Tue, 23 Dec 2014 14:24:36 +0000 (14:24 +0000)]
Fix kernel builds with "options NFS_DEBUG" that
were broken by r276096. Also delete the two
kernel options NFS_GATHERDELAY, NFS_WDELAYHASHSIZ
which are no longer used.

Reported by: bz

9 years agom_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
glebius [Tue, 23 Dec 2014 12:26:35 +0000 (12:26 +0000)]
m_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
protocol and facility boundaries.  However, now it cleans up only the
first mbuf, while intent clearly means all mbufs in a possible chain.

Differential Revision: https://reviews.freebsd.org/D1352
Reviewed by: rpaulo, gnn, adrian
Sponsored by: Nginx, Inc.

9 years agoFix build with recent binutils
bapt [Tue, 23 Dec 2014 10:43:35 +0000 (10:43 +0000)]
Fix build with recent binutils

Recent binutils considered the .gnu.warning.symbol section as a fatal error when
run with --fatal-warnings which makes any users of "insecure" functions from
libc failing to build with recent binutils.

Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with
--no-fatal-warnings for the users of "insecure" functions

Differential Revision: https://reviews.freebsd.org/D1320

9 years agoFix potential division by zero after r275920.
mav [Tue, 23 Dec 2014 10:18:42 +0000 (10:18 +0000)]
Fix potential division by zero after r275920.

Reported by: Coverity Scan
CID: 1260387
MFC after: 3 days

9 years agoAlways sync the global ZFS config cache to reflect the new mosconfig
smh [Tue, 23 Dec 2014 09:31:24 +0000 (09:31 +0000)]
Always sync the global ZFS config cache to reflect the new mosconfig

This fixes out of date zpool.cache for root pools, which can cause issues
such as confusion of zdb etc.

MFC after: 1 month

9 years agoAlways select the card before we do the 4.x specific stuff and
imp [Tue, 23 Dec 2014 05:50:53 +0000 (05:50 +0000)]
Always select the card before we do the 4.x specific stuff and
deselect it after setting the block size. This is a similar bug that
was fixed elsewhere, but not here. This makes sure that we leave the
card deselected at the end of the loop, and we don't send any commands
to the card without it selected.

Reviewed by: ian@

9 years agoTemporarily disable the cpus directive until I figure out what's wrong.
rpaulo [Tue, 23 Dec 2014 03:00:18 +0000 (03:00 +0000)]
Temporarily disable the cpus directive until I figure out what's wrong.

9 years agoAllow ktr(4) tracing of all guest exceptions via the tunable
neel [Tue, 23 Dec 2014 02:14:49 +0000 (02:14 +0000)]
Allow ktr(4) tracing of all guest exceptions via the tunable
"hw.vmm.trace_guest_exceptions".  To enable this feature set the tunable
to "1" before loading vmm.ko.

Tracing the guest exceptions can be useful when debugging guest triple faults.

Note that there is a performance impact when exception tracing is enabled
since every exception will now trigger a VM-exit.

Also, handle machine check exceptions that happen during guest execution
by vectoring to the host's machine check handler via "int $18".

Discussed with: grehan
MFC after: 2 weeks

9 years agoAdd an UPDATING entry for r276096, which removed the kernel
rmacklem [Tue, 23 Dec 2014 01:32:18 +0000 (01:32 +0000)]
Add an UPDATING entry for r276096, which removed the kernel
sources for the old NFS client and server.

9 years agoRemove the old NFS client and server from head,
rmacklem [Tue, 23 Dec 2014 00:47:46 +0000 (00:47 +0000)]
Remove the old NFS client and server from head,
which means that the NFSCLIENT and NFSSERVER
kernel options will no longer work. This commit
only removes the kernel components. Removal of
unused code in the user utilities will be done
later. This commit does not include an addition
to UPDATING, but that will be committed in a
few minutes.

Discussed on: freebsd-fs

9 years agoUse "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
des [Mon, 22 Dec 2014 23:03:18 +0000 (23:03 +0000)]
Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
expand the latter.

MFC after: 3 days

9 years agoAdd a new loader(8) variable, twiddle_divisor, allowing control over the
ian [Mon, 22 Dec 2014 22:07:22 +0000 (22:07 +0000)]
Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.  The default
value is 1.  For larger values N, the next stage of the animation is only
output on every Nth call to the output routine.  A sufficiently large N
effectively disables the animation completely.

9 years agoStrip trailing / characters from paths in "not present" index entries, not
cperciva [Mon, 22 Dec 2014 21:52:37 +0000 (21:52 +0000)]
Strip trailing / characters from paths in "not present" index entries, not
just "directory" entries.

Prior to this commit, if / was added as part of a security update (how? In
the most recent case, because lib32 was accidentally omitted and was then
re-added, and every installer distribution set gets its own paths) then
the code which was supposed to filter out updates to deleted parts of the
base system (if someone decides to delete / then we shouldn't re-create it
for them) would instead get confused and decided that while / should exist,
// should not exist and needs to be removed.

This fixes the bug which caused freebsd-update to want to delete / (which is
harmless, since `rm /` fails, but scary nonetheless).  A workaround is being
applied to the update bits in order to avoid triggering the bug on unpatched
systems.

PR: 196055, 196091, 196147

9 years agoAdd VAMI (VMware Appliance Management Interface) port.
marck [Mon, 22 Dec 2014 21:26:49 +0000 (21:26 +0000)]
Add VAMI (VMware Appliance Management Interface) port.

Reviewed by: eadler
MFC after: 2 weeks

9 years agoAdd a divisor parameter to twiddle() so that callers can request that output
ian [Mon, 22 Dec 2014 20:42:36 +0000 (20:42 +0000)]
Add a divisor parameter to twiddle() so that callers can request that output
only happen on every Nth call.  Update the existing twiddle() calls done in
various IO loops to roughly reflect the relative IO sizes.  That is, tftp
and nfs call twiddle() on every 1K block, ufs on every filesystem block,
so the network calls now use a much larger divisor than disk IO calls.

Also add a new twiddle_divisor() function that allows an application to set
a global divisor that is applied on top of the per-call divisors.  Nothing
calls this yet, but loader(8) will be using it to further throttle the
cursor for slow serial consoles.

9 years agoDon't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
imp [Mon, 22 Dec 2014 19:10:21 +0000 (19:10 +0000)]
Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
current date if we can't find it.

MFC After: 2 weeks

9 years agoMake this compile when TERM_EMU is not defined.
imp [Mon, 22 Dec 2014 19:10:11 +0000 (19:10 +0000)]
Make this compile when TERM_EMU is not defined.

9 years agoFix multiple ntp vulnerabilities.
delphij [Mon, 22 Dec 2014 18:54:55 +0000 (18:54 +0000)]
Fix multiple ntp vulnerabilities.

Reviewed by: roberto (earlier revision), philip
Security: CVE-2014-9293, CVE-2014-9294
Security: CVE-2014-9295, CVE-2014-9296
Security: FreeBSD-SA-14:31.ntp

Differential Revision: https://reviews.freebsd.org/D1343

9 years agoFix panic when resizing ZFS zvol's
smh [Mon, 22 Dec 2014 18:39:38 +0000 (18:39 +0000)]
Fix panic when resizing ZFS zvol's

Resizing a ZFS ZVOL with debug enabled would result in a panic due to
recursion on dp_config_rwlock.

The upstream change "3464 zfs synctask code needs restructuring" changed
zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was
missed when originally merged in by r248571 due to significant differences
in our codebases in this area.

These changes also relied on bring in changes from upstream:
3557 dumpvp_size is not updated correctly when a dump zvol's size is
changed, which where also not present.

In order to help prevent future issues in this area a direct comparison
and diff minimisation from current upstream version (b515258) of zvol.c.

Differential Revision: https://reviews.freebsd.org/D1302
MFC after: 1 month
X-MFC-With: r276063 & r276066
Sponsored by: Multiplay

9 years agoRefactor zvol locking to minimise diff with upstream
smh [Mon, 22 Dec 2014 17:04:51 +0000 (17:04 +0000)]
Refactor zvol locking to minimise diff with upstream

Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all
zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream.

Differential Revision: D1302
MFC after: 1 month
X-MFC-With r276063
Sponsored by: Multiplay

9 years agoExplicitly treat timeouts when waiting for IBF or OBF to change state as an
jhb [Mon, 22 Dec 2014 16:53:04 +0000 (16:53 +0000)]
Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.

MFC after: 1 week

9 years agovt: register the memory regions used by the vt drivers
royger [Mon, 22 Dec 2014 16:46:07 +0000 (16:46 +0000)]
vt: register the memory regions used by the vt drivers

Current VT drivers don't register the memory regions they use with the
nexus. This patch makes vt_vga and vt_efifb register the memory regions they
use.

This is needed (at least) for Xen support, since the FreeBSD kernel will try
to use the holes in the memory map to map memory from other domains and
setup it's grant table.

Sponsored by: Citrix Systems R&D
Reported by: sbruno
Tested by: emaste
Reviewed by: ray
PR: 195537
Differential Revision: https://reviews.freebsd.org/D1291