]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoSimplify vntype_to_kinfo() by returning when the desired value is found
jhb [Fri, 12 Sep 2014 20:56:09 +0000 (20:56 +0000)]
Simplify vntype_to_kinfo() by returning when the desired value is found
instead of breaking out of the loop and then immediately checking the loop
index so that if it was broken out of the proper value can be returned.

While here, use nitems().

9 years agoFix 'function declaration isn't a prototype' warning.
ray [Fri, 12 Sep 2014 20:55:17 +0000 (20:55 +0000)]
Fix 'function declaration isn't a prototype' warning.

Pointed by: ian
MFC after: 1 week

9 years ago- Don't let rman_reserve_resource() activate the resource in
jhb [Fri, 12 Sep 2014 20:34:19 +0000 (20:34 +0000)]
- Don't let rman_reserve_resource() activate the resource in
  nexus_alloc_resource() and don't set a bushandle.
  nexus_activate_resource() will set a proper bushandle.
- Implement a proper nexus_release_resource().
- Fix ixppcib_activate_resource() to call rman_activate_resource()
  before creating a mapping for the resource.

Tested by: jmg

9 years agoFix duplicate PKG_ABI in the PKG_CACHEDIR path.
gjb [Fri, 12 Sep 2014 20:16:55 +0000 (20:16 +0000)]
Fix duplicate PKG_ABI in the PKG_CACHEDIR path.

MFC after: 3 days
X-MFC-With: r271480
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for adding empty partition entries. I.e. skip partition
marcel [Fri, 12 Sep 2014 20:05:08 +0000 (20:05 +0000)]
Add support for adding empty partition entries. I.e. skip partition
numbers or names. This gives more control over the actual layout and
helps to construct BSD disklabels with /usr or /var at dedicated
partitions.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days
Relnotes: yes

9 years agoSet PKG_CACHEDIR to an 'All/' directory one level lower
gjb [Fri, 12 Sep 2014 18:52:01 +0000 (18:52 +0000)]
Set PKG_CACHEDIR to an 'All/' directory one level lower
to fix 'pkg repo' generating repository metadata for the
on-disc packages.

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

9 years agoAdd support for serial and null console to UEFI boot loader.
ambrisko [Fri, 12 Sep 2014 17:32:28 +0000 (17:32 +0000)]
Add support for serial and null console to UEFI boot loader.

9 years agoExtra space from r271467.
pfg [Fri, 12 Sep 2014 15:54:18 +0000 (15:54 +0000)]
Extra space from r271467.

MFC after: 2 months

9 years agoext2fs: add ext2_getpages().
pfg [Fri, 12 Sep 2014 15:49:21 +0000 (15:49 +0000)]
ext2fs: add ext2_getpages().

Literally copy/pasted from ffs_getpages().

Tested with: fsx
MFC after: 2 months

9 years agoFix stray char on paste.
ray [Fri, 12 Sep 2014 14:17:09 +0000 (14:17 +0000)]
Fix stray char on paste.

Tested by: dumbbell and me
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:16:10 +0000 (14:16 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
(forgetted in last commit)

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:14:50 +0000 (14:14 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoRemove stray whitespaces.
ray [Fri, 12 Sep 2014 14:07:20 +0000 (14:07 +0000)]
Remove stray whitespaces.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 12:04:51 +0000 (12:04 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agoFix ACL tests to correctly work with ZFS; previous version used wrong
trasz [Fri, 12 Sep 2014 09:50:32 +0000 (09:50 +0000)]
Fix ACL tests to correctly work with ZFS; previous version used wrong
paths.

PR: 191545
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years ago- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
glebius [Fri, 12 Sep 2014 08:39:15 +0000 (08:39 +0000)]
- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
- Use the new lock to protect against simultaneous DIOCSTART and/or
  DIOCSTOP ioctls.

Reported & tested by: jmallett
Sponsored by: Nginx, Inc.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 08:37:21 +0000 (08:37 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years ago- Fix argument list after 271387.
glebius [Fri, 12 Sep 2014 08:33:53 +0000 (08:33 +0000)]
- Fix argument list after 271387.
- While here fix typo.

Submitted by: markj

9 years agoAdd forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.
se [Fri, 12 Sep 2014 06:23:57 +0000 (06:23 +0000)]
Add forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.

Obtained from: thierry
MFC after: 3 days

9 years agoOptimize the common case of injecting an interrupt into a vcpu after a HLT
neel [Fri, 12 Sep 2014 06:15:20 +0000 (06:15 +0000)]
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow. The hypervisor is done
"executing" the HLT and by definition this moves the vcpu out of the
1-instruction interrupt shadow.

Prior to this change the interrupt would be held pending because the VMCS
guest-interruptibility-state would indicate that "blocking by STI" was in
effect. This resulted in an unnecessary round trip into the guest before
the pending interrupt could be injected.

Reviewed by: grehan

9 years agocxgbe(4): knobs to enable/disable PAUSE frame based flow control.
np [Fri, 12 Sep 2014 05:25:56 +0000 (05:25 +0000)]
cxgbe(4): knobs to enable/disable PAUSE frame based flow control.

MFC after: 1 week

9 years agoBe compatible with boot code that starts right after the disk label in
marcel [Fri, 12 Sep 2014 04:15:35 +0000 (04:15 +0000)]
Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
 after the disklabel in the 2nd sector for boot code.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days

9 years agoFix checksum calculation:
marcel [Fri, 12 Sep 2014 03:54:16 +0000 (03:54 +0000)]
Fix checksum calculation:
1.  Iterate over all partitions counted in the label, which can be more
    than the number of partitions given to mkimg(1).
2.  Start the checksum from the beginning of the label; not the beginning
    of the bootarea.

Tested with bsdlabel(8).

MFC after: 3 days

9 years agoAttach the ISO to an ahci-cd emulated device. The
rodrigc [Fri, 12 Sep 2014 02:38:10 +0000 (02:38 +0000)]
Attach the ISO to an ahci-cd emulated device.  The
ISO will appear to be mounted on a /dev/cd device
instead of /dev/vtbd.  This is similar to how other
virtualization environments handle mounting ISO images.

Reviewed by: neel

9 years agoFix minor syntax error
allanjude [Fri, 12 Sep 2014 00:55:42 +0000 (00:55 +0000)]
Fix minor syntax error

Submitted by: bjk
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoImprove markup and language throughout the ctl.conf man page
allanjude [Fri, 12 Sep 2014 00:08:19 +0000 (00:08 +0000)]
Improve markup and language throughout the ctl.conf man page

Reviewed by: trasz
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

9 years agoAdd support for Extended INQUIRY Data (0x86) VPD page.
mav [Thu, 11 Sep 2014 22:40:11 +0000 (22:40 +0000)]
Add support for Extended INQUIRY Data (0x86) VPD page.

9 years agoAdd device name used in geom_map verbose output. This helps when using
sbruno [Thu, 11 Sep 2014 22:39:27 +0000 (22:39 +0000)]
Add device name used in geom_map verbose output.  This helps when using
geom_map with multiple flash/spi devices.

Phabric:  https://reviews.freebsd.org/D766
Reviewed by: adrian
MFC after: 2 weeks

9 years agoInitialize 'bc_rdonly' to the right value.
neel [Thu, 11 Sep 2014 21:15:20 +0000 (21:15 +0000)]
Initialize 'bc_rdonly' to the right value.

Note that independent of this change a readonly disk file would still be
opened O_RDONLY and protected from writes by the guest.

Reviewed by: grehan

9 years agoRevisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
asomers [Thu, 11 Sep 2014 20:21:03 +0000 (20:21 +0000)]
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
ifa_ifwithdstaddr. For the sake of backwards compatibility, the new
arguments were added to new functions named ifa_ifwithnet_fib and
ifa_ifwithdstaddr_fib, while the old functions became wrappers around the
new ones that passed RT_ALL_FIBS for the fib argument. However, the
backwards compatibility is not desired for FreeBSD 11, because there are
numerous other incompatible changes to the ifnet(9) API. We therefore
decided to remove it from head but leave it in place for stable/9 and
stable/10. In addition, this commit adds the fib argument to
ifa_ifwithbroadaddr for consistency's sake.

sys/sys/param.h
Increment __FreeBSD_version

sys/net/if.c
sys/net/if_var.h
sys/net/route.c
Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib
versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute.

sys/net/route.c
sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_options.c
sys/netinet/ip_output.c
sys/netinet6/nd6.c
Fixup calls of modified functions.

share/man/man9/ifnet.9
Document changed API.

CR: https://reviews.freebsd.org/D458
MFC after: Never
Sponsored by: Spectra Logic

9 years agoDon't blindly assume the target agreed to transition to Full Feature Phase;
trasz [Thu, 11 Sep 2014 20:01:57 +0000 (20:01 +0000)]
Don't blindly assume the target agreed to transition to Full Feature Phase;
if we got a Login Response PDU without the "T" bit set, try again with
an empty request.  This fixes interoperability with COMSTAR.

Reviewed by: mav@
Tested by: mav@
MFC after: 1 week

9 years agoFix typo.
trasz [Thu, 11 Sep 2014 19:54:30 +0000 (19:54 +0000)]
Fix typo.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoUpdate motd, clarifying the information and adding pointers to other
wblock [Thu, 11 Sep 2014 18:24:16 +0000 (18:24 +0000)]
Update motd, clarifying the information and adding pointers to other
resources.

MFC after: 3 days

9 years agoAdd clang patch corresponding to r271432
emaste [Thu, 11 Sep 2014 18:20:49 +0000 (18:20 +0000)]
Add clang patch corresponding to r271432

9 years agoMerge upstream Clang rev 205331 debuginfo crash fix:
emaste [Thu, 11 Sep 2014 18:19:08 +0000 (18:19 +0000)]
Merge upstream Clang rev 205331 debuginfo crash fix:

    Debug info: fix a crash when emitting IndirectFieldDecls, which were
    previously not handled at all.
    rdar://problem/16348575

MFC after: 1 week
Sponsored by: DARPA, AFRL

9 years agoAdd Reset Manager driver. This driver provides generic way to reset
br [Thu, 11 Sep 2014 18:12:28 +0000 (18:12 +0000)]
Add Reset Manager driver. This driver provides generic way to reset
and provides sysctl tunables for enable/disable FPGA<->HPS bridges.

Sponsored by: DARPA, AFRL

9 years agoPersist vdev_resilver_txg changes to avoid panic caused by validation
smh [Thu, 11 Sep 2014 16:21:51 +0000 (16:21 +0000)]
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.

MFC after: 1 week

9 years agoAdd const qualifier to in6_addrhash() function.
ae [Thu, 11 Sep 2014 13:18:41 +0000 (13:18 +0000)]
Add const qualifier to in6_addrhash() function.
Add in6ifa_ifwithaddr() function. It is similar to ifa_ifwithaddr,
but does fast lookup in the hash of inet6 addresses.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years ago* use M_ZERO flag with malloc instead of explicit zeroing.
ae [Thu, 11 Sep 2014 12:54:17 +0000 (12:54 +0000)]
* use M_ZERO flag with malloc instead of explicit zeroing.
* remove MULTI_SCOPE ifdef.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoIntroduce new scope related functions.
ae [Thu, 11 Sep 2014 12:33:37 +0000 (12:33 +0000)]
Introduce new scope related functions.

* new macro to remove magic number - IPV6_ADDR_SCOPES_COUNT;
* sa6_checkzone() - this function checks sockaddr_in6 structure
  for correctness of sin6_scope_id. It also can fill correct
  value sometimes.
* in6_getscopezone() - this function returns scope zone id for
  specified interface and scope.
* in6_getlinkifnet() - this function returns struct ifnet for
  corresponding zone id of link-local scope.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years ago- Add $netif_ipexpand_max to specify the upper limit for the number of
hrs [Thu, 11 Sep 2014 12:30:29 +0000 (12:30 +0000)]
- Add $netif_ipexpand_max to specify the upper limit for the number of
  addresses generated by an address range specification.  The default
  value is 2048.  This can be increased by setting $netif_ipexpand_max
  in rc.conf.

- Fix warning messages when an address range spec exceeds the upper limit.

PR: 186841

9 years agoRename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the
andrew [Thu, 11 Sep 2014 10:53:57 +0000 (10:53 +0000)]
Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the
other architectures with this function.

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

9 years ago* constify argument of in6_addrscope();
ae [Thu, 11 Sep 2014 10:27:59 +0000 (10:27 +0000)]
* constify argument of in6_addrscope();
* use IN6_IS_ADDR_XXX() macro instead of hardcoded values;
* for multicast addresses just return scope value, the only exception
  is addresses with 0x0F scope value (RFC 4291 p2.7.0);

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoAdd new a M_START() mbuf macro that returns a pointer to the start of
rwatson [Thu, 11 Sep 2014 07:16:15 +0000 (07:16 +0000)]
Add new a M_START() mbuf macro that returns a pointer to the start of
an mbuf's storage (internal or external).

Add a new M_SIZE() mbuf macro that returns the size of an mbuf's
storage (internal or external).

These contrast with m_data and m_len, which are with respect to data
in the buffer, rather than the buffer itself.

Rewrite M_LEADINGSPACE() and M_TRAILINGSPACE() in terms of M_START()
and M_SIZE().

This is done as we currently have many instances of using mbuf flags
to generate pointers or lengths for internal storage in header and
regular mbufs, as well as to external storage. Rather than replicate
this logic throughout the network stack, centralising the
implementation will make it easier for us to refine mbuf storage.
This should also help reduce bugs by limiting the amount of
mbuf-type-specific pointer arithmetic.  Followup changes will
propagate use of the macros throughout the stack.

M_SIZE() conflicts with one macro in the Chelsio driver; rename that
macro in a slightly unsatisfying way to eliminate the collision.

MFC after: 3 days
Obtained from: jeff (with enhancements)
Sponsored by: EMC / Isilon Storage Division
Reviewed by: bz, glebius, np
Differential Revision: https://reviews.freebsd.org/D753

9 years agoSince r270929 raw sockets expect network byte order.
glebius [Thu, 11 Sep 2014 05:48:39 +0000 (05:48 +0000)]
Since r270929 raw sockets expect network byte order.

Submitted by: avg

9 years agoUpdate a stale comment.
alc [Thu, 11 Sep 2014 03:16:57 +0000 (03:16 +0000)]
Update a stale comment.

9 years agoUse the linker to perform relocations in the SUNW_dof section rather than
markj [Thu, 11 Sep 2014 01:04:56 +0000 (01:04 +0000)]
Use the linker to perform relocations in the SUNW_dof section rather than
doing them in drti during startup. This fixes a number of problems with
using USDT probes in stripped executables and shared libraries, and with
USDT probes in static functions.

Reviewed by: rpaulo
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
Phabric:  D751

9 years agoFix a bug which could break extended attributes in a dump output.
hrs [Wed, 10 Sep 2014 22:37:20 +0000 (22:37 +0000)]
Fix a bug which could break extended attributes in a dump output.
This occurred when a file was >892kB long and had a large data (>1kB)
in the extended attributes.

Reported by: Masashi Toriumi
Reviewed by: mckusick

9 years agoFix header output when -P is specified and (ncpus - 1) != maxid.
hrs [Wed, 10 Sep 2014 22:34:08 +0000 (22:34 +0000)]
Fix header output when -P is specified and (ncpus - 1) != maxid.

Reported by: Hiroaki Shimizu
PR: 152738

9 years agoMFamd64: Use initializecpu() to set various model-specific registers on
jhb [Wed, 10 Sep 2014 21:37:47 +0000 (21:37 +0000)]
MFamd64: Use initializecpu() to set various model-specific registers on
AP startup and AP resume (it was already used for BSP startup and BSP
resume).
- Split code to do one-time probing of cache properties out of
  initializecpu() and into initializecpucache().  This is called once on
  the BSP during boot.
- Move enable_sse() into initializecpu().
- Call initializecpu() for AP startup instead of enable_sse() and
  manually frobbing MSR_EFER to enable PG_NX.
- Call initializecpu() when an AP resumes.  In theory this will now
  properly re-enable PG_NX in MSR_EFER when resuming a PAE kernel on
  APs.

9 years agoTo workaround an errata on certain Pentium Pro CPUs, i386 disables
jhb [Wed, 10 Sep 2014 21:25:54 +0000 (21:25 +0000)]
To workaround an errata on certain Pentium Pro CPUs, i386 disables
the local APIC in initializecpu() and re-enables it if the APIC code
decides to use the local APIC after all.  Rework this workaround
slightly so that initializecpu() won't re-disable the local APIC if
it is called after the APIC code re-enables the local APIC.

9 years agoExtend UNMAP blacklist on all STEC SSD models.
mav [Wed, 10 Sep 2014 21:24:15 +0000 (21:24 +0000)]
Extend UNMAP blacklist on all STEC SSD models.

None of existing STEC devices need UNMAP or even support it well, having
many limitations and even hanging sometimes executing those commands.
New devices that may use UNMAP going to be released under HGST name.

MFC after: 3 days

9 years agoAdd support for calling pcibios routines from the
imp [Wed, 10 Sep 2014 21:07:00 +0000 (21:07 +0000)]
Add support for calling pcibios routines from the
bootloader. Implement the following routines:
pcibios-device-count count the number of instances of a devid
pcibios-read-config read pci config space
pcibios-write-config write pci config space
pcibios-find-devclass find the nth device with a given devclass
pcibios-find-device find the nth device with a given devid
pcibios-locator convert bus device function ti pcibios locator
These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More
informaiton, such as it is, can be found in the standard.

Export a nunmber of pcibios.X variables into the environment to report
what the PCI IDENTIFY command returned.

Also implmenet a new command line primitive (pci-device-count), but don't
include it by default just yet, since it depends on the recently added
words and any errors here can render a system unbootable.

This is intended to allow the boot loader to do special things based
on the hardware it finds. This could be have special settings that are
optimized for the specific cards, or even loading special drivers. It
goes without saying that writing to pci config space should not be
done without a just cause and a sound mind.

Sponsored by: Netflix

9 years agoMove code to set various MSRs on AMD cpus out of printcpuinfo() and
jhb [Wed, 10 Sep 2014 21:04:44 +0000 (21:04 +0000)]
Move code to set various MSRs on AMD cpus out of printcpuinfo() and
into initalizecpu() instead.

9 years agoAdd PCI ID for Promise TX8660 8-port 3Gbps HBA.
mav [Wed, 10 Sep 2014 19:53:31 +0000 (19:53 +0000)]
Add PCI ID for Promise TX8660 8-port 3Gbps HBA.

This device reports RAID subclass, but appears to be AHCI compatible.

Submitted by: Yuri Perejilin <yuri@rivera.ru>
MFC after: 1 week

9 years agoRegen after 271401.
asomers [Wed, 10 Sep 2014 19:22:14 +0000 (19:22 +0000)]
Regen after 271401.

Sponsored by: Spectra Logic

9 years agoConditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
asomers [Wed, 10 Sep 2014 19:00:17 +0000 (19:00 +0000)]
Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.

CR: https://reviews.freebsd.org/D691
MFC after: 1 week
Sponsored by: Spectra Logic

9 years agoAdd scope zone id to the in_endpoints and hc_metrics structures.
ae [Wed, 10 Sep 2014 16:26:18 +0000 (16:26 +0000)]
Add scope zone id to the in_endpoints and hc_metrics structures.

A non-global IPv6 address can be used in more than one zone of the same
scope. This zone index is used to identify to which zone a non-global
address belongs.

Also we can have many foreign hosts with equal non-global addresses,
but from different zones. So, they can have different metrics in the
host cache.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoUnify interrupts bit definition and usage. While here remove PSR_C_bit.
andrew [Wed, 10 Sep 2014 15:25:15 +0000 (15:25 +0000)]
Unify interrupts bit definition and usage. While here remove PSR_C_bit.

Submitted by: Svatopluk Kraus <onwahe at gmail.com>,
Michal Meloun <meloun at miracle.cz>
Differential Revision: https://reviews.freebsd.org/D754

9 years agoAbort the create_socket test if socket creation fails.
asomers [Wed, 10 Sep 2014 14:57:26 +0000 (14:57 +0000)]
Abort the create_socket test if socket creation fails.

MFC after: 1 week
Reported by: Coverity
CID: 1232756

9 years agoAdd additional checks for IPV6_PKTINFO handling (RFC 3542):
ae [Wed, 10 Sep 2014 14:32:07 +0000 (14:32 +0000)]
Add additional checks for IPV6_PKTINFO handling (RFC 3542):

* Return ENETDOWN when interface specified by ipi6_ifindex is not
  enabled for IPv6 use.
* Return EADDRNOTAVAIL when ipi6_ifindex specifies an interface, but the
  address ipi6_addr is not available for use on that interface.
* Return EINVAL when ipi6_addr is multicast address.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoMake sure we handle less than zero timeouts in iSCSI initiator and target
trasz [Wed, 10 Sep 2014 14:04:10 +0000 (14:04 +0000)]
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by: The FreeBSD Foundation

9 years agoAdd more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE
andrew [Wed, 10 Sep 2014 13:38:52 +0000 (13:38 +0000)]
Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE
from asm.h as they were already defined in armreg.h.

Submitted by: Michal Meloun <meloun at miracle.cz>

9 years agoMake it possible to disable NOP-In PDUs by the iSCSI initiator by setting
trasz [Wed, 10 Sep 2014 13:34:27 +0000 (13:34 +0000)]
Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting
kern.cam.ctl.iscsi.ping_timeout to 0.  This fixes interoperability with
some initiators that don't properly support NOP-Ins, namely iPXE/gPXE.

Submitted by: Chen Wen <pokkys@gmail.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoMake in6_pcblookup_hash_locked and in6_pcbladdr static.
ae [Wed, 10 Sep 2014 13:17:35 +0000 (13:17 +0000)]
Make in6_pcblookup_hash_locked and in6_pcbladdr static.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

9 years agoStop accessing the saved stack pointer by looking past the end of the
andrew [Wed, 10 Sep 2014 13:07:01 +0000 (13:07 +0000)]
Stop accessing the saved stack pointer by looking past the end of the
array of registers.

Submitted by: Michal Meloun <meloun at miracle.cz>

9 years agoRemove unused arguments for VOP_GETPAGES(), VOP_PUTPAGES().
glebius [Wed, 10 Sep 2014 12:36:41 +0000 (12:36 +0000)]
Remove unused arguments for VOP_GETPAGES(), VOP_PUTPAGES().

9 years agoIntroduce INP6_PCBHASHKEY macro. Replace usage of hardcoded part of
ae [Wed, 10 Sep 2014 12:35:42 +0000 (12:35 +0000)]
Introduce INP6_PCBHASHKEY macro. Replace usage of hardcoded part of
IPv6 address as hash key in all places.

Obtained from: Yandex LLC

9 years agoFix one more spelling mistake.
ray [Wed, 10 Sep 2014 11:48:13 +0000 (11:48 +0000)]
Fix one more spelling mistake.

Pointed by: danfe

9 years agospelling fixes
ray [Wed, 10 Sep 2014 11:27:33 +0000 (11:27 +0000)]
spelling fixes

Submitted by: "Sam Fourman Jr." <sfourman@gmail.com>
MFC after: 1 week

9 years agoo Add sysctls to enable/disable potentially dengerous key combinations, like
ray [Wed, 10 Sep 2014 11:13:13 +0000 (11:13 +0000)]
o Add sysctls to enable/disable potentially dengerous key combinations, like
        reboot/halt/debug.
o Add support for most key combinations supported by syscons(4).

Reviewed by: dumbbell, emaste (prev revision of D747)
MFC after: 5 days
Sponsored by: The FreeBSD Foundation

9 years agoMove if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM
andrew [Wed, 10 Sep 2014 10:59:17 +0000 (10:59 +0000)]
Move if_smc_fdt.c to live in sys/dev/smc. It's not specific to the ARM
Versatile hardware.

9 years agoReplace local copy-and-paste implementations of printmbuf() in several
rwatson [Wed, 10 Sep 2014 09:57:32 +0000 (09:57 +0000)]
Replace local copy-and-paste implementations of printmbuf() in several
device drivers with calls to the centralised m_print() implementation.
While the formatting and output details differ a little, the content
is essentially the same, and it is unlikely anyone has used this
debugging output in some time.

This change reduces awareness of mbuf cluster allocation (and,
especially, the M_EXT flag) outside of the mbuf allocator, which will
make it easier to refine the external storage mechanism without
disrupting drivers in the future.

Style bugs are preserved.

Reviewed by: bz, glebius
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoFix memory leak, reported by Coverity.
mav [Wed, 10 Sep 2014 08:06:31 +0000 (08:06 +0000)]
Fix memory leak, reported by Coverity.

CID: 1229996

9 years agoRemove many false positives with make checkdpadd
ngie [Wed, 10 Sep 2014 07:55:51 +0000 (07:55 +0000)]
Remove many false positives with make checkdpadd

- Reduce DPADD and LDADD in checkdpadd to -l<foo>
- Skip over -Wl,[es]*-group because -Wl,--end-group and
  -Wl,--start-group might be required to properly link objects (see
  usr.bin/clang/lldb as an example)

This caveat has been present for a while with some components of
the build. However, these false positives were made more more apparent
after r269648.

Phabric: D635
Reviewed by: jmmv (an earlier version)
PR: 192730
MFC after: 2 weeks

9 years agoMake ctl_port_mask an array to support more then 32 ports.
mav [Wed, 10 Sep 2014 07:16:17 +0000 (07:16 +0000)]
Make ctl_port_mask an array to support more then 32 ports.

Overflow reported by Coverity.

CID: 1229894
MFC after: 3 days

9 years agoRemove uninitialized and unused variable, reported by Coverity.
mav [Wed, 10 Sep 2014 07:00:36 +0000 (07:00 +0000)]
Remove uninitialized and unused variable, reported by Coverity.

CID: 1230015

9 years agoFix array overrun, reported by Coverity.
mav [Wed, 10 Sep 2014 06:56:45 +0000 (06:56 +0000)]
Fix array overrun, reported by Coverity.

CID: 1229970

9 years agoFix couple off-by-one range check errors, reported by Coverity.
mav [Wed, 10 Sep 2014 06:35:00 +0000 (06:35 +0000)]
Fix couple off-by-one range check errors, reported by Coverity.

CID: 1007837

9 years agoFix memory leak on error, reported by Coverity.
mav [Wed, 10 Sep 2014 06:29:31 +0000 (06:29 +0000)]
Fix memory leak on error, reported by Coverity.

CID: 1007773

9 years agoFix minor buffer overflow reported by Coverity.
mav [Wed, 10 Sep 2014 06:25:18 +0000 (06:25 +0000)]
Fix minor buffer overflow reported by Coverity.

CID: 1006781

9 years agoFix a boundary case error in vm_reserv_alloc_contig(): If a reservation
alc [Wed, 10 Sep 2014 05:52:30 +0000 (05:52 +0000)]
Fix a boundary case error in vm_reserv_alloc_contig(): If a reservation
isn't being allocated for the last of the requested pages, because a
reservation won't fit in the gap between allocated pages, then the
reservation structure shouldn't be initialized.

While I'm here, improve the nearby comments.

Reported by: jeff, pho
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix issue with nmdm and leading zeros in device name.
grehan [Wed, 10 Sep 2014 05:44:15 +0000 (05:44 +0000)]
Fix issue with nmdm and leading zeros in device name.

The nmdm code enforces a number between the 'nmdm' and 'A|B' portions
of the device name. This is then used as a unit number, and sprintf'd
back into the tty name. If leading zeros were used in the name,
the created device name is different than the string used for the
clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A).

Since unit numbers are no longer required with the updated tty
code, there seems to be no reason to force the string to be a
number. The fix is to allow an arbitrary string between
'nmdm' and 'A|B', within the constraints of devfs names. This allows
all existing user of numeric strings to continue to work, and also
allows more meaningful names to be used, such as bhyve VM names.

Tested on amd64, i386 and ppc64.

Reported by: Dave Smith
PR: 192281
Reviewed by: neel, glebius
Phabric: D729
MFC after: 3 days

9 years agoAdd diagnostic printfs and disable test # 4 on i386
ngie [Wed, 10 Sep 2014 03:54:57 +0000 (03:54 +0000)]
Add diagnostic printfs and disable test # 4 on i386

Reviewed by: jmmv, rpaulo
MFC after: 3 days
Phabric: D749
PR: 191676
Sponsored by: EMC / Isilon Storage Division

9 years agoBump __FreeBSD_version after SA-14:18
gjb [Wed, 10 Sep 2014 00:19:33 +0000 (00:19 +0000)]
Bump __FreeBSD_version after SA-14:18

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

9 years agoAllow vtnet operation without merged rx buffers.
grehan [Tue, 9 Sep 2014 22:35:02 +0000 (22:35 +0000)]
Allow vtnet operation without merged rx buffers.

NetBSD's virtio-net implementation doesn't negotiate
the merged rx-buffers feature. To support this, check
to see if the feature was negotiated, and then adjust
the operation of the receive path accordingly by using
a larger iovec, and a smaller rx header.
In addition, ignore writes to the (read-only) status byte.

Tested with NetBSD/amd64 5.2.2, 6.1.4 and 7-beta.

Reviewed by: neel, tychon
Phabric: D745
MFC after: 3 days

9 years agoExpand the tests structure in test_small(..) to workaround the
ngie [Tue, 9 Sep 2014 22:14:15 +0000 (22:14 +0000)]
Expand the tests structure in test_small(..) to workaround the
"initializer not constant" warning with gcc

Approved by: jmmv (mentor)
MFC after: 3 days
Phabric: D744
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd an arch.powerpc64 entity.
gjb [Tue, 9 Sep 2014 19:58:55 +0000 (19:58 +0000)]
Add an arch.powerpc64 entity.

Sponsored by: The FreeBSD Foundation

9 years agoChange how the recommended mailing list to track is
gjb [Tue, 9 Sep 2014 19:51:57 +0000 (19:51 +0000)]
Change how the recommended mailing list to track is
added to the footer of the release/doc/ pages by
moving a hard-coded value (that is subject to human
error to change) to release.ent where other values
are regularly changed, and adding parsing logic to
release.xsl.

Approved by: re (implicit)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoWhitespace nit.
np [Tue, 9 Sep 2014 18:36:00 +0000 (18:36 +0000)]
Whitespace nit.

MFC after: 1 week

9 years agoDon't cross mount boundaries when cleaning tmp files.
bdrewery [Tue, 9 Sep 2014 17:03:58 +0000 (17:03 +0000)]
Don't cross mount boundaries when cleaning tmp files.

Mounting something in /tmp such as a build jail with nullfs mounts for
some directories can result in very surprising results the next day.

MFC after: 2 weeks
Relnotes: yes

9 years agoUse keys_add_int() where appropriate. No functional changes.
trasz [Tue, 9 Sep 2014 16:57:02 +0000 (16:57 +0000)]
Use keys_add_int() where appropriate.  No functional changes.

Sponsored by: The FreeBSD Foundation

9 years agoFix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias
trasz [Tue, 9 Sep 2014 16:45:36 +0000 (16:45 +0000)]
Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias
when the initiator skips security negotiation.  This fixes interoperability
with Xtend SAN initiator.

PR: 193021
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoAvoid unlocking unlocked mutex in RCTL jail code. Specific test case
trasz [Tue, 9 Sep 2014 16:05:33 +0000 (16:05 +0000)]
Avoid unlocking unlocked mutex in RCTL jail code.  Specific test case
is attached to PR.

PR: 193457
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoReport that DPO and FUA bits are supported after r271311.
mav [Tue, 9 Sep 2014 15:19:38 +0000 (15:19 +0000)]
Report that DPO and FUA bits are supported after r271311.

9 years agoMinor mdoc nit.
joel [Tue, 9 Sep 2014 14:34:54 +0000 (14:34 +0000)]
Minor mdoc nit.

9 years ago- Add missing "
joel [Tue, 9 Sep 2014 14:31:56 +0000 (14:31 +0000)]
- Add missing "
- Sort sections

9 years agoOops, missed piece of r271311.
mav [Tue, 9 Sep 2014 14:20:55 +0000 (14:20 +0000)]
Oops, missed piece of r271311.

9 years agoRevert r269474. Special keyboard combinations should be handled by separate
ray [Tue, 9 Sep 2014 14:18:56 +0000 (14:18 +0000)]
Revert r269474. Special keyboard combinations should be handled by separate
sysctls.

9 years agoAdd support for Mode Page Policy (0x87) VPD page.
mav [Tue, 9 Sep 2014 14:09:51 +0000 (14:09 +0000)]
Add support for Mode Page Policy (0x87) VPD page.