]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoLimit the number of cylinder groups that will be searched when
mckusick [Fri, 24 Apr 2015 23:27:50 +0000 (23:27 +0000)]
Limit the number of cylinder groups that will be searched when
trying to build a cluster. The limit is tunable using the sysctl
vfs.ffs.maxclustersearch. The current limit is 10 cylinder groups
per block allocation. It was previously limited to the number of
cylinder groups in the filesystem per block allocation. When there
were no clusters of the needed size left, it repeatedly searched
the whole filesystem for a non-existent cluster on every block
allocation. The result was very slow filesystem allocation with
100% CPU utilization. The old behavior can be had by setting
vfs.ffs.maxclustersearch to a huge number (1,000,000).

This change affects only the layout policy routines so is not able
to interfere with the integrity of the filesystem.

Reported by: Dmitry Sivachenko (demon@)
Tested by:   Dmitry Sivachenko (demon@)
MFC after:   2 weeks

9 years agoUse correct length for sparse uiomove(). It must be the clipped to
kib [Fri, 24 Apr 2015 22:05:12 +0000 (22:05 +0000)]
Use correct length for sparse uiomove().  It must be the clipped to
the page size, len is the total transfer length, which may be larger
than zero_region.

Reported and tested by: clusteradm (gjb)
Sponsored by: The FreeBSD Foundation
X-MFC-With: r281442

9 years agoAdd LLDB to BROKEN_OPTIONS for arm prior to armv6
emaste [Fri, 24 Apr 2015 22:04:59 +0000 (22:04 +0000)]
Add LLDB to BROKEN_OPTIONS for arm prior to armv6

LLVM lacks support on FreeBSD for ARMv4/ARMv5 64-bit atomic operations.

Sponsored by: The FreeBSD Foundation

9 years agoFix possible reference leak.
ae [Fri, 24 Apr 2015 21:05:29 +0000 (21:05 +0000)]
Fix possible reference leak.

Sponsored by: Yandex LLC

9 years agoDon't allow guest to modify readonly bits in the PCI config 'status' register.
neel [Fri, 24 Apr 2015 19:15:38 +0000 (19:15 +0000)]
Don't allow guest to modify readonly bits in the PCI config 'status' register.

Reported by: Leon Dang (ldang@nahannisys.com)
MFC after: 2 weeks

9 years agoAdd definition to support alloc_align attribute.
pfg [Fri, 24 Apr 2015 18:07:34 +0000 (18:07 +0000)]
Add definition to support alloc_align attribute.

gcc 4.9 added support for new alignment attribute alloc_align:

The alloc_align attribute is used to tell the compiler that the function
return value points to memory, where the returned pointer minimum
alignment is given by one of the functions parameters. GCC uses this
information to improve pointer alignment analysis.

This attribute is not (yet) available on clang.

9 years agovt(4): Simplify mouse area detection
emaste [Fri, 24 Apr 2015 17:36:26 +0000 (17:36 +0000)]
vt(4): Simplify mouse area detection

vt_is_cursor_in_area needs to return true if any part of the mouse
cursor is visible in the rectangle area. Replace the existing test with
a simpler version of a test for overlapping rectangles.

Differential Revision: https://reviews.freebsd.org/D2356
Reviewed by: ray
Sponsored by: The FreeBSD Foundation

9 years agoRevert r281451. It causes a panic/hang early in boot for a number of
scottl [Fri, 24 Apr 2015 17:03:53 +0000 (17:03 +0000)]
Revert r281451.  It causes a panic/hang early in boot for a number of
users, myself included.  The original code is likely papering over a
larger bug that needs to be explored, but for now get things back to
a working state.

Obtained from: Netflix, Inc.
MFC after: immediately

9 years agoWatchdog drivers need to support rearming the watchdog in contexts which
jhb [Fri, 24 Apr 2015 16:56:23 +0000 (16:56 +0000)]
Watchdog drivers need to support rearming the watchdog in contexts which
are not permitted to sleep.  Only use the IPMI watchdog with backends
which poll driver-initiated requests to meet this requirement.

In practice this means that watchdogs will no longer be used on systems
that use the SSIF backend.

Differential Revision: https://reviews.freebsd.org/D2062
MFC after: 2 weeks

9 years agoMove common code from sys/i386/i386/mp_machdep.c and
kib [Fri, 24 Apr 2015 16:20:56 +0000 (16:20 +0000)]
Move common code from sys/i386/i386/mp_machdep.c and
sys/amd64/amd64/mp_machdep.c, to the new common x86 source
sys/x86/x86/mp_x86.c.

Proposed and reviewed by: jhb
Review: https://reviews.freebsd.org/D2347
Sponsored by: The FreeBSD Foundation

9 years agoMerge from CheriBSD: 1065cf515a7c2062598009c1318055aacbb39e80
brooks [Fri, 24 Apr 2015 16:11:22 +0000 (16:11 +0000)]
Merge from CheriBSD: 1065cf515a7c2062598009c1318055aacbb39e80

Convert the pfsync dissector to use the netdissect framework.

Differential Revision: https://reviews.freebsd.org/D2359
Reviewed by: glebius
Sponsored by: DARPA, AFRL

9 years agoRename the kld for oce(4) to if_oce.ko. ifconfig(8) has special knowledge
jhb [Fri, 24 Apr 2015 14:47:53 +0000 (14:47 +0000)]
Rename the kld for oce(4) to if_oce.ko.  ifconfig(8) has special knowledge
about kld filenames for network drivers that requires them to follow the
pattern of if_<foo>.  This also fixes the existing documentation in the
manpage which says to use if_oce_load=YES in loader.conf.

PR: 199095
MFC after: 1 week

9 years agoFix minor mdoc issues.
joel [Fri, 24 Apr 2015 14:36:06 +0000 (14:36 +0000)]
Fix minor mdoc issues.

9 years agoUpdate this driver to not save copies of registers that are no longer used
jhb [Fri, 24 Apr 2015 13:12:04 +0000 (13:12 +0000)]
Update this driver to not save copies of registers that are no longer used
after r281874.  While here, also update it to always write the parent's
PCI bus number to the primary bus register.

9 years agoFix growfs(8) build with debug enabled (make -DGFSDBG).
trasz [Fri, 24 Apr 2015 12:48:48 +0000 (12:48 +0000)]
Fix growfs(8) build with debug enabled (make -DGFSDBG).

PR: 199641
Submitted by: Willem Jan Withagen <wjw at digiware dot nl>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAvoid an infinite loop by ensuring that the amount of bytes read is greater
ngie [Fri, 24 Apr 2015 11:03:47 +0000 (11:03 +0000)]
Avoid an infinite loop by ensuring that the amount of bytes read is greater
than 0 in MDXFileChunk when calculating the checksum

This edgecase can be triggered if the file is truncated while the checksum
is being calculated (i.e. the EOF is reached)

Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius)
PR: 196694
Reviewed by: delphij, ngie
Submitted by: Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division

9 years ago__xlocale_C_ctype should not be const. It contains a reference count that is modifie...
theraven [Fri, 24 Apr 2015 10:21:20 +0000 (10:21 +0000)]
__xlocale_C_ctype should not be const.  It contains a reference count that is modified by newlocale / duplocale / freelocale.

MFC after: 1 week

9 years agoSmall changes to locale-related man pages.
theraven [Fri, 24 Apr 2015 10:17:55 +0000 (10:17 +0000)]
Small changes to locale-related man pages.
Fix a missing .h and change the recommended include for the POSIX2008 functions from xlocale.h to locale.h.  Including xlocale.h is for legacy / Darwin compatibility so should not be encouraged.

9 years agoOops, add missing comma.
mav [Fri, 24 Apr 2015 09:52:41 +0000 (09:52 +0000)]
Oops, add missing comma.

MFC after: 1 week

9 years agoAdd link to mvs(4).
mav [Fri, 24 Apr 2015 09:47:10 +0000 (09:47 +0000)]
Add link to mvs(4).

MFC after: 1 week

9 years agoMake nfsstat(1) build with WARNS=6.
trasz [Fri, 24 Apr 2015 07:57:59 +0000 (07:57 +0000)]
Make nfsstat(1) build with WARNS=6.

Sponsored by: The FreeBSD Foundation

9 years agoAdd Lynx-Point LP smbus controller ID.
takawata [Fri, 24 Apr 2015 07:24:31 +0000 (07:24 +0000)]
Add Lynx-Point LP smbus controller ID.

9 years agoPlural fix.
kevlo [Fri, 24 Apr 2015 05:00:57 +0000 (05:00 +0000)]
Plural fix.

9 years ago- Fix the length of efuse content.
kevlo [Fri, 24 Apr 2015 04:57:18 +0000 (04:57 +0000)]
- Fix the length of efuse content.
- Replace the magic numbers with something more readable.

9 years agoFix DTrace's panic() action.
markj [Fri, 24 Apr 2015 03:19:30 +0000 (03:19 +0000)]
Fix DTrace's panic() action.

It would previously call into some unfinished Solaris compatibility code and
return without actually calling panic(9). The compatibility code is
unneeded, however, so just remove it and have dtrace_panic() call vpanic(9)
directly.

Differential Revision: https://reviews.freebsd.org/D2349
Reviewed by: avg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoMake vpanic() externally visible so that it can be called as part of the
markj [Fri, 24 Apr 2015 03:17:21 +0000 (03:17 +0000)]
Make vpanic() externally visible so that it can be called as part of the
DTrace panic() action.

Differential Revision: https://reviews.freebsd.org/D2349
Reviewed by: avg
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to
andrew [Thu, 23 Apr 2015 22:20:43 +0000 (22:20 +0000)]
Add the SOC_IMX51, SOC_IMX53, and SOC_IMX6 options. These are used to
select which SoCs the kernel config will support.

Use these options to merge files.imx51 and files.imx53.

9 years agoReduce the diff between files.imx51 and files.imx53
andrew [Thu, 23 Apr 2015 21:39:32 +0000 (21:39 +0000)]
Reduce the diff between files.imx51 and files.imx53

9 years agoPull out the common parts of the ODROIDC1 and VSATV102 kernels to a new
andrew [Thu, 23 Apr 2015 21:31:06 +0000 (21:31 +0000)]
Pull out the common parts of the ODROIDC1 and VSATV102 kernels to a new
kernel config. This also removes the per-board config files from universe.

9 years agoRemove the need for board specific std files on aml8726 by moving the
andrew [Thu, 23 Apr 2015 20:53:29 +0000 (20:53 +0000)]
Remove the need for board specific std files on aml8726 by moving the
options they set to the main kernel config.

9 years agoMove KERNVIRTADDR to the common std.aml8726.
andrew [Thu, 23 Apr 2015 20:43:24 +0000 (20:43 +0000)]
Move KERNVIRTADDR to the common std.aml8726.

9 years ago - Move files selected in files.smp to files.aml8726 and remove it.
andrew [Thu, 23 Apr 2015 20:39:40 +0000 (20:39 +0000)]
 - Move files selected in files.smp to files.aml8726 and remove it.
 - Remove a redundant file from files.aml8726

9 years agoUpdate the ODROIDC1 and VSATV102 to reduce the diff to the other armv6
andrew [Thu, 23 Apr 2015 20:28:56 +0000 (20:28 +0000)]
Update the ODROIDC1 and VSATV102 to reduce the diff to the other armv6
kernel config files.

9 years agoRevert r281889, it broke keyboard input
emaste [Thu, 23 Apr 2015 20:26:22 +0000 (20:26 +0000)]
Revert r281889, it broke keyboard input

9 years agoNow that we have an U-Boot for RPI2, do not use the static DTB compiled
loos [Thu, 23 Apr 2015 19:50:22 +0000 (19:50 +0000)]
Now that we have an U-Boot for RPI2, do not use the static DTB compiled
into the kernel, which is used mostly on early development stages.

On RPI(2) the DTB is loaded and modified by firmware and then handed to
kernel via U-Boot and ubldr.

The RPI firmware adds (or modify) a few valuable data to the in memory
DTB, like:

 - System memory;
 - Ethernet MAC address;
 - framebuffer settings;
 - Board serial and revision;
 - clock-frequency for most of devices.

9 years agoFix the gpio-leds node to match the LEDs on RPI2.
loos [Thu, 23 Apr 2015 18:36:36 +0000 (18:36 +0000)]
Fix the gpio-leds node to match the LEDs on RPI2.

The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED
is connected to GPIO pin 47 (active high).

Remove the GPIO pin 47 from reserved pins list, previously it was used to
signaling the SD Card presence and now it is used by act LED.

9 years agoEnable the watchdog on RPI2.
loos [Thu, 23 Apr 2015 14:58:39 +0000 (14:58 +0000)]
Enable the watchdog on RPI2.

The watchdog is used to reset the SoC on cpu_reset().

Without this, RPI2 will not reboot when asked to.

9 years agoPlug memory leaks in kbdmux(4)
pfg [Thu, 23 Apr 2015 14:53:45 +0000 (14:53 +0000)]
Plug memory leaks in kbdmux(4)

Al kudos here for the Clang static analyzer which, unlike Coverity,
failed to flag a false positive.

Found by: clang static analyzer
CID: 1007072
CID: 1007073
CID: 1007074

MFC after: 1 week

9 years agoRemove oldnfs support from nfsstat(1).
trasz [Thu, 23 Apr 2015 14:36:01 +0000 (14:36 +0000)]
Remove oldnfs support from nfsstat(1).

Reviewed by: rmacklem@ (earlier version)
Sponsored by: The FreeBSD Foundation

9 years agoReassign copyright statements on several files from Advanced
jhb [Thu, 23 Apr 2015 14:22:20 +0000 (14:22 +0000)]
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by: Hudson River Trading LLC (who owns ACT LLC)
MFC after: 1 week

9 years agoReduce diffs between the three copies of libstand's Makefile
emaste [Thu, 23 Apr 2015 14:04:33 +0000 (14:04 +0000)]
Reduce diffs between the three copies of libstand's Makefile

This should be a non-functional change.  A future change should
address the functional differences between these three and converge
on a single source.

Differential Revision: https://reviews.freebsd.org/D2058
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation

9 years agoDon't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to
glebius [Thu, 23 Apr 2015 13:19:00 +0000 (13:19 +0000)]
Don't propagate SIOCSIFCAPS from a vlan(4) to its parent. This leads to
quite unexpected result of toggling capabilities on the neighbour vlan(4)
interfaces.

Reviewed by: melifaro, np
Differential Revision: https://reviews.freebsd.org/D2310
Sponsored by: Nginx, Inc.

9 years agoA complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
tuexen [Thu, 23 Apr 2015 13:10:03 +0000 (13:10 +0000)]
A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF
flag.
Thanks to Valentin Nechayev for reporting the issue.

MFC after: 1 week

9 years agoHandle incorrect ELF images specifying size for PT_GNU_STACK not being
kib [Thu, 23 Apr 2015 11:27:21 +0000 (11:27 +0000)]
Handle incorrect ELF images specifying size for PT_GNU_STACK not being
multiple of page size.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoSimplify linux_getcwd(), removing code that was longer used.
trasz [Thu, 23 Apr 2015 08:41:50 +0000 (08:41 +0000)]
Simplify linux_getcwd(), removing code that was longer used.

Differential Revision: https://reviews.freebsd.org/D2326
Reviewed by: dchagin@, kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoDisable multi process interrupts, because the current code doesn't use
hselasky [Thu, 23 Apr 2015 07:41:58 +0000 (07:41 +0000)]
Disable multi process interrupts, because the current code doesn't use
them. Else we can end up in an infinite interrupt loop in USB device
mode.

MFC after: 3 days

9 years agoMissing break in switch case.
araujo [Thu, 23 Apr 2015 02:50:06 +0000 (02:50 +0000)]
Missing break in switch case.

Differential Revision: D2342
Reviewed by: neel

9 years agoAdd another variant of BCM5708S controller to IBM HS21 workaround
yongari [Thu, 23 Apr 2015 01:39:28 +0000 (01:39 +0000)]
Add another variant of BCM5708S controller to IBM HS21 workaround
list.

PR: 118238
MFC after: 2 weeks

9 years agoCreate the arm64/aarch64 VM disk image as MBR instead of
gjb [Thu, 23 Apr 2015 01:04:14 +0000 (01:04 +0000)]
Create the arm64/aarch64 VM disk image as MBR instead of
GPT scheme.  UEFI needs to know the unique partition GUID
with GPT, which changes each time.  Specifically, the QEMU
EFI BIOS file has this hard-coded.[1]

Since the GPT labels are now unavailable, unconditionally
label the root filesystem as 'rootfs' with newfs(8), since
it does not hurt anything anywhere else.  For the arm64 case,
'/' is mounted from /dev/ufs/rootfs; for all other VM images,
'/' is mounted from /dev/gpt/rootfs.

Unfortunately, since the /dev/gpt/swapfs label is also lost,
set NOSWAP=1 for the arm64/aarch64 images.  This is temporary,
until I figure out a scalable solution to this.  But, a certain
piece of softare was written "very fast", and ended up living
for 15 years.  We can deal with this for a week or so.

Information from: andrew, emaste [1]
Sponsored by: The FreeBSD Foundation

9 years agolibgeom: plug memory leak in EndElement.
pfg [Wed, 22 Apr 2015 22:23:56 +0000 (22:23 +0000)]
libgeom: plug memory leak in EndElement.

CID: 1016696
Found by: Clang static checker
MFC after: 1 week

9 years agoUpdate the pci_cfg_save/restore routines to operate on bridge devices
jhb [Wed, 22 Apr 2015 22:02:27 +0000 (22:02 +0000)]
Update the pci_cfg_save/restore routines to operate on bridge devices
(type 1 and type 2) as well as leaf devices (type 0).  In particular,
this allows the existing PCI bus logic to save and restore capability
registers such as MSI and PCI-express work for bridge devices rather than
requiring that code to be duplicated in bridge drivers.  It also means
that bridge drivers no longer need to save and restore basic registers
such as the PCI command register or BARs nor manage powerstates for the
bridge device.

While here, pci_setup_secbus() has been changed to initialize the 'sec'
and 'sub' fields in the 'secbus' structure instead of requiring the pcib
and pccbb drivers to do this in the NEW_PCIB + PCI_RES_BUS case.

Differential Revision: https://reviews.freebsd.org/D2240
Reviewed by: imp, jmg
MFC after: 2 weeks

9 years agoDon't explicitly manage power states for PCI-PCI bridge devices in the
jhb [Wed, 22 Apr 2015 21:56:44 +0000 (21:56 +0000)]
Don't explicitly manage power states for PCI-PCI bridge devices in the
driver's suspend and resume routines.  These have been redundant no-ops
since r214065 changed the PCI bus driver to manage power states for
all devices (including type 1/2 bridge devices) during suspend and resume.

9 years agoFix some incorrect #if conditions around older workarounds for bus
jhb [Wed, 22 Apr 2015 21:47:51 +0000 (21:47 +0000)]
Fix some incorrect #if conditions around older workarounds for bus
numbering goofs.

MFC after: 1 week

9 years agoThe minimim grant and maximum latency PCI config registers are only valid
jhb [Wed, 22 Apr 2015 21:41:59 +0000 (21:41 +0000)]
The minimim grant and maximum latency PCI config registers are only valid
for type 0 devices, not type 1 or 2 bridges.  Don't read them for bridge
devices during bus scans and return an error when attempting to read them
as ivars for bridge devices.

9 years agoCosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1.
jhb [Wed, 22 Apr 2015 21:38:21 +0000 (21:38 +0000)]
Cosmetic change: use PCIR_SECLAT_2 rather than PCIR_SECLAT_1.

9 years agoFetch the SDHCI frequency from videocore (our prefered source) and only if
loos [Wed, 22 Apr 2015 18:35:02 +0000 (18:35 +0000)]
Fetch the SDHCI frequency from videocore (our prefered source) and only if
it fails, fetch the clock-frequency from DTB.

If both methods fail, use the hardcoded default.

9 years agoMove zlib.c from net to libkern.
rodrigc [Wed, 22 Apr 2015 18:15:18 +0000 (18:15 +0000)]
Move zlib.c from net to libkern.

9 years agoAdd definition for the argument_with_type_tag attribute.
pfg [Wed, 22 Apr 2015 18:13:28 +0000 (18:13 +0000)]
Add definition for the argument_with_type_tag attribute.

This attribute originates in clang and brings support for checking types
of variadic functions' arguments for functions like fcntl() and ioctl().

Unfortunately lint(1) will complain about them: in particular as one of
the parameters is the function being tagged. For now define this attribute
in the lint-sensitive section.

Reference:
http://clang.llvm.org/docs/AttributeReference.html#type-safety-checking

9 years agoMake AIO to not allocate pbufs for unmapped I/O like r281825.
mav [Wed, 22 Apr 2015 18:11:34 +0000 (18:11 +0000)]
Make AIO to not allocate pbufs for unmapped I/O like r281825.

While there, make few more performance optimizations.

On 40-core system doing many 512-byte AIO reads from array of raw SSDs
this change removes lock congestions inside pbuf allocator and devfs,
and bottleneck on single AIO completion taskqueue thread.  It improves
peak AIO performance from ~600K to ~1.3M IOPS.

MFC after: 2 weeks

9 years agoFix the SDHCI clock frequency for RPI2, the default clock (for the newer
loos [Wed, 22 Apr 2015 17:35:58 +0000 (17:35 +0000)]
Fix the SDHCI clock frequency for RPI2, the default clock (for the newer
firmware versions) is 250MHz.

9 years agocomputematchjumps(): fix allocator sizeof operand mismatch.
pfg [Wed, 22 Apr 2015 17:09:02 +0000 (17:09 +0000)]
computematchjumps(): fix allocator sizeof operand mismatch.

Mostly cosmetical warning.

Found by: Clang static analyzer

9 years ago_pthread_cleanup_push: fix allocator sizeof operand mismatch
pfg [Wed, 22 Apr 2015 16:51:21 +0000 (16:51 +0000)]
_pthread_cleanup_push: fix allocator sizeof operand mismatch

Same fix appears to be in DragonFly's libthread_xu.

Found by: Clang Static Analyzer
MFC after: 1 week

9 years agoMove zlib.c from net to libkern.
rodrigc [Wed, 22 Apr 2015 14:38:58 +0000 (14:38 +0000)]
Move zlib.c from net to libkern.

It is not network-specific code and would
be better as part of libkern instead.
Move zlib.h and zutil.h from net/ to sys/
Update includes to use sys/zlib.h and sys/zutil.h instead of net/

Submitted by: Steve Kiernan stevek@juniper.net
Obtained from: Juniper Networks, Inc.
GitHub Pull Request: https://github.com/freebsd/freebsd/pull/28
Relnotes: yes

9 years agoRemove the gptboot partition from the arm64 memory stick image,
gjb [Wed, 22 Apr 2015 13:52:29 +0000 (13:52 +0000)]
Remove the gptboot partition from the arm64 memory stick image,
which is not needed/used.

Sponsored by: The FreeBSD Foundation

9 years agoMove some common code from sys/amd64/amd64/machdep.c and
kib [Wed, 22 Apr 2015 12:32:14 +0000 (12:32 +0000)]
Move some common code from sys/amd64/amd64/machdep.c and
sys/i386/i386/machdep.c to new file sys/x86/x86/cpu_machdep.c.  Most
of the code is related to the idle handling.

Discussed with: pluknet
Sponsored by: The FreeBSD Foundation

9 years agoAdd the null implementation of stack_save and stack_save_td.
andrew [Wed, 22 Apr 2015 12:24:38 +0000 (12:24 +0000)]
Add the null implementation of stack_save and stack_save_td.

Sponsored by: The FreeBSD Foundation

9 years agoRemove the calls to panic from pmap_object_init_pt and pmap_clear_modify.
andrew [Wed, 22 Apr 2015 09:52:51 +0000 (09:52 +0000)]
Remove the calls to panic from pmap_object_init_pt and pmap_clear_modify.

Sponsored by: The FreeBSD Foundation

9 years agoSupport file verification in MAC.
rodrigc [Wed, 22 Apr 2015 01:54:25 +0000 (01:54 +0000)]
Support file verification in MAC.

* Add VCREAT flag to indicate when a new file is being created
* Add VVERIFY to indicate verification is required
* Both VCREAT and VVERIFY are only passed on the MAC method vnode_check_open
  and are removed from the accmode after
* Add O_VERIFY flag to rtld open of objects
* Add 'v' flag to __sflags to set O_VERIFY flag.

Submitted by: Steve Kiernan <stevek@juniper.net>
Obtained from: Juniper Networks, Inc.
GitHub Pull Request: https://github.com/freebsd/freebsd/pull/27
Relnotes: yes

9 years agoQuiet compiler warnings in mbuf.h
rodrigc [Wed, 22 Apr 2015 01:35:29 +0000 (01:35 +0000)]
Quiet compiler warnings in mbuf.h

 * Mark unused arguments with __unused
 * Move inline before the return type (and use __inline to keep the file
   consistent in style.)

Submitted by: Steve Kiernan <stevek@juniper.net>
Obtained from: Juniper Networks, Inc.

9 years agoExtend DA_Q_NO_RC16 to MXUB3* devices.
delphij [Tue, 21 Apr 2015 22:55:52 +0000 (22:55 +0000)]
Extend DA_Q_NO_RC16 to MXUB3* devices.

PR: kern/198647
MFC after: 2 weeks

9 years agoImprove carp(4) locking:
glebius [Tue, 21 Apr 2015 20:25:12 +0000 (20:25 +0000)]
Improve carp(4) locking:
- Use the carp_sx to serialize not only CARP ioctls, but also carp_attach()
  and carp_detach().
- Use cif_mtx to lock only access to those the linked list.
- These locking changes allow us to do some memory allocations with M_WAITOK
  and also properly call callout_drain() in carp_destroy().
- In carp_attach() assert that ifaddr isn't attached. We always come here
  with a pristine address from in[6]_control().

Reviewed by: oleg
Sponsored by: Nginx, Inc.

9 years agoFor igb(4), when we are doing multiqueue, we are all setup to have full 32bit
hiren [Tue, 21 Apr 2015 20:24:15 +0000 (20:24 +0000)]
For igb(4), when we are doing multiqueue, we are all setup to have full 32bit
RSS hash from the card. We do not need to hide that under "ifdef RSS" and should
expose that by default so others like lagg(4) can use that and avoid hashing the
traffic by themselves.
While here, improve comments and get rid of hidden/unimplemented RSS support
code for UDP.

Differential Revision: https://reviews.freebsd.org/D2296
Reviewed by: jfv, erj
Discussed with: adrian
Sponsored by: Limelight Networks

9 years agoRevert r281809, which did more harm than good, and apply
gjb [Tue, 21 Apr 2015 14:48:38 +0000 (14:48 +0000)]
Revert r281809, which did more harm than good, and apply
a more proper fix when attempting to locate the /boot
files.

Sponsored by: The FreeBSD Foundation

9 years agoModify kern___getcwd() to take max pathlen limit as an additional
trasz [Tue, 21 Apr 2015 13:55:24 +0000 (13:55 +0000)]
Modify kern___getcwd() to take max pathlen limit as an additional
argument.  This will be used for the Linux emulation layer - for Linux,
PATH_MAX is 4096 and not 1024.

Differential Revision: https://reviews.freebsd.org/D2335
Reviewed by: kib@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoFix numerous issues in iic(4) and iicbus(4):
jah [Tue, 21 Apr 2015 11:50:31 +0000 (11:50 +0000)]
Fix numerous issues in iic(4) and iicbus(4):
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
    --iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device.  Multiple threads on the same device may
want exclusive access.  Also, iicbus_release_bus() was never
device-recursive anyway.
    --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
    --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
    --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.

Differential Revision: https://reviews.freebsd.org/D2140
Reviewed by: imp, jhb, loos
Approved by: kib (mentor)

9 years agoRewrite physio() to not allocate pbufs for unmapped I/O.
mav [Tue, 21 Apr 2015 10:55:53 +0000 (10:55 +0000)]
Rewrite physio() to not allocate pbufs for unmapped I/O.

pbufs is a limited resource, and their allocator is not SMP-scalable.
So instead of always allocating pbuf to immediately convert it to bio,
allocate bio just here.  If buffer needs kernel mapping, then pbuf is
still allocated, but used only as a source of KVA and storage for a list
of held pages.

On 40-core system doing many 512-byte reads from user level to array of
raw SSDs this change removes huge lock congestion inside pbuf allocator.
It improves peak performance from ~300K to ~1.2M IOPS.  On my previous
24-core system this problem also existed, but was less serious.

Reviewed by: kib
MFC after: 2 weeks

9 years agoMake IFMEDIA_DEBUG a kernel option.
glebius [Tue, 21 Apr 2015 10:35:23 +0000 (10:35 +0000)]
Make IFMEDIA_DEBUG a kernel option.

Sponsored by: Nginx, Inc.

9 years agoSerialize all of _kerberos5_bootstrap_tools to avoid build failures involving
ngie [Tue, 21 Apr 2015 10:17:25 +0000 (10:17 +0000)]
Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving
make bootstrap-tools

On the plus side, this also greatly reduces complexity

MFC after: 1 week
Pointyhat to: ngie
Reported by: Willem Jan Withagen <wjw@digiware.nl>

9 years agoInstead of storing mii_media_table array index in ifm_data, determine
glebius [Tue, 21 Apr 2015 09:39:48 +0000 (09:39 +0000)]
Instead of storing mii_media_table array index in ifm_data, determine
it in mii_phy_setmedia() functionally.

Sponsored by: Nginx, Inc.

9 years agoAdd hint about "volmode=dev" to ctl.conf(5).
trasz [Tue, 21 Apr 2015 09:11:28 +0000 (09:11 +0000)]
Add hint about "volmode=dev" to ctl.conf(5).

Differential Revision: https://reviews.freebsd.org/D2328
Reviewed by: allanjude@, bcr@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoThe comment on BMCR data in if_media entry is wrong. The ifm_data stores
glebius [Tue, 21 Apr 2015 08:54:14 +0000 (08:54 +0000)]
The comment on BMCR data in if_media entry is wrong. The ifm_data stores
the index array, not a value for BMCR register. In case of IFM_10_T there
could be either MII_MEDIA_10_T or MII_MEDIA_10_T_FDX, which are 1 and 2,
accordingly. Neither matches a valid BMCR value. My guessing is that this
write is harmless, since later mii_phy_setmedia() would write a proper
value there.

The code is here since the initial checkin. Note that case IFM_100_TX has
the same comment, but a proper value of BMCR_ISO is written. So, collapse
two cases into one, always writing there BMCR_ISO.

Sponsored by: Nginx, Inc.

9 years agoSince xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data.
glebius [Tue, 21 Apr 2015 06:59:40 +0000 (06:59 +0000)]
Since xmphy doesn't call mii_phy_setmedia(), there is no reason to set ifm_data.

Sponsored by: Nginx, Inc.

9 years agoSince brgphy doesn't call mii_phy_setmedia(), there is no reason to
glebius [Tue, 21 Apr 2015 06:46:11 +0000 (06:46 +0000)]
Since brgphy doesn't call mii_phy_setmedia(), there is no reason to
set any value to ifm_data.  If brgphy ever to call mii_phy_setmedia(),
then the value of BRGPHY_S1000 | BRGPHY_BMCR_FDX will trigger KASSERT.

While here, remove the obfuscating macro and wrap long lines.

Sponsored by: Nginx, Inc.

9 years agoDon't print uninitialized variables.
hselasky [Tue, 21 Apr 2015 06:11:47 +0000 (06:11 +0000)]
Don't print uninitialized variables.

CID: 1295242

9 years agoTweak BSS symbol handling from r281811 to not consider them unresolved
bdrewery [Tue, 21 Apr 2015 05:41:56 +0000 (05:41 +0000)]
Tweak BSS symbol handling from r281811 to not consider them unresolved

9 years agoSupport libraries linked by path.
bdrewery [Tue, 21 Apr 2015 05:10:18 +0000 (05:10 +0000)]
Support libraries linked by path.

Sponsored by: EMC / Isilon Storage Division

9 years agoMerge bmake-20150418
sjg [Tue, 21 Apr 2015 04:40:38 +0000 (04:40 +0000)]
Merge bmake-20150418

PR: 199486

9 years ago- For executables search for matching (B) global uninitialized BSS symbols from
bdrewery [Tue, 21 Apr 2015 03:29:03 +0000 (03:29 +0000)]
- For executables search for matching (B) global uninitialized BSS symbols from
  linked libraries. Only do this for BSS symbols that have a size which avoids
  __bss_start. Without this some libraries would be considered unneeded even
  though they were providing a B symbol.
- Add in the symbols from crt1.o to cover a handful of common unresolved symbols.
- Consider (C) common data symbols as provided by libraries/crt1.
- Move libkey() function to more appropriate place.

Sponsored by: EMC / Isilon Storage Division

9 years agoRevert r281805 for now as it breaks due to spaces in output
bdrewery [Tue, 21 Apr 2015 03:06:58 +0000 (03:06 +0000)]
Revert r281805 for now as it breaks due to spaces in output

9 years agoSimplify variable expansion in attempt to fix the vm-image build.
gjb [Tue, 21 Apr 2015 02:49:44 +0000 (02:49 +0000)]
Simplify variable expansion in attempt to fix the vm-image build.

Sponsored by: The FreeBSD Foundation

9 years agoPass full path to ldd(1) so it works on files in cwd.
bdrewery [Tue, 21 Apr 2015 02:02:25 +0000 (02:02 +0000)]
Pass full path to ldd(1) so it works on files in cwd.

9 years agoFix wpa/hostapd build without OpenSSL.
rpaulo [Tue, 21 Apr 2015 02:00:37 +0000 (02:00 +0000)]
Fix wpa/hostapd build without OpenSSL.

9 years agoMerge wpa_supplicant/hostapd 2.4.
rpaulo [Tue, 21 Apr 2015 01:45:11 +0000 (01:45 +0000)]
Merge wpa_supplicant/hostapd 2.4.

Major changes are: SAE, Suite B, RFC 7268, EAP-PKE, ACS, and tons of
bug fixes.

Relnotes: yes

9 years agoSupport demangling C++ symbols with -D flag.
bdrewery [Tue, 21 Apr 2015 01:37:14 +0000 (01:37 +0000)]
Support demangling C++ symbols with -D flag.

Sponsored by: EMC / Isilon Storage Division

9 years agoMerge the following from ^/projects/release-arm64 to allow
gjb [Tue, 21 Apr 2015 00:48:35 +0000 (00:48 +0000)]
Merge the following from ^/projects/release-arm64 to allow
building FreeBSD/arm64 VM images and memstick.img installation
medium:
r281786, r281788, r281792:

 r281786:
  Add support for building arm64/aarch64 virtual machine images.

 r281788:
  Copy amd64/make-memstick.sh to arm64/make-memstick.sh for
  aarch64 memory stick images.

  Although arm64 does not yet have USB support, the memstick
  image should be bootable with certain virtualization tools,
  such as qemu.

 r281792:

  Add a buildenv_setup() prototype, intended to be overridden as
  needed.

  For example, the arm64/aarch64 build needs devel/aarch64-binutils,
  so buildenv_setup() in the release.conf for this architecture
  handles the installation of the port before buildworld/buildkernel.

Sponsored by: The FreeBSD Foundation

9 years agopatch(1): small include changes.
pfg [Mon, 20 Apr 2015 22:15:18 +0000 (22:15 +0000)]
patch(1): small include changes.

Mostly to match OpenBSD, no functional change.

Obtained from: OpenBSD

9 years agoBuild and install the DTB for all the supported AllWinner SoCs.
loos [Mon, 20 Apr 2015 22:12:19 +0000 (22:12 +0000)]
Build and install the DTB for all the supported AllWinner SoCs.

We will need them when we start booting using ubldr.

9 years agoFix improbable memory leak in _citrus_prop_read_str().
pfg [Mon, 20 Apr 2015 22:09:50 +0000 (22:09 +0000)]
Fix improbable memory leak in _citrus_prop_read_str().

Found by: Clang Static Analyzer

9 years agoMove the definition of struct bpf_if to bpf.c.
markj [Mon, 20 Apr 2015 22:08:11 +0000 (22:08 +0000)]
Move the definition of struct bpf_if to bpf.c.

A couple of fields are still exposed via struct bpf_if_ext so that
bpf_peers_present() can be inlined into its callers. However, this change
eliminates some type duplication in the resulting CTF container, since
otherwise ctfmerge(1) propagates the duplication through all types that
contain a struct bpf_if.

Differential Revision: https://reviews.freebsd.org/D2319
Reviewed by: melifaro, rpaulo

9 years agoscsi_parse_transportid_rdma(): fix mismatch in memoty access size.
pfg [Mon, 20 Apr 2015 21:44:55 +0000 (21:44 +0000)]
scsi_parse_transportid_rdma(): fix mismatch in memoty access size.

Independently found by Coverity and gcc49.

CID: 1230006
Reviewed by: ken
MFC after: 5 days