freebsd.git
10 years agoFix typo.
trasz [Wed, 16 Apr 2014 17:39:59 +0000 (17:39 +0000)]
Fix typo.

Sponsored by: The FreeBSD Foundation

10 years agoAdd kern.iscsi.fail_on_disconnection; this is required for gmultipath
trasz [Wed, 16 Apr 2014 17:39:10 +0000 (17:39 +0000)]
Add kern.iscsi.fail_on_disconnection; this is required for gmultipath
to work.

Sponsored by: The FreeBSD Foundation

10 years agoRemove the libkse directory. It was unhooked from the build and kernel
brooks [Wed, 16 Apr 2014 17:12:59 +0000 (17:12 +0000)]
Remove the libkse directory.  It was unhooked from the build and kernel
support removed in 2008 (prior to 8.0).

Approved by: deischen, imp
MFC after: 3 days

10 years agoUse ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
bz [Wed, 16 Apr 2014 15:28:17 +0000 (15:28 +0000)]
Use ETHER_ALIGN as argument to m_adj() to offset the beginning of packet
rather than the magic number 2.

While here fix a typo in a comment.

No functional changes.

MFC after: 1 week
Sponsored by: DARPA/AFRL

10 years agoSet oif only for outgoing packets.
ae [Wed, 16 Apr 2014 14:37:11 +0000 (14:37 +0000)]
Set oif only for outgoing packets.

PR: 188543
MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoWhen switching variables to flags in r243185 a few cases were missed.
bz [Wed, 16 Apr 2014 12:29:45 +0000 (12:29 +0000)]
When switching variables to flags in r243185 a few cases were missed.
After r263152 this leaves unused variables if route(8) is compiled
without INET support.
Switch the remaining variable accesses to flags and remove now obsolete
variables.

Reviewed by: glebius
MFC after: 1 week

10 years agoRemove useless debug.
trasz [Wed, 16 Apr 2014 11:28:38 +0000 (11:28 +0000)]
Remove useless debug.

Sponsored by: The FreeBSD Foundation

10 years agoBe more strict with locking for is_waiting_for_iscsid variable.
trasz [Wed, 16 Apr 2014 11:28:05 +0000 (11:28 +0000)]
Be more strict with locking for is_waiting_for_iscsid variable.

Sponsored by: The FreeBSD Foundation

10 years agoGet rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
trasz [Wed, 16 Apr 2014 11:19:49 +0000 (11:19 +0000)]
Get rid of ISCSIDCLOSE; it wasn't used and is redundant anyway,
because of ISCSIDFAIL.

Sponsored by: The FreeBSD Foundation

10 years agoEnglish.
trasz [Wed, 16 Apr 2014 11:07:29 +0000 (11:07 +0000)]
English.

Sponsored by: The FreeBSD Foundation

10 years agoIf we fail to create LUN, try again on next configuration reload.
trasz [Wed, 16 Apr 2014 11:06:45 +0000 (11:06 +0000)]
If we fail to create LUN, try again on next configuration reload.

Sponsored by: The FreeBSD Foundation

10 years agoUse consistent punctuation.
trasz [Wed, 16 Apr 2014 11:05:57 +0000 (11:05 +0000)]
Use consistent punctuation.

Sponsored by: The FreeBSD Foundation

10 years agoUse proper terminology in debug messages.
trasz [Wed, 16 Apr 2014 11:03:21 +0000 (11:03 +0000)]
Use proper terminology in debug messages.

Sponsored by: The FreeBSD Foundation

10 years agoConstify.
trasz [Wed, 16 Apr 2014 11:01:59 +0000 (11:01 +0000)]
Constify.

Sponsored by: The FreeBSD Foundation

10 years agoProperly pass the initiator address when running in proxy mode.
trasz [Wed, 16 Apr 2014 11:00:10 +0000 (11:00 +0000)]
Properly pass the initiator address when running in proxy mode.

Sponsored by: The FreeBSD Foundation

10 years agoUse socket address from accept(2) instead of retrieving it via
trasz [Wed, 16 Apr 2014 10:49:48 +0000 (10:49 +0000)]
Use socket address from accept(2) instead of retrieving it via
getpeername(2).

Sponsored by: The FreeBSD Foundation

10 years agoRework the way we enable CTL iSCSI port. Previously conf_apply()
trasz [Wed, 16 Apr 2014 10:43:12 +0000 (10:43 +0000)]
Rework the way we enable CTL iSCSI port.  Previously conf_apply()
needed it to be already enabled, because listening in proxy mode
requires it; however, it's conf_apply() that opens pidfiles,
so it resulted in port being enabled before pidfile was opened.
This was not so bad, but it was also disabled when pidfile couldn't
be opened due to ctld already running; this means that starting
second ctld instance screwed up the first.

Sponsored by: The FreeBSD Foundation

10 years agoMake it possible to interrupt login when running in proxy mode.
trasz [Wed, 16 Apr 2014 10:37:26 +0000 (10:37 +0000)]
Make it possible to interrupt login when running in proxy mode.

Sponsored by: The FreeBSD Foundation

10 years agoProperly identify target portal when running in proxy mode. While here,
trasz [Wed, 16 Apr 2014 10:29:34 +0000 (10:29 +0000)]
Properly identify target portal when running in proxy mode.  While here,
remove CTL_ISCSI_CLOSE, it wasn't used or implemented anyway.

Sponsored by: The FreeBSD Foundation

10 years agoAdd some stuff to make it easier to figure out for the system administrator
trasz [Wed, 16 Apr 2014 10:18:44 +0000 (10:18 +0000)]
Add some stuff to make it easier to figure out for the system administrator
whether the ICL_KERNEL_PROXY stuff got compiled in correctly.

Sponsored by: The FreeBSD Foundation

10 years agoMake it possible for the iSCSI target side to operate in both normal
trasz [Wed, 16 Apr 2014 10:06:37 +0000 (10:06 +0000)]
Make it possible for the iSCSI target side to operate in both normal
and ICL_KERNEL_PROXY mode, and fix some bit rot so the latter actually
works again.

Sponsored by: The FreeBSD Foundation

10 years agoBackout r257223,r257224,r257225,r257246,r257710. The changes caused
glebius [Wed, 16 Apr 2014 09:25:20 +0000 (09:25 +0000)]
Backout r257223,r257224,r257225,r257246,r257710. The changes caused
some regressions in ICMP handling, and right now me and Baptiste
are out of time on analyzing them.

PR: 188253

10 years agoRemove _IP_VHL* macros and related ifdefs.
ae [Wed, 16 Apr 2014 05:31:54 +0000 (05:31 +0000)]
Remove _IP_VHL* macros and related ifdefs.

MFC after: 1 week

10 years agoFix armv6 build failure: "armv6-freebsd-gcc: not found"
gjb [Tue, 15 Apr 2014 23:27:14 +0000 (23:27 +0000)]
Fix armv6 build failure: "armv6-freebsd-gcc: not found"

Help from: imp
Sponsored by: The FreeBSD Foundation

10 years agoVlan did not set the value of if_hw_tsomax, so when vlan
rmacklem [Tue, 15 Apr 2014 21:48:35 +0000 (21:48 +0000)]
Vlan did not set the value of if_hw_tsomax, so when vlan
was stacked on top of a network interface that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface. This patch modifies vlan so that
it sets if_hw_tsomax to the value of the parent interface.

Reviewed by: glebius
MFC after: 2 weeks

10 years agoDon't spindown the BSP if it executes hlt with the APIC disabled. A
jhb [Tue, 15 Apr 2014 20:53:53 +0000 (20:53 +0000)]
Don't spindown the BSP if it executes hlt with the APIC disabled.  A
guest that doesn't use the APIC at all can trigger this, plus the BSP
always needs to execute as it should trigger a reset, etc.

Reviewed by: tychon

10 years agoDocument WITHOUT_GPL_DTC too.
imp [Tue, 15 Apr 2014 20:41:55 +0000 (20:41 +0000)]
Document WITHOUT_GPL_DTC too.

10 years agoCorrect a typo in a device description added in r264257.
marius [Tue, 15 Apr 2014 19:58:05 +0000 (19:58 +0000)]
Correct a typo in a device description added in r264257.

10 years agoLocal APIC access via 32-bit naturally-aligned loads is merely
tychon [Tue, 15 Apr 2014 17:06:26 +0000 (17:06 +0000)]
Local APIC access via 32-bit naturally-aligned loads is merely
suggested in the SDM.  Since some OSes have implemented otherwise
don't be too rigorous in enforcing it.

Approved by: grehan (co-mentor)

10 years agoCorrect sorting.
brueffer [Tue, 15 Apr 2014 16:31:23 +0000 (16:31 +0000)]
Correct sorting.

10 years agoMention Capsicum.
brueffer [Tue, 15 Apr 2014 16:29:21 +0000 (16:29 +0000)]
Mention Capsicum.

MFC after: 1 week

10 years agoMake sure not to do I/O for more than MAXPHYS bytes. Doing so can cause
marcel [Tue, 15 Apr 2014 15:41:57 +0000 (15:41 +0000)]
Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause
problems in our providers, such as a KASSERT in md(4). We can initiate
I/O for more than MAXPHYS bytes if we've been given a BIO for MAXPHYS
bytes, the blocks from which we're reading couldn't be compressed and
we had compression in preceeding blocks resulting in misalignment of
the blocks we're trying to read relative to the sector. We're forced to
round up the I/O length to make it an multiple of the sector size.

When we detect the condition, we'll reduce the block count and perform
a "short" read. In g_uzip_done() we need to consider the original I/O
length and stop early if we're about to deflate a block that we didn't
read. By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

Obtained from: Juniper Networks, Inc.

10 years agoAdd support for emulating the byte move and sign extend instructions:
tychon [Tue, 15 Apr 2014 15:11:10 +0000 (15:11 +0000)]
Add support for emulating the byte move and sign extend instructions:
"movsx r/m8, r32" and "movsx r/m8, r64".

Approved by: grehan (co-mentor)

10 years agoStop treating LUN 0 as mandatory. There is no reason to do that.
trasz [Tue, 15 Apr 2014 14:55:56 +0000 (14:55 +0000)]
Stop treating LUN 0 as mandatory.  There is no reason to do that.

Suggested by: mav@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

10 years agoMake g_access() KASSERT() more useful.
bdrewery [Tue, 15 Apr 2014 14:41:41 +0000 (14:41 +0000)]
Make g_access() KASSERT() more useful.

Sponsored by: EMC / Isilon Storage Division
Obtained from: Isilon OneFS
MFC after: 2 weeks

10 years agoFix build for non-INET that was broken by r264469.
rmacklem [Tue, 15 Apr 2014 13:28:54 +0000 (13:28 +0000)]
Fix build for non-INET that was broken by r264469.

MFC after: 2 weeks

10 years agoUse SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
ae [Tue, 15 Apr 2014 09:10:01 +0000 (09:10 +0000)]
Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure.
When server doesn't support this request, try to use SMB_INFO_ALLOCATION.
And use SMB_COM_QUERY_INFORMATION_DISK request as fallback.

MFC after: 2 weeks

10 years agoAdd a missing break in option parsing.
brueffer [Tue, 15 Apr 2014 07:37:56 +0000 (07:37 +0000)]
Add a missing break in option parsing.

CID: 1011452
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoWhen merging docsinstall and zfsboot updates to stable/9 it was discovered
dteske [Tue, 15 Apr 2014 06:56:59 +0000 (06:56 +0000)]
When merging docsinstall and zfsboot updates to stable/9 it was discovered
that the slightly older dialog(1) requires --separate-output when using the
--checklist widget to force response to produce unquoted values (whereas in
stable/10 --checklist widget without --separate-output will only quote the
checklist labels in the response if the label is multi-word (contains any
whitespace).

Since these enhancements (see revisions 263956 and 264437) were developed
originally on 10, the --separate-output option was omitted. When merged to
stable/9, we (Allan Jude) and I found during testing that the "always-
quoting" of the response was causing things like struct interpolation to
fail (`f_struct device_$dev' would produce `f_struct device_\"da0\"' for
example -- literal quotes inherited from dialog(1) --checklist response).

To see the behavior, execute the following on stable/9 versus stable/10:

        dialog --checklist disks: 0 0 0 da0 "" off da1 "" off

Check both items and hit enter. On stable/10, the response is:

        da0 da1

On stable/9 the response is:

        "da0" "da1"

If you use the --separate-output option, the response is the same for both:

        da0
        da1

So applying --separate-output on every platform until either one of two
things occurs 1) dialog(1,3) gets synchronized between stable/9, higher or
2) we drop support for stable/9.

MFC after:      3 days
Reviewed by:    Allan Jude

10 years agoReplace a few Solarisisms with their corresponding FreeBSDisms to make a few
markj [Tue, 15 Apr 2014 02:32:00 +0000 (02:32 +0000)]
Replace a few Solarisisms with their corresponding FreeBSDisms to make a few
printf tests pass.

10 years agoUse the correct format specifiers for wide characters and strings of wide
markj [Tue, 15 Apr 2014 02:28:08 +0000 (02:28 +0000)]
Use the correct format specifiers for wide characters and strings of wide
characters.

MFC after: 1 week

10 years agoUpdate the ath(4) manpage with .. well, updated information.
adrian [Tue, 15 Apr 2014 00:45:38 +0000 (00:45 +0000)]
Update the ath(4) manpage with .. well, updated information.

MFC after: 3 days

10 years agoRe-indent break statement.
brueffer [Mon, 14 Apr 2014 22:49:37 +0000 (22:49 +0000)]
Re-indent break statement.

MFC after: 1 week

10 years agoAdd dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
kib [Mon, 14 Apr 2014 22:44:50 +0000 (22:44 +0000)]
Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
to unwind around the calls from PLT to binder.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agomergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to
jilles [Mon, 14 Apr 2014 22:01:49 +0000 (22:01 +0000)]
mergemaster: Avoid "/var/tmp/temproot disappeared" if there is nothing to
compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR: bin/188485
Submitted by: David Boyd
MFC after: 1 week

10 years agoFix double fclose() in an error case.
brueffer [Mon, 14 Apr 2014 21:44:34 +0000 (21:44 +0000)]
Fix double fclose() in an error case.

CID: 1006120
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agounits(1): don't compare pointers with 0
eadler [Mon, 14 Apr 2014 21:09:47 +0000 (21:09 +0000)]
units(1): don't compare pointers with 0

For better readability, don't compare pointers with 0 or assign 0
to them. Use NULL instead.

Inspired by: DragonflyBSD

10 years agounits(1): Add 'static' and sort list.
eadler [Mon, 14 Apr 2014 21:07:54 +0000 (21:07 +0000)]
units(1): Add 'static' and sort list.

Inspired by: DragonflyBSD

10 years agoRefine r264422: set buf to NULL only when we don't allocate memory,
brueffer [Mon, 14 Apr 2014 21:02:20 +0000 (21:02 +0000)]
Refine r264422: set buf to NULL only when we don't allocate memory,
and free buf unconditionally.

Requested by: kib
MFC after: 1 week

10 years agounits(1): Add v option: verbose
eadler [Mon, 14 Apr 2014 20:51:04 +0000 (20:51 +0000)]
units(1): Add v option: verbose

For increased compatibility with GNU units: support a -v option which
produces more verbose output when spitting out the answer.
GNU -v does additional work in the version, information, and check output which
we do not (yet?) replicate.

10 years agoLagg did not set the value of if_hw_tsomax, so when lagg
rmacklem [Mon, 14 Apr 2014 20:34:48 +0000 (20:34 +0000)]
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax,
tcp_output() would see the default value instead of the value
set by the network interface(s). This patch modifies lagg so that
it sets if_hw_tsomax to the minimum of the value(s) for the
underlying network interfaces.

Reviewed by: glebius
MFC after: 2 weeks

10 years agoAdd support for emulating the slave PIC.
tychon [Mon, 14 Apr 2014 19:00:20 +0000 (19:00 +0000)]
Add support for emulating the slave PIC.

Reviewed by: grehan, jhb
Approved by: grehan (co-mentor)

10 years agoTake into account when zpool history block grows exceeding 128KB in zpool(8)
delphij [Mon, 14 Apr 2014 18:38:14 +0000 (18:38 +0000)]
Take into account when zpool history block grows exceeding 128KB in zpool(8)
and zdb(8) by growing the buffer on demand with a cap of 1GB (specified in
spa_history_create_obj()).

PR: bin/186574
Submitted by: Andrew Childs <lorne cons org nz> (with changes)
MFC after: 2 weeks

10 years agoFix err() usage in libcapsicum(3) example.
gjb [Mon, 14 Apr 2014 18:14:09 +0000 (18:14 +0000)]
Fix err() usage in libcapsicum(3) example.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoPrefer /etc/login.conf for some of these environment values.
bdrewery [Mon, 14 Apr 2014 18:07:00 +0000 (18:07 +0000)]
Prefer /etc/login.conf for some of these environment values.

PR: conf/186085
Reported by: Glen Neff <glen.neff@emc.com>
MFC after: 2 weeks
Sponsored by: EMC

10 years agounits(1): Add U option
eadler [Mon, 14 Apr 2014 16:55:09 +0000 (16:55 +0000)]
units(1): Add U option

For increased compatibility with GNU units: support a -U option which tests for the
existence of the default units file and prints it to the screen.

10 years agounits(1): support reading multiple units files
eadler [Mon, 14 Apr 2014 16:43:36 +0000 (16:43 +0000)]
units(1): support reading multiple units files

GNU units(1) supports reading up to 25 -f options.  We support an arbitrary
number.

10 years agoCommit various fixes for the SolarFlare drivers, in particular
gnn [Mon, 14 Apr 2014 16:31:56 +0000 (16:31 +0000)]
Commit various fixes for the SolarFlare drivers, in particular
this set of patches fixes support for systems with > 32 cores.

Details include

sfxge: RXQ index (not label) comes from FW in flush done/failed events

Change the second argument name of the efx_rxq_flush_done_ev_t and
efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
comes from FW in flush done and failed events.

sfxge: TXQ index (not label) comes from FW in flush done event

Change the second argument name of the efx_txq_flush_done_ev_t prototype to
highlight that TXQ index (not label) comes from FW in flush done event.

sfxge: use TXQ type as label to support more than 32 TXQs

There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
in all other event queues.

Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

10 years agoDocument the xdev* targets.
brueffer [Mon, 14 Apr 2014 16:15:11 +0000 (16:15 +0000)]
Document the xdev* targets.

PR: 188519
Submitted by: Idwer Vollering <vidwer at gmail.com>
Reviewed by: bapt
MFC after: 1 week

10 years agounits(1): parse config file after setting defaults
eadler [Mon, 14 Apr 2014 14:40:12 +0000 (14:40 +0000)]
units(1): parse config file after setting defaults

Parse the config file after setting the defaults to permit the user to change
things (e.g., editing mode)

10 years agounits(1): add libedit support
eadler [Mon, 14 Apr 2014 14:04:59 +0000 (14:04 +0000)]
units(1): add libedit support

Add line editing and history support to units(1) via libedit.

Reviewed by: bdrewery

10 years agoCorrect geli parameter.
brueffer [Mon, 14 Apr 2014 06:59:49 +0000 (06:59 +0000)]
Correct geli parameter.

PR: 188582
Submitted by: Michael Hall
MFC after: 3 days

10 years ago- Move davidxu to the alumni section
pgj [Mon, 14 Apr 2014 06:34:08 +0000 (06:34 +0000)]
- Move davidxu to the alumni section

Approved by: core (implicit)

10 years agoFix typo in debug/log statement.
dteske [Mon, 14 Apr 2014 05:35:01 +0000 (05:35 +0000)]
Fix typo in debug/log statement.

Submitted by: Rick Miller <vmiller@hostileadmin.com>

10 years agoFix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
markj [Mon, 14 Apr 2014 00:24:04 +0000 (00:24 +0000)]
Fix some off-by-one errors. The kve_end and rdl_eaddr fields contain the
first address after the end of the map entry and should therefore be
excluded.

MFC after: 2 weeks

10 years agoEnsure that all eight syscall arguments are available to dtrace_probe(),
markj [Mon, 14 Apr 2014 00:23:18 +0000 (00:23 +0000)]
Ensure that all eight syscall arguments are available to dtrace_probe(),
rather than just the first five. This is done by calling dtrace_probe()
through a function pointer, as in illumos.

MFC after: 3 weeks

10 years agoDTrace's pid provider works by inserting breakpoint instructions at probe
markj [Mon, 14 Apr 2014 00:22:42 +0000 (00:22 +0000)]
DTrace's pid provider works by inserting breakpoint instructions at probe
sites and installing a hook at the kernel's trap handler. The fasttrap code
will emulate the overwritten instruction in some common cases, but otherwise
copies it out into some scratch space in the traced process' address space
and ensures that it's executed after returning from the trap.

In Solaris and illumos, this (per-thread) scratch space comes from some
reserved space in TLS, accessible via the fs segment register. This
approach is somewhat unappealing on FreeBSD since it would require some
modifications to rtld and jemalloc (for static TLS) to ensure that TLS is
executable, and would thus introduce dependencies on their implementation
details. I think it would also be impossible to safely trace static binaries
compiled without these modifications.

This change implements the functionality in a different way, by having
fasttrap map pages into the target process' address space on demand. Each
page is divided into 64-byte chunks for use by individual threads, and
fasttrap's process descriptor struct has been extended to keep track of
any scratch space allocated for the corresponding process.

With this change it's possible to trace all libc functions in a program,
e.g. with

  pid$target:libc.so.*::entry {@[probefunc] = count();}

Previously this would generally cause the victim process to crash, as
tracing memcpy on amd64 requires the functionality described above.

Tested by: Prashanth Kumar <pra_udupi@yahoo.co.in> (earlier version)
MFC after: 6 weeks

10 years agoImprove the i.MX53 / Digi DTS:
rpaulo [Sun, 13 Apr 2014 22:35:39 +0000 (22:35 +0000)]
Improve the i.MX53 / Digi DTS:

* Fix the IPU address.
* Fix the PATA definition.
* Add another I2C.
* Add more UARTs.
* Add SATA.

10 years agor264402 builds fine, but turns out there are problems with
imp [Sun, 13 Apr 2014 21:52:27 +0000 (21:52 +0000)]
r264402 builds fine, but turns out there are problems with
install. Back it out until they can be tracked down.

10 years agoFree buf after usage.
brueffer [Sun, 13 Apr 2014 21:23:15 +0000 (21:23 +0000)]
Free buf after usage.

CID: 1199377
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoFree resources and error cases; re-indent a curly brace while here.
brueffer [Sun, 13 Apr 2014 21:13:33 +0000 (21:13 +0000)]
Free resources and error cases; re-indent a curly brace while here.

CID: 1199366
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoAlways install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.
bdrewery [Sun, 13 Apr 2014 20:21:56 +0000 (20:21 +0000)]
Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.

This file is used by pkg(8) from ports as well. Someone may
choose to not install pkg(7) but still want to consume
official packages by building or installing pkg(8) manually.

Discussed with: bapt
MFC after: 1 day (Working on EN)

10 years agoAvoid double close() of a file descriptor.
brueffer [Sun, 13 Apr 2014 20:12:21 +0000 (20:12 +0000)]
Avoid double close() of a file descriptor.

CID: 1006089
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoAvoid double free in f_acl().
brueffer [Sun, 13 Apr 2014 19:48:51 +0000 (19:48 +0000)]
Avoid double free in f_acl().

CID: 1018508
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agorealpath(): Properly fail "." or ".." components after non-directories.
jilles [Sun, 13 Apr 2014 19:48:28 +0000 (19:48 +0000)]
realpath(): Properly fail "." or ".." components after non-directories.

If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR: kern/82980
MFC after: 2 weeks

10 years agoAdd a missing comma between error message definitions.
brueffer [Sun, 13 Apr 2014 18:51:39 +0000 (18:51 +0000)]
Add a missing comma between error message definitions.

CID: 1199266
Found with: Coverity Prevent(tm)
MFC after: 1 week

10 years agoBump Dd for r264384.
brueffer [Sun, 13 Apr 2014 18:21:53 +0000 (18:21 +0000)]
Bump Dd for r264384.

Requested by: gjb

10 years agoApparently some of the i386 boot blocks are so close to full that adding
nwhitehorn [Sun, 13 Apr 2014 14:50:52 +0000 (14:50 +0000)]
Apparently some of the i386 boot blocks are so close to full that adding
single lines to ufsread.c spills them over. Duplicate a whole bunch of
code to get file sizes into boot1.efi/boot1.c rather than modifying
ufsread.c.

10 years agoMiscellaneous fixes to tests(7).
jmmv [Sun, 13 Apr 2014 11:59:42 +0000 (11:59 +0000)]
Miscellaneous fixes to tests(7).

- Properly capitalize "FreeBSD Test Suite".
- At this point, the test suite first appeared in 10.1, not in 11.0.
- Use my FreeBSD.org address.

10 years agoAdd FreeBSD 10.1 to the list of recognized releases for Fx.
jmmv [Sun, 13 Apr 2014 11:57:51 +0000 (11:57 +0000)]
Add FreeBSD 10.1 to the list of recognized releases for Fx.

This version is already mentioned by 4 manual pages.

10 years agofind: Return normal exit status from -quit.
jilles [Sun, 13 Apr 2014 11:47:17 +0000 (11:47 +0000)]
find: Return normal exit status from -quit.

If there was an error, make the exit status reflect this even if -quit
caused the exit. Formerly, -quit always caused exit(0).

GNU find does the same.

10 years agoDocument how to install the test suite.
jmmv [Sun, 13 Apr 2014 11:35:42 +0000 (11:35 +0000)]
Document how to install the test suite.

As part of this, install the tests(7) manual page unconditionally (not only
when WITH_TESTS=yes) so that users that have not yet enabled the build of
the test suite can read details on how to do so.

10 years agoRegen after rewording of WITH_TESTS.
jmmv [Sun, 13 Apr 2014 11:31:41 +0000 (11:31 +0000)]
Regen after rewording of WITH_TESTS.

10 years agoFix test suite name in src.conf(5).
jmmv [Sun, 13 Apr 2014 11:29:52 +0000 (11:29 +0000)]
Fix test suite name in src.conf(5).

There is no such thing as the "Kyua test suite"; it is the "FreeBSD Test
Suite".

While doing this, point readers to tests(7).

10 years agoJoin CTL worker threads into one process for convenience.
mav [Sun, 13 Apr 2014 11:10:36 +0000 (11:10 +0000)]
Join CTL worker threads into one process for convenience.
Report their idle state as "-".

10 years agoReport more readable state "-" for idle CAM scan thread.
mav [Sun, 13 Apr 2014 11:08:57 +0000 (11:08 +0000)]
Report more readable state "-" for idle CAM scan thread.

10 years agoFix periph listing when IOCTL buffer border hits result for wanted bus.
mav [Sun, 13 Apr 2014 09:31:22 +0000 (09:31 +0000)]
Fix periph listing when IOCTL buffer border hits result for wanted bus.

10 years agoAdd my copyright here. Most of this is unmodified from the original sparc64
nwhitehorn [Sun, 13 Apr 2014 06:30:02 +0000 (06:30 +0000)]
Add my copyright here. Most of this is unmodified from the original sparc64
version, but at least some indication of changes that postdate the actual
invention of EFI is probably a good idea.

10 years agoFix buildworld. I had some local bits in my build tree that caused this
nwhitehorn [Sun, 13 Apr 2014 06:24:01 +0000 (06:24 +0000)]
Fix buildworld. I had some local bits in my build tree that caused this
to work by accident.

10 years agoConvert NO_MANCOMPRESS to normal convention.
imp [Sun, 13 Apr 2014 05:22:26 +0000 (05:22 +0000)]
Convert NO_MANCOMPRESS to normal convention.

10 years agoIn tree makefile shouldn't be setting policy piecemeal. Don't set
imp [Sun, 13 Apr 2014 05:22:22 +0000 (05:22 +0000)]
In tree makefile shouldn't be setting policy piecemeal. Don't set
NO_MANCOMPRESS here.

10 years agoNO_MAN= has been deprecated in favor of MAN= for some time, go ahead
imp [Sun, 13 Apr 2014 05:21:56 +0000 (05:21 +0000)]
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.

10 years agoDon't apply ctf conversions in POSIX mode. These can't happen there
imp [Sun, 13 Apr 2014 05:21:48 +0000 (05:21 +0000)]
Don't apply ctf conversions in POSIX mode. These can't happen there
because they pollute the POSIX environment, which doens't allow
for these extentions. ctf conversions are really only relevant when
used in coordination with the rest of the bsd*.mk system anyway.
Leave them in place for the normal, non-posix enviornment since
they are quite useful there.

10 years agoCheck the right file for pwcache_groupdb.
imp [Sun, 13 Apr 2014 05:21:43 +0000 (05:21 +0000)]
Check the right file for pwcache_groupdb.

10 years agoWe no longer support upgrading from FreeBSD 4, so we don't need the
imp [Sun, 13 Apr 2014 05:21:35 +0000 (05:21 +0000)]
We no longer support upgrading from FreeBSD 4, so we don't need the
NOMAN and NOSHARED defines here. They have been obsolete for almost a
decade anyway.

10 years agoUp the minimum system to build FreeBSD current to 8.0-RELEASE. The
imp [Sun, 13 Apr 2014 05:21:30 +0000 (05:21 +0000)]
Up the minimum system to build FreeBSD current to 8.0-RELEASE. The
issues with vendors that needed 7.x support have been resolved. Many
vendors are still using 8.x build platforms, however, so bumping this
up to 9.0 will have to wait until that is resolved. Actual support for
building from 8.x still relies on those vendors fixing bugs that are
present as most developers have moved onto 9.x or newer platforms.

Reviewed by: marcel@

10 years agoDetermine whether to build clang and its bootstrap tools the same
imp [Sun, 13 Apr 2014 05:21:22 +0000 (05:21 +0000)]
Determine whether to build clang and its bootstrap tools the same
way. This allows a clang bootstrap to happen, even when WITHOUT_CLANG
is defined. This is a minimal version of a more extensive change which
can be MFC'd more easily. However, we have to also test to see if
we're building clang as not cc, since the bootstrap for that needs
these cross tools and it is easier to build them in just one place.

MFC after: 1 week

10 years agoClean trailing whitespace.
gjb [Sun, 13 Apr 2014 02:03:14 +0000 (02:03 +0000)]
Clean trailing whitespace.
Add missing .El to fix formatting.

Found with: mandoc(1)
Sponsored by: The FreeBSD Foundation

10 years agoBump Dd, missed as part of r264098 and related commits.
gjb [Sun, 13 Apr 2014 01:47:15 +0000 (01:47 +0000)]
Bump Dd, missed as part of r264098 and related commits.

Sponsored by: The FreeBSD Foundation

10 years agoFix a panic in zfs_rename().
davide [Sun, 13 Apr 2014 01:15:37 +0000 (01:15 +0000)]
Fix a panic in zfs_rename().
this is due to a wrong dereference of a vnode when it's not locked and
can be (potentially) recycled. 'sdvp' cannot be locked on zfs_rename()
entry point because the VFS can't be sure that this scenario is
LOR-free (it might violate the parent->child lock acquisition rule).
Dereference 'tdvp' instead, which is already locked on entry, and access
'sdvp' fields only when it's safe, i.e. under ZFS_ENTER scope.

While at it, remove the usage of VOP_REALVP, as long as this is a NOP
on FreeBSD.

Discussed with: avg
Reviewed by: pjd