freebsd.git
9 years agoIFC @r273206
neel [Sun, 19 Oct 2014 23:05:18 +0000 (23:05 +0000)]
IFC @r273206

9 years agoDon't advertise the "OS visible workarounds" feature in cpuid.80000001H:ECX.
neel [Sun, 19 Oct 2014 21:38:58 +0000 (21:38 +0000)]
Don't advertise the "OS visible workarounds" feature in cpuid.80000001H:ECX.
bhyve doesn't emulate the MSRs needed to support this feature at this time.

Don't expose any model-specific RAS and performance monitoring features in
cpuid leaf 80000007H.

Emulate a few more MSRs for AMD: TSEG base address, TSEG address mask and
BIOS signature and P-state related MSRs.

This eliminates all the unimplemented MSRs accessed by Linux/x86_64 kernels
2.6.32, 3.10.0 and 3.17.0.

9 years agoDon't advertise support for the NodeID MSR since bhyve doesn't emulate it.
neel [Sat, 18 Oct 2014 05:39:32 +0000 (05:39 +0000)]
Don't advertise support for the NodeID MSR since bhyve doesn't emulate it.

9 years agoDon't advertise the Instruction Based Sampling feature because it requires
neel [Fri, 17 Oct 2014 06:23:04 +0000 (06:23 +0000)]
Don't advertise the Instruction Based Sampling feature because it requires
emulating a large number of MSRs.

Ignore writes to a couple more AMD-specific MSRs and return 0 on read.

This further reduces the unimplemented MSRs accessed by a Linux guest on boot.

9 years agomove linux*_locore.s and linux*_support.s to SRCS, remove the OBJS
imp [Fri, 17 Oct 2014 04:36:53 +0000 (04:36 +0000)]
move linux*_locore.s and linux*_support.s to SRCS, remove the OBJS
entry and remove now-redunant dependencies. Add assym.s to
linux*_locore.s build, as it depends on it.

With this change, linux*.ko no longer builds every time through a
KERNFAST run.

Sponsored by: Netflix

9 years agoDon't depend on @ or machine for assym.s or genassym.o. That's a
imp [Fri, 17 Oct 2014 04:36:48 +0000 (04:36 +0000)]
Don't depend on @ or machine for assym.s or genassym.o. That's a
vestige of a time when we needed to do that, but it is all handled by
beforedepend now. When we depend on the symlink, bmake will cause the
file to be rebuilt always.

With this change, dtrace.ko doesn't rebuild every time through a
KERNFAST run.

Sponsored by: Netfix

9 years agoAdd more descriptive metadata to the ISO images.
gjb [Fri, 17 Oct 2014 03:55:33 +0000 (03:55 +0000)]
Add more descriptive metadata to the ISO images.

PR:  146079
Submitted by:  Roman Bogorodskiy
MFC after:  3 days
X-MFC-10.1:  yes
Sponsored by: The FreeBSD Foundation

9 years agoHide extended PerfCtr MSRs on AMD processors by clearing bits 23, 24 and 28 in
neel [Fri, 17 Oct 2014 03:04:38 +0000 (03:04 +0000)]
Hide extended PerfCtr MSRs on AMD processors by clearing bits 23, 24 and 28 in
CPUID.80000001H:ECX.

Handle accesses to PerfCtrX and PerfEvtSelX MSRs by ignoring writes and
returning 0 on reads.

This further reduces the number of unimplemented MSRs hit by a Linux guest
during boot.

9 years agoMake the sysctl(8) for checkutf8 positively defined and improve
araujo [Fri, 17 Oct 2014 02:11:09 +0000 (02:11 +0000)]
Make the sysctl(8) for checkutf8 positively defined and improve
the description of it.

Submitted by: Ronald Klop <ronald-lists@klop.ws>
Reviewed by: rmacklem
Approved by: rmacklem
Sponsored by: QNAP Systems Inc.

9 years agoAdd support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which
hrs [Fri, 17 Oct 2014 00:31:51 +0000 (00:31 +0000)]
Add support of "/{udp,tcp,proto}" suffix into $firewall_myservices, which
interpreted the listed items as port numbers of TCP services.

A service with no suffix still works and recognized as a TCP service for
backward compatibility.  It should be updated with /tcp suffix.

PR: 194292
MFC after: 1 week

9 years agoThe igb(4) driver supports 82580, i350, i354, i210 and i211 chipsets too,
gavin [Thu, 16 Oct 2014 23:07:09 +0000 (23:07 +0000)]
The igb(4) driver supports 82580, i350, i354, i210 and i211 chipsets too,
document them.

PR: 192301
MFC after: 1 week

9 years agoRemove duplicated code.
delphij [Thu, 16 Oct 2014 22:04:07 +0000 (22:04 +0000)]
Remove duplicated code.

Suggested by: jmg

9 years agoDon't define rules based on PROGS if PROGS is empty.
markj [Thu, 16 Oct 2014 21:13:46 +0000 (21:13 +0000)]
Don't define rules based on PROGS if PROGS is empty.

Reviewed by: sjg, ngie
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd 4k quirks for PM853T Samsung SSD
sbruno [Thu, 16 Oct 2014 20:33:04 +0000 (20:33 +0000)]
Add 4k quirks for PM853T Samsung SSD

MFC after: 2 weeks
Sponsored by: Limelight Networks

9 years agoThere's no need to override the clean target. The clean target works
imp [Thu, 16 Oct 2014 20:13:16 +0000 (20:13 +0000)]
There's no need to override the clean target. The clean target works
correctly without doing so.

9 years agoAdd the Dresden Elektronik deRFnode device to uftdi(4).
joerg [Thu, 16 Oct 2014 19:53:32 +0000 (19:53 +0000)]
Add the Dresden Elektronik deRFnode device to uftdi(4).

MFC after: 1 week

9 years agofwsectors and fwheads used to be somehwat arbitrary. However, they are
imp [Thu, 16 Oct 2014 19:52:12 +0000 (19:52 +0000)]
fwsectors and fwheads used to be somehwat arbitrary. However, they are
used to align partitions in gpart. We also try to align partitions by
stripe size when creating new media. Align these two concepts by
making fwsectors the same as the stripe size. Select a sensible number
of heads so we wind up with about 20 cylinders. This number was
selected to keep the rounding effects to a few percent while keeping
the number of cylinder groups low.

Sadly, it is not possible to make these numbers match the numbers used
by SD card readers. There apperas to be much variation between brands
so there's no one universal number. These numbers are also not aligned
to the stripe size, so some performance problems may still be present
when SD cards are created this way.

Also, these numbers will differ from the far less common SD to ATA
adapters, which present a different, but more uniform, set of numbers
that also happened to match the old defaults.

Nothing should change for current users. Any suboptimal performance
caused by misalignment will still be there. gpart will honor the
partitions that aren't on proper boudnaries, but editing the partition
tables may result in different alignments being used than before when
editing things natively.

Ideally, there'd be some way to override these values in the disk
subsystem by the user for the USB adapter use case where all "native"
notions of geometry disappear. This does not implement that.

9 years agoEmulate the "Hardware Configuration" MSR when running on an AMD host.
neel [Thu, 16 Oct 2014 19:27:26 +0000 (19:27 +0000)]
Emulate the "Hardware Configuration" MSR when running on an AMD host.

This gets rid of the "TSC doesn't count with P0 frequency!" message when
booting a Linux guest.

Tested on an "AMD Opteron 6320" courtesy of Ben Perrault.

9 years agoUpdate vt(4) for UEFI defaults and special keys
emaste [Thu, 16 Oct 2014 18:49:50 +0000 (18:49 +0000)]
Update vt(4) for UEFI defaults and special keys

vt(4) is the default console for UEFI boot [1], and the bitmapped
kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
enable sysctls.

PR: 193710
Submitted by: wblock [1]
Reviewed by: wblock
MFC after: 3 days
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D953

9 years agoCorrect two typos
skreuzer [Thu, 16 Oct 2014 18:28:11 +0000 (18:28 +0000)]
Correct two typos

PR: 194350
Submitted by: jiashiun@gmail.com
Approved by: hrs (mentor)

9 years agoUse the correct fault type (VM_PROT_EXECUTE) for an instruction fetch.
neel [Thu, 16 Oct 2014 18:16:31 +0000 (18:16 +0000)]
Use the correct fault type (VM_PROT_EXECUTE) for an instruction fetch.

9 years agoFix topology enumeration issues exposed by AMD Bulldozer Family 15h processor.
neel [Thu, 16 Oct 2014 18:13:10 +0000 (18:13 +0000)]
Fix topology enumeration issues exposed by AMD Bulldozer Family 15h processor.

Initialize CPUID.80000008H:ECX[7:0] with the number of logical processors in
the package. This fixes a panic during early boot in NetBSD 7.0 BETA.

Clear the Topology Extension feature bit from CPUID.80000001H:ECX since we
don't emulate leaves 0x8000001D and 0x8000001E. This fixes a divide by zero
panic in early boot in Centos 6.4.

Tested on an "AMD Opteron 6320" courtesy of Ben Perrault.

Reviewed by: grehan

9 years agoFollow up to r225617. In order to maximize the re-usability of kernel code
davide [Thu, 16 Oct 2014 18:04:43 +0000 (18:04 +0000)]
Follow up to r225617. In order to maximize the re-usability of kernel code
in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv().
This fixes a namespace collision with libc symbols.

Submitted by:   kmacy
Tested by:      make universe

9 years agoRegenerate src.conf.5 after:
brooks [Thu, 16 Oct 2014 15:59:00 +0000 (15:59 +0000)]
Regenerate src.conf.5 after:

r273170:
  MK_ARB_EABI was removed in r272350 so remove the documentation.
r273171:
  Per r273155, HYPERV is built by default on platforms where it makes
  sense and ignored on others.
r273172:
  Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not
  just programs.

9 years agoDocument that WITHOUT_TOOLCHAIN causes headers to not be installed, not
brooks [Thu, 16 Oct 2014 15:55:13 +0000 (15:55 +0000)]
Document that WITHOUT_TOOLCHAIN causes headers to not be installed, not
just programs.

9 years agoPer r273155, HYPERV is built by default on platforms where it makes
brooks [Thu, 16 Oct 2014 15:54:23 +0000 (15:54 +0000)]
Per r273155, HYPERV is built by default on platforms where it makes
sense and ignored on others.

9 years agoMK_ARB_EABI was removed in r272350 so remove the documentation.
brooks [Thu, 16 Oct 2014 15:52:36 +0000 (15:52 +0000)]
MK_ARB_EABI was removed in r272350 so remove the documentation.

9 years agoFix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
tuexen [Thu, 16 Oct 2014 15:36:04 +0000 (15:36 +0000)]
Fix the reported streams in a SCTP_STREAM_RESET_EVENT, if a
sent incoming stream reset request was responded with failed
or denied.
Thanks to Peter Bostroem from Google for reporting the issue.

MFC after: 3 days

9 years agoAdd an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It
imp [Thu, 16 Oct 2014 14:08:59 +0000 (14:08 +0000)]
Add an "empty" Makefile.pc98 because it doesn't need/want HYPERV. It
is not relevant to the hardware it runs on.

9 years agoFix the type of pte_pa as when it is passed into _kvm_pa2off it is either
andrew [Thu, 16 Oct 2014 13:49:54 +0000 (13:49 +0000)]
Fix the type of pte_pa as when it is passed into _kvm_pa2off it is either
a uint64_t or a pointer to an off_t. With it being a u_long can result in
incorrect values being returned.

9 years agoUse lockless quota checks in qsync and qsyncvp.
mjg [Thu, 16 Oct 2014 12:41:14 +0000 (12:41 +0000)]
Use lockless quota checks in qsync and qsyncvp.

No strong objections from: kib, mckusick
MFC after: 1 week

9 years agoWhen removing an iSCSI session, check whether all conditions match,
trasz [Thu, 16 Oct 2014 09:09:43 +0000 (09:09 +0000)]
When removing an iSCSI session, check whether all conditions match,
not if any of them matches.  This fixes "iscsictl -Rn" removing
unrelated sessions.

PR: 194034
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoImplement more functional CTL debug logging.
mav [Thu, 16 Oct 2014 08:42:17 +0000 (08:42 +0000)]
Implement more functional CTL debug logging.

Setting bits in kern.cam.ctl.debug allows to log errors, commands and some
commands data respectively.

MFC after: 1 week

9 years agoFix automountd(8) not to leave zombies.
trasz [Thu, 16 Oct 2014 08:33:04 +0000 (08:33 +0000)]
Fix automountd(8) not to leave zombies.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd two sysctl(8) to enable/disable NFSv4 server to check when setting
araujo [Thu, 16 Oct 2014 02:24:19 +0000 (02:24 +0000)]
Add two sysctl(8) to enable/disable NFSv4 server to check when setting
user nobody and/or setting group nogroup as owner of a file or directory.
Usually at the client side, if there is an username that is not in the
client's passwd database, some clients will send 'nobody@<your.dns.domain>'
in the wire and the NFSv4 server will treat it as an ERROR.
However, if you have a valid user nobody in your passwd database,
the NFSv4 server will treat it as a NFSERR_BADOWNER as its believes the
client doesn't has the username mapped.

Submitted by: Loic Blot <loic.blot@unix-experience.fr>
Reviewed by: rmacklem
Approved by: rmacklem
MFC after: 2 weeks

9 years agoPrevent ZFS leaking pool free space
smh [Thu, 16 Oct 2014 02:23:27 +0000 (02:23 +0000)]
Prevent ZFS leaking pool free space

When processing async destroys ZFS would leak space every txg timeout
(5 seconds by default), if no writes occurred, until the pool is totally
full. At this point it would be unfixable without a pool recreation.

In addition if the machine was rebooted with the pool in this situation
would fail to import on boot, hanging indefinitely, as the import process
requires the ability to write data to the pool. Any attempts to query the
pool status during the hung import would not return as the import holds
the pool lock.

The only way to import such a pool would be to specify -o readonly=on
to the zpool import.

zdb -bb <pool> can be used to check for "deferred free" size which is where
this lost space will be counted.

MFC after: 3 days
Sponsored by: Multiplay

9 years agoRemove the "Unable to unwind further" message from DDB.
rpaulo [Thu, 16 Oct 2014 01:48:39 +0000 (01:48 +0000)]
Remove the "Unable to unwind further" message from DDB.

The ARM version of DDB is supposedly reliable enough making this
message benign.

9 years agoMove the adm1030 driver to the proper location, and rename it.
jhibbits [Thu, 16 Oct 2014 01:32:22 +0000 (01:32 +0000)]
Move the adm1030 driver to the proper location, and rename it.

For compatibility, 'device windtunnel' is still supported, but one should use
'device adm1030' instead, and this has been updated in GENERIC and NOTES.

9 years agoHYPERV isn't available on all architectures, but just on by default
imp [Thu, 16 Oct 2014 00:33:06 +0000 (00:33 +0000)]
HYPERV isn't available on all architectures, but just on by default
for i386/amd64. Rather, it only works on i386/amd64 and should only be
built there. Rather than change the default based on which
architecutre, do things more directly by only building it on
i386/amd64 and having it always on. This is how we handle other
options that are relevant only for a few architectures.

9 years agoSlightly improve grammar in EAGAIN description.
gavin [Wed, 15 Oct 2014 23:39:47 +0000 (23:39 +0000)]
Slightly improve grammar in EAGAIN description.

PR: 176806
Submitted by: Jeremy Chadwick
MFC after: 3 days

9 years agosh: Make parseredir() a proper function instead of an emulated nested
jilles [Wed, 15 Oct 2014 21:26:09 +0000 (21:26 +0000)]
sh: Make parseredir() a proper function instead of an emulated nested
function.

9 years agosh: Remove more gotos.
jilles [Wed, 15 Oct 2014 21:20:56 +0000 (21:20 +0000)]
sh: Remove more gotos.

9 years agoMerge OpenSSL 1.0.1j.
jkim [Wed, 15 Oct 2014 19:29:22 +0000 (19:29 +0000)]
Merge OpenSSL 1.0.1j.

Relnotes: yes

9 years agoMerge OpenSSL 1.0.1j.
jkim [Wed, 15 Oct 2014 19:12:05 +0000 (19:12 +0000)]
Merge OpenSSL 1.0.1j.

9 years agoRemove setting BIO_DONE flag for BIOs that have done() method.
mav [Wed, 15 Oct 2014 18:36:34 +0000 (18:36 +0000)]
Remove setting BIO_DONE flag for BIOs that have done() method.

This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.

MFC after: 1 week

9 years agoCorrect grammos.
schweikh [Wed, 15 Oct 2014 17:55:10 +0000 (17:55 +0000)]
Correct grammos.

MFC after: 3 weeks

9 years agoImport OpenSSL 1.0.1j.
jkim [Wed, 15 Oct 2014 17:32:57 +0000 (17:32 +0000)]
Import OpenSSL 1.0.1j.

9 years agoUpdate the OFED Linux compatibility layer and
hselasky [Wed, 15 Oct 2014 13:40:29 +0000 (13:40 +0000)]
Update the OFED Linux compatibility layer and
Mellanox hardware driver(s):

- Properly name an inclusion guard
- Fix compile warnings regarding unsigned enums
- Add two new sysctl nodes
- Remove all empty linux header files
- Make an error printout more verbose
- Use "mod_delayed_work()" instead of
  cancelling and starting a timeout.
- Implement more Linux scatterlist
  functions.

MFC after: 3 days
Sponsored by: Mellanox Technologies

9 years agoStyle changes for deadfs:
kib [Wed, 15 Oct 2014 13:22:33 +0000 (13:22 +0000)]
Style changes for deadfs:
- ANSIfy VOPs.
- Remove trivial comments.
- Remove ARGSUSED.
- Remove copies of the vop_XXX_args structure definitions in comments.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoWhen vnode bypass cannot be performed on the cdev file descriptor for
kib [Wed, 15 Oct 2014 13:16:51 +0000 (13:16 +0000)]
When vnode bypass cannot be performed on the cdev file descriptor for
read/write/poll/ioctl, call standard vnode filedescriptor fop.  This
restores the special handling for terminals by calling the deadfs VOP,
instead of always returning ENXIO for destroyed devices or revoked
terminals.

Since destroyed (and not revoked) device would use devfs_specops VOP
vector, make dead_read/write/poll non-static and fill VOP table with
pointers to the functions, to instead of VOP_PANIC.

Noted and reviewed by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoChange the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller
kib [Wed, 15 Oct 2014 13:08:53 +0000 (13:08 +0000)]
Change the deadfs poll VOP to return POLLIN|POLLRDNORM if the caller
is interested in i/o state.  Return POLLNVAL for invalid bits, similar
to poll_no_poll().  Note that POLLOUT must not be returned, since
POLLHUP is set.

Noted and reviewed by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoImplement FIODTYPE for master ptys.
kib [Wed, 15 Oct 2014 12:38:26 +0000 (12:38 +0000)]
Implement FIODTYPE for master ptys.

Requested and reviewed by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMake automountd(8) inform autofs(4) whether directory being handled can
trasz [Wed, 15 Oct 2014 09:28:45 +0000 (09:28 +0000)]
Make automountd(8) inform autofs(4) whether directory being handled can
have wildcards.  This makes it possible for autofs(4) to avoid requesting
automountd(8) action on access to nonexistent nodes - unless wildcards
are actually used.

Note that this change breaks ABI for automountd(8).

Tested by: dhw@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAs pointed out by several people, r273114 was incorrect: it unconditionally
des [Wed, 15 Oct 2014 07:35:50 +0000 (07:35 +0000)]
As pointed out by several people, r273114 was incorrect: it unconditionally
disabled everything except TLS 1.0.  Replace it with a more carefully
wrought patch:

 - Switch the default for SSLv3 from on to off
 - Add environment variables to control TLS 1.1 and 1.2
 - In verbose mode, report which version is used
 - Update the man page to reflect these changes.

MFC after: 1 week

9 years agoSilence down a warning that doesn't provide any useful information unless
trasz [Wed, 15 Oct 2014 07:09:45 +0000 (07:09 +0000)]
Silence down a warning that doesn't provide any useful information unless
debug is enabled.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd inet/inet6 to the dependency list. Without them if_gif is useless.
ae [Wed, 15 Oct 2014 06:10:33 +0000 (06:10 +0000)]
Add inet/inet6 to the dependency list. Without them if_gif is useless.

MFC after: 1 month

9 years agoDon't take devmtx unnecessarily in vn_isdisk.
mjg [Wed, 15 Oct 2014 05:17:36 +0000 (05:17 +0000)]
Don't take devmtx unnecessarily in vn_isdisk.

MFC after: 1 week

9 years agoActually hide the SVM capability by clearing CPUID.80000001H:ECX[bit 3]
neel [Wed, 15 Oct 2014 04:29:03 +0000 (04:29 +0000)]
Actually hide the SVM capability by clearing CPUID.80000001H:ECX[bit 3]
after it has been initialized by cpuid_count().

Submitted by: Anish Gupta (akgupt3@gmail.com)

9 years agoRemove a build artifact of the USDT tests.
markj [Wed, 15 Oct 2014 03:15:46 +0000 (03:15 +0000)]
Remove a build artifact of the USDT tests.

MFC after: 3 days

9 years agoDrop support for SSLv3.
des [Wed, 15 Oct 2014 02:34:26 +0000 (02:34 +0000)]
Drop support for SSLv3.

MFC after: 1 week

9 years agoAdd a sysctl to allow disabling the monitoring thread.
jhibbits [Wed, 15 Oct 2014 02:31:14 +0000 (02:31 +0000)]
Add a sysctl to allow disabling the monitoring thread.

Summary:
If a user uses powerd, or doesn't want to use the cycles monitoring, they can
now suspend the monitoring thread.

While here, reorganize the added prototypes to match existing groupings.

Reviewers: nwhitehorn, #powerpc, rpaulo

Reviewed By: #powerpc, rpaulo

Differential Revision: https://reviews.freebsd.org/D944
X-MFC-with: r273009

MFC after: 3 weeks

9 years agoSet the DROP_EN bit before the RX queue is brought up and active.
adrian [Wed, 15 Oct 2014 01:22:56 +0000 (01:22 +0000)]
Set the DROP_EN bit before the RX queue is brought up and active.

He noticed issues setting this bit in SRRCTL after the queue was up,
so doing it from the sysctl handler isn't enough and may not actually
work correctly.

This commit doesn't remove the sysctl path or try to change its
behaviour.  I'll talk with others about how to finish fixing that
before I tackle that.

PR: kern/194311
Submitted by: luigi
MFC after: 3 days
Sponsored by: Norse Corp, Inc

9 years agofiledesc: plug 2 assignments to M_ZERO-ed pointers in falloc_noinstall
mjg [Wed, 15 Oct 2014 01:16:11 +0000 (01:16 +0000)]
filedesc: plug 2 assignments to M_ZERO-ed pointers in falloc_noinstall

No functional changes.

9 years agoEmulate "POP r/m".
neel [Tue, 14 Oct 2014 21:02:33 +0000 (21:02 +0000)]
Emulate "POP r/m".

This is needed to boot OpenBSD/i386 MP kernel in bhyve.

Reported by: grehan
MFC after: 1 week

9 years agoMake automount(8)/automountd(8) treat percent sign as a valid part
trasz [Tue, 14 Oct 2014 19:55:34 +0000 (19:55 +0000)]
Make automount(8)/automountd(8) treat percent sign as a valid part
of path.  It's useful for spaces encoded as %20 as msdosfs labels.

Submitted by: glebius@
MFC after: 1 month

9 years agoUse '-e' to check if the virtio backing file has already been created.
neel [Tue, 14 Oct 2014 18:34:15 +0000 (18:34 +0000)]
Use '-e' to check if the virtio backing file has already been created.

The '-f' check works fine on a regular file but not if the backing file is
a device (e.g., /dev/md0). In this case it would print a misleading but
otherwise benign message about the backing file not being present.

Submitted by: Marcus Reid (marcus@blazingdot.com)
Discussed with: grehan

9 years agoMerge the following from ^/projects/release-vmimage:
gjb [Tue, 14 Oct 2014 15:22:46 +0000 (15:22 +0000)]
Merge the following from ^/projects/release-vmimage:
r273076, r273077, r273079, r273095:

r273076:
  Add a separate make(1) target to release/Makefile to
  build FreeBSD virtual machine disk images for use on
  the Microsoft Azure service.

  For now, this target is not directly connected to the
  build, however can be manually invoked.

  The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
  which does the heavy lifting to produce proper VHDs.
  mk-azure.sh uses a configuration file, defaulting to
  tools/azure.conf if otherwise unset.

r273077:
  Clear VM_RC_LIST.

r273079:
  Fix signal list to trigger umount(8).

r273095:
  Output an informational message when mkimg(1) runs, so it
  does not appear that the process has stopped while waiting
  for a 'y/n' response when waagent is deprovisioned.

Tested on: releng/10.1@r272876
MFC after: 3 days
X-MFC-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoMerge the following from ^/projects/release-vmimage:
gjb [Tue, 14 Oct 2014 15:03:06 +0000 (15:03 +0000)]
Merge the following from ^/projects/release-vmimage:
r272436, r272437, r272792:

r272436:
  Remove the first argument to panic(), which was initially
  intended to be the exit code, however when a non-zero exit
  code was returned to release/Makefile, this would prevent
  any remaining (and possibly successful) stages from being
  attempted.

r272437:

  If the vm-base target fails, prevent the vm-image target
  from being run since it cannot possibly succeed.

r272792:

  Add /usr/local/bin and /usr/local/sbin to PATH, needed
  if third-party software needs to use utilities outside
  of the base system during post-install stages (indexinfo
  is one culprit).

MFC after: 3 days
X-MFC-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoopt_mrouting.h isn't needed anymore.
ae [Tue, 14 Oct 2014 14:52:39 +0000 (14:52 +0000)]
opt_mrouting.h isn't needed anymore.

MFC after: 1 month

9 years agoAdd more ifdefs. SIOC*_IN6 are defined only with INET6.
ae [Tue, 14 Oct 2014 14:51:27 +0000 (14:51 +0000)]
Add more ifdefs. SIOC*_IN6 are defined only with INET6.

MFC after: 1 month
Reported  by: bz

9 years agoMove memset under ifdef INET6.
ae [Tue, 14 Oct 2014 14:41:06 +0000 (14:41 +0000)]
Move memset under ifdef INET6.

MFH: 1 month
Reported by: bz

9 years agoUncomment general options from the Pandaboard config. These are in other
andrew [Tue, 14 Oct 2014 14:32:58 +0000 (14:32 +0000)]
Uncomment general options from the Pandaboard config. These are in other
configs and there is no reason for them not to be here.

9 years agoAdd support for the __aeabi_c*cmp* functions. These are similar to the
andrew [Tue, 14 Oct 2014 14:27:51 +0000 (14:27 +0000)]
Add support for the __aeabi_c*cmp* functions. These are similar to the
existing functions with the exception they use the condition flags to
store the result.

Differential Revision: https://reviews.freebsd.org/D872
Silence from: current@ and numerics@
MFC after: 1 week

9 years agoOverhaul if_gif(4):
ae [Tue, 14 Oct 2014 13:31:47 +0000 (13:31 +0000)]
Overhaul if_gif(4):
 o convert to if_transmit;
 o use rmlock to protect access to gif_softc;
 o use sx lock to protect from concurrent ioctls;
 o remove a lot of unneeded and duplicated code;
 o remove cached route support (it won't work with concurrent io);
 o style fixes.

Reviewed by: melifaro
Obtained from: Yandex LLC
MFC after: 1 month
Sponsored by: Yandex LLC

9 years agoMake the ti_padstate_devmap arrays ststic, they are only used with the
andrew [Tue, 14 Oct 2014 13:24:25 +0000 (13:24 +0000)]
Make the ti_padstate_devmap arrays ststic, they are only used with the
file where they are defined.

9 years agoNew sentence -> new line; use macros where appropriate.
brueffer [Tue, 14 Oct 2014 12:29:24 +0000 (12:29 +0000)]
New sentence -> new line; use macros where appropriate.

9 years agoAdd a separate make(1) target to release/Makefile to
gjb [Tue, 14 Oct 2014 11:48:28 +0000 (11:48 +0000)]
Add a separate make(1) target to release/Makefile to
build FreeBSD virtual machine disk images for use on
the Microsoft Azure service.

For now, this target is not directly connected to the
build, however can be manually invoked.

The 'vm-azure' target invokes {amd64,i386}/mk-azure.sh,
which does the heavy lifting to produce proper VHDs.
mk-azure.sh uses a configuration file, defaulting to
tools/azure.conf if otherwise unset.

Sponsored by: The FreeBSD Foundation

9 years agoRemove couple Copan's vendor-specific mode pages.
mav [Tue, 14 Oct 2014 11:28:25 +0000 (11:28 +0000)]
Remove couple Copan's vendor-specific mode pages.

Those pages are highly system-/hardware-specific, the code is incomplete,
and so they hardly can be useful for anybody else.

9 years agoRevert r272793, r272794, r272795:
gjb [Tue, 14 Oct 2014 11:20:08 +0000 (11:20 +0000)]
Revert r272793, r272794, r272795:

  Remove implementation of vm_prebuild_setup(),
  vm_setup(), and vm_postbuild_setup().

  It does not scale well, and I am not happy with
  their implementation.

Sponsored by: The FreeBSD Foundation

9 years agoSome groundwork for later Informational Exceptions support.
mav [Tue, 14 Oct 2014 10:14:14 +0000 (10:14 +0000)]
Some groundwork for later Informational Exceptions support.

This includes support for:
 - Read-Write Error Recovery mode page;
 - Informational Exceptions Control mode page;
 - Logical Block Provisioning mode page;
 - LOG SENSE command.

No real Informational Exceptions features yet. This is only a placeholder.

Sponsored by: iXsystems, Inc.

9 years agoAdd LBPERE mode bit definition.
mav [Tue, 14 Oct 2014 08:30:02 +0000 (08:30 +0000)]
Add LBPERE mode bit definition.

9 years agoIFC @r273066
neel [Tue, 14 Oct 2014 03:39:31 +0000 (03:39 +0000)]
IFC @r273066

9 years agoRename awk(1) implementation of GNU awk's built-in asorti() function to
dteske [Tue, 14 Oct 2014 03:22:37 +0000 (03:22 +0000)]
Rename awk(1) implementation of GNU awk's built-in asorti() function to
prevent fatal conflict should one-true-awk ever be replaced -- e.g., in
an appliance -- with GNU awk. NB: Renamed my implementation to _asorti()

MFC after: 3 days
X-MFC-to: stable/10, stable/9

9 years agoFix awk(1) asorti() implementation to work when called in a loop.
dteske [Tue, 14 Oct 2014 03:11:46 +0000 (03:11 +0000)]
Fix awk(1) asorti() implementation to work when called in a loop.

MFC after: 3 days
X-MFC-to: stable/10, stable/9

9 years agoImport patch from libc++ r197313 which allows using libc++ headers with gcc
bapt [Mon, 13 Oct 2014 22:30:08 +0000 (22:30 +0000)]
Import patch from libc++ r197313 which allows using libc++ headers with gcc

Differential Revision: https://reviews.freebsd.org/D942
Reviewed by: imp

9 years agoPromote libevent to lib/ level and fold ftp-proxy into its parent Makefile.
delphij [Mon, 13 Oct 2014 22:15:26 +0000 (22:15 +0000)]
Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile.
This allows us to use libevent for other application in the future.

For now libevent is still INTERNALLIB and no shared library is installed.

MFC after: 1 month

9 years agoBump .Dd
sbruno [Mon, 13 Oct 2014 21:08:27 +0000 (21:08 +0000)]
Bump .Dd

Submitted by: gjb
MFC after: 2 weeks
Relnotes: yes

9 years agoHandle small file case with regards to plpmtud blackhole detection.
sbruno [Mon, 13 Oct 2014 21:06:21 +0000 (21:06 +0000)]
Handle small file case with regards to plpmtud blackhole detection.

Submitted by: Mikhail <mp@lenta.ru>
MFC after: 2 weeks
Relnotes: yes

9 years agoCatch ipv6 case when attempting to do PLPMTUD blackhole detection.
sbruno [Mon, 13 Oct 2014 21:05:29 +0000 (21:05 +0000)]
Catch ipv6 case when attempting to do PLPMTUD blackhole detection.

Submitted by: Mikhail <mp@lenta.ru>
MFC after: 2 weeks
Relnotes: yes

9 years agoUpdate tcp(4) with plpmtud blackhole sysctls
sbruno [Mon, 13 Oct 2014 21:04:14 +0000 (21:04 +0000)]
Update tcp(4) with plpmtud blackhole sysctls

Submitted by: Mikhail <mp@lenta.ru>
MFC after: 2 weeks
Relnotes: yes

9 years agoUse write_psize instead of write_asize when doing vdev_space_update.
delphij [Mon, 13 Oct 2014 20:39:51 +0000 (20:39 +0000)]
Use write_psize instead of write_asize when doing vdev_space_update.
Without this change the accounting of L2ARC usage would be wrong and
give 16EB free space because the number became negative and overflows.

Obtained from: FreeNAS (issue #6239)
MFC after: 2 weeks

9 years agoFix compiler locking diagnostic warnings.
hselasky [Mon, 13 Oct 2014 19:05:18 +0000 (19:05 +0000)]
Fix compiler locking diagnostic warnings.

PR: 194289

9 years agoRepair build of tools/ath/athalq and define missing value len.
sbruno [Mon, 13 Oct 2014 16:48:01 +0000 (16:48 +0000)]
Repair build of tools/ath/athalq and define missing value len.

Reviewed by: adrian

9 years agoMove the sdhci option to files.ti, it's common to both SoCs.
andrew [Mon, 13 Oct 2014 16:40:40 +0000 (16:40 +0000)]
Move the sdhci option to files.ti, it's common to both SoCs.

9 years agoRemove the omap3 directory that should have happened in r273041.
andrew [Mon, 13 Oct 2014 16:37:34 +0000 (16:37 +0000)]
Remove the omap3 directory that should have happened in r273041.

9 years agoDecode the arguments passed to _umtx_op(). In particular, decode the
jhb [Mon, 13 Oct 2014 16:37:06 +0000 (16:37 +0000)]
Decode the arguments passed to _umtx_op().  In particular, decode the
opcode.

MFC after: 1 week
Sponsored by: Norse

9 years agoUse a switch on ti_chip() to find which SoC we are on. This allow us t
andrew [Mon, 13 Oct 2014 16:33:08 +0000 (16:33 +0000)]
Use a switch on ti_chip() to find which SoC we are on. This allow us t
only enable support for the SoCs we are built for.

9 years agoUse the C99 flexible array construct to denote a variable amount of
imp [Mon, 13 Oct 2014 16:23:58 +0000 (16:23 +0000)]
Use the C99 flexible array construct to denote a variable amount of
data rather than the old-school [1] construct. We have required c99
compilers for some time.

9 years agoclass, subclass and progif were never used, so don't bother setting
imp [Mon, 13 Oct 2014 16:23:51 +0000 (16:23 +0000)]
class, subclass and progif were never used, so don't bother setting
them.

9 years agoRemove ti_mmchs.c, it has been replaced by ti_sdhci.c.
andrew [Mon, 13 Oct 2014 16:20:04 +0000 (16:20 +0000)]
Remove ti_mmchs.c, it has been replaced by ti_sdhci.c.