]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoUpdate the entry for postmaster@
Remko Lodder [Thu, 3 Aug 2017 07:42:08 +0000 (07:42 +0000)]
Update the entry for postmaster@

Reviewed by: dhw

6 years agoAdd entry to the calendar
Alex Kozlov [Thu, 3 Aug 2017 07:00:55 +0000 (07:00 +0000)]
Add entry to the calendar

Requested by: mckusick

6 years agoRemove D_TRACKCLOSE now that ksyms no longer has a close method.
Mark Johnston [Thu, 3 Aug 2017 05:55:01 +0000 (05:55 +0000)]
Remove D_TRACKCLOSE now that ksyms no longer has a close method.

Reported by: jhb
X-MFC with: r321963

6 years agoFix the return types for printf and putchar to match their libc and
Enji Cooper [Thu, 3 Aug 2017 05:27:05 +0000 (05:27 +0000)]
Fix the return types for printf and putchar to match their libc and
POSIX equivalents

Both printf and putchar return int, not void.

This will allow code that leverages the libcalls and checks/rely on the
return type to interchangeably between loader code and non-loader
code.

MFC after: 1 month

6 years agoChase r321920 and r321930 (dev_t being widened)
Enji Cooper [Thu, 3 Aug 2017 03:43:41 +0000 (03:43 +0000)]
Chase r321920 and r321930 (dev_t being widened)

The layout of st_rdev has changed after this commit, and assumptions made
in the NetBSD tests are no longer valid. Change the hardcoded assumed
values to account for the fact that major/minor are now represented by
64 bits as opposed to the less precise legacy precision of 16 bits.

PR: 221048
Relnotes: st_rdev layout changed; warning about impact of r321920 to
  downstream consumers

6 years agoAdded entry as requested by Kirk.
Rick Macklem [Thu, 3 Aug 2017 02:08:01 +0000 (02:08 +0000)]
Added entry as requested by Kirk.

6 years agohyperv/kvp: Use proper size macro for adapter id.
Sepherosa Ziehau [Thu, 3 Aug 2017 01:44:40 +0000 (01:44 +0000)]
hyperv/kvp: Use proper size macro for adapter id.

Submitted by: Christopher Ertl <Christopher.Ertl microsoft com>
MFC after: 3 days
Sponsored by: Microsoft

6 years agoRework and simplify the ksyms(4) implementation.
Mark Johnston [Thu, 3 Aug 2017 00:38:13 +0000 (00:38 +0000)]
Rework and simplify the ksyms(4) implementation.

- Store the symbol table contents in an anonymous swap-backed object. Have
  mmap(/dev/ksyms) map that object, and stop mapping the symbol table into
  the calling process in ksyms_open(). Previously we would cache a pointer
  to the pmap of the opening process, and mmap(/dev/ksyms) would create a
  mapping using the physical address found by a pmap lookup at the initial
  mapping address. However, this assumes that the cached pmap is valid,
  which may not be the case. [1]
- Remove the ksyms ioctl interface. It appears to have been added to work
  around a limitation in libelf that no longer exists; see r321842.
  Moreover, the interface is difficult to support and isn't present in
  illumos. Since ksyms was added specifically to support lockstat(1), it
  is expected that this removal won't have any real impact.
- Simplify ksyms_read() to avoid unnecessary copying.
- Don't call the device handle destructor if we fail to capture a snapshot
  of the kernel's symbol table. devfs will do that for us.

Reported by: Ilja van Sprundel <ivansprundel@ioactive.com> [1]
Reviewed by: kib (previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11789

6 years agoAnnotate tests that require root privileges appropriately
Enji Cooper [Wed, 2 Aug 2017 22:19:45 +0000 (22:19 +0000)]
Annotate tests that require root privileges appropriately

This unbreaks running the tests with unprivileged users.

MFC after: 1 week

6 years agoDelete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"
Enji Cooper [Wed, 2 Aug 2017 21:49:37 +0000 (21:49 +0000)]
Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"

src.conf(5) should document which knobs are which and the dependency between each;
remove the comment so the variable can apply to non-"meta mode options".

MFC after: 2 weeks

6 years agoRegenerate src.conf(5) per change made in r321952
Enji Cooper [Wed, 2 Aug 2017 21:40:51 +0000 (21:40 +0000)]
Regenerate src.conf(5) per change made in r321952

6 years agoAllowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
Enji Cooper [Wed, 2 Aug 2017 21:38:15 +0000 (21:38 +0000)]
Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.

MFC after: 1 month

6 years agoSome minor doc fixups
Enji Cooper [Wed, 2 Aug 2017 21:31:46 +0000 (21:31 +0000)]
Some minor doc fixups

- Tweak a sentence by placing the modifier before an adjective to make it flow
  better.
- Fix a typo.

MFC after: 3 days

6 years agoAlways use first parameter passed to get_filesystem(..) instead of discarding it
Enji Cooper [Wed, 2 Aug 2017 21:20:49 +0000 (21:20 +0000)]
Always use first parameter passed to get_filesystem(..) instead of discarding it
and using `.` instead.

MFC after: 1 week
MFC with: r321949
PR: 221189 [1], 221188 [2]

6 years agoAdd expected failures for ZFS
Enji Cooper [Wed, 2 Aug 2017 21:18:54 +0000 (21:18 +0000)]
Add expected failures for ZFS

- :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
- :v_flag fails on ZFS because the mode for foo is [always] updated
  unnecessarily.

get_filesystem(..) (supporting function that was added to the test script)
is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

MFC after: 1 week
PR: 221189 [1], 221188 [2]

6 years ago- Correct the remainder of confusing and error prone mix-ups between
Marius Strobl [Wed, 2 Aug 2017 21:11:51 +0000 (21:11 +0000)]
- Correct the remainder of confusing and error prone mix-ups between
  "br" or "bridge" where - according to the terminology outlined in
  comments of bridge.h and mmcbr_if.m  around since their addition in
  r163516 - the bus is meant and used instead. Some of these instances
  are also rather old, while those in e. g. mmc_subr.c are as new as
  r315430 and were caused by choosing mmc_wait_for_request(), i. e. the
  one pre-r315430 outliner existing in mmc.c, as template for function
  parameters in mmc_subr.c inadvertently. This correction translates to
  renaming "brdev" to "busdev" and "mmcbr" to "mmcbus" respectively as
  appropriate.
  While at it, also rename "reqdev" to just "dev" in mmc_subr.[c,h]
  for consistency with was already used in mmm.c pre-r315430, again
  modulo mmc_wait_for_request() that is.
- Remove comment lines from bridge.h incorrectly suggesting that there
  would be a MMC bridge base class driver.
- Update comments in bridge.h regarding the star topology of SD and SDIO;
  since version 3.00 of the SDHCI specification, for eSD and eSDIO bus
  topologies are actually possible in form of so called "shared buses"
  (in some subcontext later on renamed to "embedded" buses).

6 years agoRequire strings(1) with :o_flag_preparer and :o_flag_publisher
Enji Cooper [Wed, 2 Aug 2017 20:42:39 +0000 (20:42 +0000)]
Require strings(1) with :o_flag_preparer and :o_flag_publisher

strings(1) might not be installed on the system, e.g., if MK_TOOLCHAIN == no

MFC after: 1 week

6 years agoarm64: Add Allwinner H5 SoC
Emmanuel Vadot [Wed, 2 Aug 2017 20:19:19 +0000 (20:19 +0000)]
arm64: Add Allwinner H5 SoC

Allwinner H5 is an H3 (arm32) with Cortex A53 cores.
Add support for it and enable it in GENERIC kernel config

Tested on: OrangePi PC2

6 years agoallwiner: modclk: Do not try to enable parent clock if it doesn't exist
Emmanuel Vadot [Wed, 2 Aug 2017 20:17:04 +0000 (20:17 +0000)]
allwiner: modclk: Do not try to enable parent clock if it doesn't exist

6 years agoAdd my birthdate to the calendar
Ryan Stone [Wed, 2 Aug 2017 19:45:09 +0000 (19:45 +0000)]
Add my birthdate to the calendar

Requested by: mckusick

6 years agoFix the interface to imx_iomux_gpr_get/set(). The functions were defined
Ian Lepore [Wed, 2 Aug 2017 18:28:06 +0000 (18:28 +0000)]
Fix the interface to imx_iomux_gpr_get/set().  The functions were defined
as taking a register number, and that would get multiplied by 4 to make
a register address.  But the header file that consumers have to reference
this stuff publishes register addresses, not numbers.  So now everything
works in terms of register addresses.

Note that the HDMI init code was writing into the wrong register before
this change.  Apparently whatever it wrote to was harmless, and apparently
HDMI was working because uboot had set up the right bits.

6 years agoAdd missing ofw_bus_if.h src file.
Ian Lepore [Wed, 2 Aug 2017 15:16:40 +0000 (15:16 +0000)]
Add missing ofw_bus_if.h src file.

6 years agoThe imx6_snvs driver is not strictly required for the system to run, so
Ian Lepore [Wed, 2 Aug 2017 15:15:18 +0000 (15:15 +0000)]
The imx6_snvs driver is not strictly required for the system to run, so
change it from standard to optional and add a device statement for it so
that it's included unless someone uses nodevice to eliminate it.

6 years agoFor makedev(), cast the minor argument to unsigned type explicitely,
Konstantin Belousov [Wed, 2 Aug 2017 14:54:54 +0000 (14:54 +0000)]
For makedev(), cast the minor argument to unsigned type explicitely,
avoiding possible sign propagation.

Submitted by: hselasky

6 years agoFix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
Hans Petter Selasky [Wed, 2 Aug 2017 14:27:27 +0000 (14:27 +0000)]
Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in
the "linux_cdev" structure to store and lookup this value.

While at it remove superfluous use of parenthesis inside the
MAJOR(), MINOR() and MKDEV() macros in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoFix the return type for get_cntxc(). The register is 64-bit on both arm
Andrew Turner [Wed, 2 Aug 2017 14:12:47 +0000 (14:12 +0000)]
Fix the return type for get_cntxc(). The register is 64-bit on both arm
and arm64 so move any truncation to the caller.

Submitted by: Mihai Carabas <mihai.carabas@gmail.com>
X-Differential Revision: https://reviews.freebsd.org/D10213

6 years agoKeep top page on CloudABI to work around AMD Ryzen stability issues.
Ed Schouten [Wed, 2 Aug 2017 13:08:10 +0000 (13:08 +0000)]
Keep top page on CloudABI to work around AMD Ryzen stability issues.

Similar to r321899, reduce sv_maxuser by one page inside of CloudABI.
This ensures that the stack, the vDSO and any allocations cannot touch
the top page of user virtual memory.

Considering that CloudABI userspace is completely oblivious to virtual
memory layout, don't bother making this conditional based on the CPU of
the running system.

Reviewed by: kib, truckman
Differential Revision: https://reviews.freebsd.org/D11808

6 years agoUpdate my entry in marketing.
Dru Lavigne [Wed, 2 Aug 2017 12:31:03 +0000 (12:31 +0000)]
Update my entry in marketing.

6 years agoamd64: annotate the syscall return address check with __predict_false
Mateusz Guzik [Wed, 2 Aug 2017 11:25:38 +0000 (11:25 +0000)]
amd64: annotate the syscall return address check with __predict_false

before:
   0xffffffff80b03ebb <+2059>: mov    0x460(%r14),%rax
   0xffffffff80b03ec2 <+2066>: mov    0x98(%rax),%rax
   0xffffffff80b03ec9 <+2073>: shr    $0x2f,%rax
   0xffffffff80b03ecd <+2077>: je     0xffffffff80b03edd <amd64_syscall+2093>
   0xffffffff80b03ecf <+2079>: mov    0x3f8(%r14),%rax
   0xffffffff80b03ed6 <+2086>: orl    $0x1,0xc8(%rax)
   0xffffffff80b03edd <+2093>: add    $0xf8,%rsp

after:
   0xffffffff80b03ebb <+2059>: mov    0x460(%r14),%rax
   0xffffffff80b03ec2 <+2066>: mov    0x98(%rax),%rax
   0xffffffff80b03ec9 <+2073>: shr    $0x2f,%rax
   0xffffffff80b03ecd <+2077>: jne    0xffffffff80b03eef <amd64_syscall+2111>
   0xffffffff80b03ecf <+2079>: add    $0xf8,%rsp

Reviewed by: kib
MFC after: 1 week

6 years agoAdd compat shim part missed at r305197.
Alexander Motin [Wed, 2 Aug 2017 10:33:47 +0000 (10:33 +0000)]
Add compat shim part missed at r305197.

This fixes compatibility between old kernel and new ZFS tools.
It seems to be tradition to forget it. :(

PR: 221112
MFC after: 3 days

6 years agoChange major()/minor() to work with 64bit dev_t.
Konstantin Belousov [Wed, 2 Aug 2017 10:14:17 +0000 (10:14 +0000)]
Change major()/minor() to work with 64bit dev_t.

Since traditional types for the macros values are int, remove the
cookie trick and just split the dev_t at the word boundary.

Reported by: Victor Stinner <victor.stinner@gmail.com>
PR: 221048
Sponsored by: The FreeBSD Foundation

6 years agoDo not call trapsignal() after handling usermode fault or interrupt,
Konstantin Belousov [Wed, 2 Aug 2017 10:12:10 +0000 (10:12 +0000)]
Do not call trapsignal() after handling usermode fault or interrupt,
when a signal is not intended to be sent.

The variable holding the signal number to send is left uninitialized,
which sometimes triggers invalid signal checks.

For NMI, a return to usermode without ast processing is done.  On the
other hand, for spurious dtrace probe interrupt it is usermode which
triggered the interrupt, so handle it through userret() as any other
fault.

Reported by: Nils Beyer <nbe@renzel.net>
PR: 221151
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoFix cosmetic issue with error message
Enji Cooper [Wed, 2 Aug 2017 09:49:41 +0000 (09:49 +0000)]
Fix cosmetic issue with error message

Add missing space in error message related to PR noted.

MFC after: 2 weeks
PR: 220398

6 years agoFix accidental misconversion done in r321912
Enji Cooper [Wed, 2 Aug 2017 09:00:18 +0000 (09:00 +0000)]
Fix accidental misconversion done in r321912

SUBDIR.${MK_TESTS} should append osmtest, not tests

MFC after: 1 week
MFC with: r321912

6 years agoRemove bogus bsd.subdir.mk .include
Enji Cooper [Wed, 2 Aug 2017 08:54:18 +0000 (08:54 +0000)]
Remove bogus bsd.subdir.mk .include

bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk.

MFC after: 3 days

6 years agoConvert traditional ${MK_TESTS} conditional idiom for including test
Enji Cooper [Wed, 2 Aug 2017 08:35:51 +0000 (08:35 +0000)]
Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after: 1 weeks

6 years agoLower the amd64 shared page, which contains the signal trampoline,
Don Lewis [Wed, 2 Aug 2017 01:43:35 +0000 (01:43 +0000)]
Lower the amd64 shared page, which contains the signal trampoline,
from the top of user memory to one page lower on machines with the
Ryzen (AMD Family 17h) CPU.  This pushes ps_strings and the stack
down by one page as well.  On Ryzen there is some sort of interaction
between code running at the top of user memory address space and
interrupts that can cause FreeBSD to either hang or silently reset.
This sounds similar to the problem found with DragonFly BSD that
was fixed with this commit:
  https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b48dd28447fc8ef62fbc963accd301557fd9ac20
but our signal trampoline location was already lower than the address
that DragonFly moved their signal trampoline to.  It also does not
appear to be related to SMT as described here:
  https://www.phoronix.com/forums/forum/hardware/processors-memory/955368-some-ryzen-linux-users-are-facing-issues-with-heavy-compilation-loads?p=955498#post955498

  "Hi, Matt Dillon here. Yes, I did find what I believe to be a
   hardware issue with Ryzen related to concurrent operations. In a
   nutshell, for any given hyperthread pair, if one hyperthread is
   in a cpu-bound loop of any kind (can be in user mode), and the
   other hyperthread is returning from an interrupt via IRETQ, the
   hyperthread issuing the IRETQ can stall indefinitely until the
   other hyperthread with the cpu-bound loop pauses (aka HLT until
   next interrupt). After this situation occurs, the system appears
   to destabilize. The situation does not occur if the cpu-bound
   loop is on a different core than the core doing the IRETQ. The
   %rip the IRETQ returns to (e.g. userland %rip address) matters a
   *LOT*. The problem occurs more often with high %rip addresses
   such as near the top of the user stack, which is where DragonFly's
   signal trampoline traditionally resides. So a user program taking
   a signal on one thread while another thread is cpu-bound can cause
   this behavior. Changing the location of the signal trampoline
   makes it more difficult to reproduce the problem. I have not
   been because the able to completely mitigate it. When a cpu-thread
   stalls in this manner it appears to stall INSIDE the microcode
   for IRETQ. It doesn't make it to the return pc, and the cpu thread
   cannot take any IPIs or other hardware interrupts while in this
   state."
since the system instability has been observed on FreeBSD with SMT
disabled.  Interrupts to appear to play a factor since running a
signal-intensive process on the first CPU core, which handles most
of the interrupts on my machine, is far more likely to trigger the
problem than running such a process on any other core.

Also lower sv_maxuser to prevent a malicious user from using mmap()
to load and execute code in the top page of user memory that was made
available when the shared page was moved down.

Make the same changes to the 64-bit Linux emulator.

PR: 219399
Reported by: nbe@renzel.net
Reviewed by: kib
Reviewed by: dchagin (previous version)
Tested by: nbe@renzel.net (earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D11780

6 years agoRevert accidental character conversion for pfg's entry, done in r321886
Enji Cooper [Wed, 2 Aug 2017 00:51:56 +0000 (00:51 +0000)]
Revert accidental character conversion for pfg's entry, done in r321886

6 years agoAmend r321884 to check the refcount and update the class with w_mtx held.
Mark Johnston [Tue, 1 Aug 2017 23:14:38 +0000 (23:14 +0000)]
Amend r321884 to check the refcount and update the class with w_mtx held.

Reviewed by: jhb
X-MFC with: r321884

6 years agoAllwinner dtb: Add NanoPi M1 to the build
Emmanuel Vadot [Tue, 1 Aug 2017 20:28:11 +0000 (20:28 +0000)]
Allwinner dtb: Add NanoPi M1 to the build

It was tested on NanoPi M1 Plus.

6 years ago+ Add myself to calendar.freebsd.
Taras Korenko [Tue, 1 Aug 2017 20:16:00 +0000 (20:16 +0000)]
+ Add myself to calendar.freebsd.

6 years agoAdd joneum to the calendar.freebsd
Tobias C. Berner [Tue, 1 Aug 2017 19:29:16 +0000 (19:29 +0000)]
Add joneum to the calendar.freebsd

Reported by: mckusick
Submitted by: joneum

6 years agoAlwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board
Emmanuel Vadot [Tue, 1 Aug 2017 19:22:00 +0000 (19:22 +0000)]
Alwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board

6 years agofix sort order
Maksim Yevmenkin [Tue, 1 Aug 2017 18:48:09 +0000 (18:48 +0000)]
fix sort order

6 years agoadd myself
Maksim Yevmenkin [Tue, 1 Aug 2017 18:46:24 +0000 (18:46 +0000)]
add myself

Requested by: mckusick

6 years agoAllwinner dtb: add link for NanoPi Neo
Emmanuel Vadot [Tue, 1 Aug 2017 18:33:27 +0000 (18:33 +0000)]
Allwinner dtb: add link for NanoPi Neo

Reported by: Richard Puga <richard@puga.net>
Tested by: Richard Puga <richard@puga.net>, myself

6 years agoCCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.
Bryan Drewery [Tue, 1 Aug 2017 18:26:20 +0000 (18:26 +0000)]
CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld.

- bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first
  in PATH.
- Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it
  overrides the PATH set in bsd.compiler.mk in sub-makes.  The PATH
  set in bsd.compiler.mk is not exported and doing so would cause it to
  then override the BPATH set from environment.  The only sane solution
  is to prepend into BPATH as needed.
CCACHE_PATH could possibly be used for some of this as well.

Sponsored by: Dell EMC Isilon

6 years agoAdd Anne Dickison.
Kirk McKusick [Tue, 1 Aug 2017 18:25:04 +0000 (18:25 +0000)]
Add Anne Dickison.

Requested by: Anne Dickison

6 years agoAdd myself to the calendar.freebsd
Lev A. Serebryakov [Tue, 1 Aug 2017 18:05:19 +0000 (18:05 +0000)]
Add myself to the calendar.freebsd

Reported by: mckusick

6 years agoFix a witness assertion that fires when a lock type's class changes.
Mark Johnston [Tue, 1 Aug 2017 17:50:28 +0000 (17:50 +0000)]
Fix a witness assertion that fires when a lock type's class changes.

When all instances of a lock type are destroyed (for example, after a
module unload), the corresponding witness entry remains associated with
that lock type. In this case, we shouldn't panic if a new instance of the
lock type is created and its lock class does not match that recorded in the
witness entry.

Reviewed by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11788

6 years agoNO_CLEAN: No need to run delete-old if the directories don't exist.
Bryan Drewery [Tue, 1 Aug 2017 16:41:17 +0000 (16:41 +0000)]
NO_CLEAN: No need to run delete-old if the directories don't exist.

X-MFC-With: r321443
MFC after: 1 month
Sponsored by: Dell EMC Isilon

6 years agoFor the udp-client example, instruct user to add an entry for a udp based
Sevan Janiyan [Tue, 1 Aug 2017 16:20:33 +0000 (16:20 +0000)]
For the udp-client example, instruct user to add an entry for a udp based
service.
For tcp-client & udp-client, use the same port in configuration snippet as used
in the comment prior to remove any ambiguity on the port number which needs to
be specified.

Reviewed by: bcr (mentor) wblock (mentor)
Approved by: gavin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D9830

6 years agoCCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.
Bryan Drewery [Tue, 1 Aug 2017 16:15:08 +0000 (16:15 +0000)]
CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper.

This uses the /usr/local/libexec/ccache/<cc,c++> wrappers rather than
modifying CC to be '/usr/local/bin/ccache cc'.  Some forms of compilation
do not support the 'command' type.

Sponsored by: Dell EMC Isilon

6 years agoUpdate doceng, re, security-officer, clusteradm, webmaster and
Glen Barber [Tue, 1 Aug 2017 16:05:23 +0000 (16:05 +0000)]
Update doceng, re, security-officer, clusteradm, webmaster and
donations entries.

Requested by: sevan
Sponsored by: The FreeBSD Foundation

6 years agoIn xdev-links, when installing symlinks to the cross-compiler pieces that
Ian Lepore [Tue, 1 Aug 2017 14:54:25 +0000 (14:54 +0000)]
In xdev-links, when installing symlinks to the cross-compiler pieces that
includes the OS version (armv6-freebsd12.0-cc, etc), use the OS version of
the compiler/world source code, not the version of the build host machine.

6 years ago[calendar.freebsd] Add myselft into freebsd.calendar
Michael Zhilin [Tue, 1 Aug 2017 11:51:35 +0000 (11:51 +0000)]
[calendar.freebsd] Add myselft into freebsd.calendar

6 years agozfsboottest: catch up with r316585 and provide ldi_get_size method
Andriy Gapon [Tue, 1 Aug 2017 11:09:18 +0000 (11:09 +0000)]
zfsboottest: catch up with r316585 and provide ldi_get_size method

This method is required for querying file / disk sizes which is needed
at least for finding all copies of ZFS VDEV labels.

Reported by: ngie
MFC after: 1 week

6 years agoMerge ena-com 1.1.4.2
Marcin Wojtas [Tue, 1 Aug 2017 11:00:04 +0000 (11:00 +0000)]
Merge ena-com 1.1.4.2

Update ENA HAL after fixing gcc build in r321861.

Submitted by: rlibby
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D11480

6 years agopci: fix write order when sizing BARs
Roger Pau Monné [Tue, 1 Aug 2017 10:47:44 +0000 (10:47 +0000)]
pci: fix write order when sizing BARs

According to the PCI Local Specification rev. 3.0 in case of a 64-bit
BAR both the low and the high parts of the register should be set to
~0 before attempting to read back the size.

So far I have found no single device that has problems with the
previous approach, but I think it's better to stay on the safe size.

This commit should not introduce any functional change.

MFC after: 3 weeks
Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D11750

6 years agoAdd myself to calendar
Marcin Wojtas [Tue, 1 Aug 2017 10:11:20 +0000 (10:11 +0000)]
Add myself to calendar

Approved by: cognet (mentor)

6 years agoAdjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
Stefan Eßer [Tue, 1 Aug 2017 09:34:15 +0000 (09:34 +0000)]
Adjust path to X11 locale files (/usr/X11 has been changed to /usr/local a
long ago) in comment. No functional change.

6 years agoAdd alternate Turkish keyboard layout F. The layout and menu texts have
Stefan Eßer [Tue, 1 Aug 2017 09:30:21 +0000 (09:30 +0000)]
Add alternate Turkish keyboard layout F. The layout and menu texts have
been provided by Ufuk Güler, with minor changes for consistency by me.

Submitted by: Ufuk Güler <ufukguler@yahoo.com>
MFC after: 1 week

6 years agoAdd myself to calendar.
Michael Tuexen [Tue, 1 Aug 2017 09:26:22 +0000 (09:26 +0000)]
Add myself to calendar.

Reminded by: mckusick

6 years agoAdd explicit check for PCI bus to r321720.
Alexander Motin [Tue, 1 Aug 2017 09:22:10 +0000 (09:22 +0000)]
Add explicit check for PCI bus to r321720.

Reported by: jhb
MFC after: 6 days

6 years agoAdd myself to the calendar
Vladimir Kondratyev [Tue, 1 Aug 2017 07:05:29 +0000 (07:05 +0000)]
Add myself to the calendar

Reminded by: mckusick
Approved by: gonzo (mentor)

6 years agoFix up r321849
Enji Cooper [Tue, 1 Aug 2017 06:51:03 +0000 (06:51 +0000)]
Fix up r321849

pager_output should return 0 if no more output needs to be paged; non-zero
otherwise.

MFC after: 1 week
MFC with: r321849
Reported by: avg

6 years agoStandardize paths on SRCTOP instead of .CURDIR-relative paths
Enji Cooper [Tue, 1 Aug 2017 05:39:40 +0000 (05:39 +0000)]
Standardize paths on SRCTOP instead of .CURDIR-relative paths

MFC after: 1 week

6 years agoMakefile cleanup
Enji Cooper [Tue, 1 Aug 2017 05:34:04 +0000 (05:34 +0000)]
Makefile cleanup

- Standardize on SRCTOP instead of .CURDIR-relative paths
- Use LIBADD instead of a mix of specifying -lgeom via DPADD/LDADD/LDFLAGS.
  Specifying -lgeom via LDFLAGS is an especially unnecessary and odd
  pattern.

MFC after: 1 week

6 years agoFix the return type for pager_output(..) in bootparttest and zfsboottest
Enji Cooper [Tue, 1 Aug 2017 05:29:36 +0000 (05:29 +0000)]
Fix the return type for pager_output(..) in bootparttest and zfsboottest

pager_output(..) has always returned int. For some reason (probably the
clang 5.0 update), this mismatch now results in an error with CC=clang.

MFC after: 1 week

6 years agoChase r315408 with the fourth parameter being removed from disk_open(..)
Enji Cooper [Tue, 1 Aug 2017 05:26:45 +0000 (05:26 +0000)]
Chase r315408 with the fourth parameter being removed from disk_open(..)

This fixes one part of the build.

6 years agoBatch updates to v_wire_count when freeing page table pages on x86.
Mark Johnston [Tue, 1 Aug 2017 05:26:30 +0000 (05:26 +0000)]
Batch updates to v_wire_count when freeing page table pages on x86.

The removed release stores are not needed since stores are totally
ordered on i386 and amd64.

Reviewed by: alc, kib (previous revision)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11790

6 years agoLog when we have finished pushing users and groups.
Marcelo Araujo [Tue, 1 Aug 2017 05:26:20 +0000 (05:26 +0000)]
Log when we have finished pushing users and groups.

Obtained from: OpenBSD (rev 1.4)
MFC after: 3 weeks.

6 years agoStandardize on SRCTOP instead of .CURDIR-relative paths
Enji Cooper [Tue, 1 Aug 2017 05:23:49 +0000 (05:23 +0000)]
Standardize on SRCTOP instead of .CURDIR-relative paths

MFC after: 3 days

6 years agoClean up style in print_state(..) and pager_printf(..)
Enji Cooper [Tue, 1 Aug 2017 05:16:14 +0000 (05:16 +0000)]
Clean up style in print_state(..) and pager_printf(..)

No functional change intended.

MFC after: 3 days

6 years agoRemove local variables missed in r321842.
Mark Johnston [Tue, 1 Aug 2017 04:52:03 +0000 (04:52 +0000)]
Remove local variables missed in r321842.

X-MFC with: r321842

6 years agoLet lockstat use ksyms(4)'s mmap interface.
Mark Johnston [Tue, 1 Aug 2017 04:49:54 +0000 (04:49 +0000)]
Let lockstat use ksyms(4)'s mmap interface.

The workaround described in the deleted comment is no longer needed.

MFC after: 1 week

6 years agoAdd a driver for the Intersil ISL12xx family of i2c RTC chips.
Ian Lepore [Tue, 1 Aug 2017 04:16:52 +0000 (04:16 +0000)]
Add a driver for the Intersil ISL12xx family of i2c RTC chips.

Supports ISL1209, ISL1218, ISL1219, ISL1220, ISL1221 (just basic RTC
functionality, not all the other fancy stuff the chips can do).

6 years agoThe blist_meta_* routines that process a subtree take arguments 'radix' and
Alan Cox [Tue, 1 Aug 2017 03:51:26 +0000 (03:51 +0000)]
The blist_meta_* routines that process a subtree take arguments 'radix' and
'skip', which denote, respectively, the largest number of blocks that can be
managed by a subtree of that height, and one less than the number of nodes
in a subtree of that height.  This change removes the 'skip' argument from
those functions because 'skip' can be trivially computed from 'radius'.
This change also redefines 'skip' so that it denotes the number of nodes in
the subtree, and so changes loop upper bound tests from '<= skip' to '<
skip' to account for the change.

The 'skip' field is also removed from the blist struct.

The self-test program is changed so that the print command includes the
cursor value in the output.

Submitted by: Doug Moore <dougm@rice.edu>
MFC after: 1 week

6 years agoImplement proper Linux /dev/fd and /proc/self/fd behavior by adding
Dmitry Chagin [Tue, 1 Aug 2017 03:40:19 +0000 (03:40 +0000)]
Implement proper Linux /dev/fd and /proc/self/fd behavior by adding
Linux specific things to the native fdescfs file system.

Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic
links to the actual files, which the process has open.
A readlink(2) call on this file returns a full path in case of regular file
or a string in a special format (type:[inode], anon_inode:<file-type>, etc..).
As well as in a FreeBSD, opening the file in the Linux fdescfs directory is
equivalent to duplicating the corresponding file descriptor.

Here we have mutually exclusive requirements:
- in case of readlink(2) call fdescfs lookup() method should return VLNK
vnode otherwise our kern_readlink() fail with EINVAL error;
- in the other calls fdescfs lookup() method should return non VLNK vnode.

For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed
mounted with linrdlnk option an modified kern_readlinkat() to properly handle it.

For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option:

    mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd

Reviewed by: kib@
MFC after: 1 week
Relnotes: yes

6 years agosys/net8021: Add missing braces in setcurchan().
Pedro F. Giffuni [Tue, 1 Aug 2017 03:13:43 +0000 (03:13 +0000)]
sys/net8021: Add missing braces in setcurchan().

Obtained from: DragonFlyBSD (git c69e37d6)
MFC after: 3 days

6 years agohyperv/hn: Add comment about ether_ifattach event subscription.
Sepherosa Ziehau [Tue, 1 Aug 2017 02:55:43 +0000 (02:55 +0000)]
hyperv/hn: Add comment about ether_ifattach event subscription.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11710

6 years agohyperv/hn: Renaming and minor cleanup
Sepherosa Ziehau [Tue, 1 Aug 2017 02:45:54 +0000 (02:45 +0000)]
hyperv/hn: Renaming and minor cleanup

This prepares for the upcoming transparent VF support.

MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11708

6 years agoAdd myself to FreeBSD calendar
Jason A. Harmening [Tue, 1 Aug 2017 01:39:54 +0000 (01:39 +0000)]
Add myself to FreeBSD calendar

Requested by: mckusick

6 years agoBring my aging self to calendar.freebsd.
Pedro F. Giffuni [Tue, 1 Aug 2017 01:35:23 +0000 (01:35 +0000)]
Bring my aging self to calendar.freebsd.

Requested by: mckusick

6 years agoBuild iicbus/{ds1307,ds3231,nxprtc} as modules.
Ian Lepore [Mon, 31 Jul 2017 22:32:11 +0000 (22:32 +0000)]
Build iicbus/{ds1307,ds3231,nxprtc} as modules.

6 years agoRestructure the SUBDIR list as 1-per-line and alphabetize, so it will be
Ian Lepore [Mon, 31 Jul 2017 22:26:30 +0000 (22:26 +0000)]
Restructure the SUBDIR list as 1-per-line and alphabetize, so it will be
easier to add new things (and see what changed) in the future.

6 years agoAllow changing the test PORT at compile-time.
Bryan Drewery [Mon, 31 Jul 2017 22:00:27 +0000 (22:00 +0000)]
Allow changing the test PORT at compile-time.

Sponsored by: Dell EMC Isilon

6 years agoBugfixes and enhancements...
Ian Lepore [Mon, 31 Jul 2017 22:00:00 +0000 (22:00 +0000)]
Bugfixes and enhancements...

Don't enable the oscillator when it is found to be stopped at init time,
just let the first setting of valid time start it.  But still report a dead
battery if it's stopped at init time.

Don't force the chip into 24hr mode, just cope with whatever mode it is
already in.

Schedule the clock_settime() callbacks to align the RTC clock to top of
second when setting it.

6 years agoNo need to call getnanotime() now that the waiting is done by the central
Ian Lepore [Mon, 31 Jul 2017 21:53:00 +0000 (21:53 +0000)]
No need to call getnanotime() now that the waiting is done by the central
subr_rtc code, switch from CLOCKF_SETTIME_NO_TS to CLOCKF_SETTIME_NO_ADJ
so that we get fed a timestamp, but it's not adjusted to compensate for
inaccuracy in setting time.

6 years agoAdd myself to the calendar.freebsd
Tobias C. Berner [Mon, 31 Jul 2017 21:08:31 +0000 (21:08 +0000)]
Add myself to the calendar.freebsd

Reported by:    mckusick

6 years agoAdd myself to the calendar.freebsd
Pawel Pekala [Mon, 31 Jul 2017 20:54:23 +0000 (20:54 +0000)]
Add myself to the calendar.freebsd

Reported by: mckusick

6 years agoAvoid reading a snapshot block when it is already in the cache.
Kirk McKusick [Mon, 31 Jul 2017 20:41:45 +0000 (20:41 +0000)]
Avoid reading a snapshot block when it is already in the cache.
Update the use of the B_CACHE flag (since the May 1999 commit
that made it the correct test here).

Reported by: Andreas Longwitz <longwitz@incore.de>
Reviewed by: kib
Tested by: Peter Holm
MFC after: 1 week

6 years agoAdd myself to the calendar.
Mateusz Guzik [Mon, 31 Jul 2017 20:15:11 +0000 (20:15 +0000)]
Add myself to the calendar.

Prodded by: invisible peer pressure

6 years agoUpdate pci_vendors to 2017.07.27
Baptiste Daroussin [Mon, 31 Jul 2017 19:51:36 +0000 (19:51 +0000)]
Update pci_vendors to 2017.07.27

MFC after: 2 days

6 years agoUpdate mandoc to 1.14.2
Baptiste Daroussin [Mon, 31 Jul 2017 19:34:38 +0000 (19:34 +0000)]
Update mandoc to 1.14.2

6 years agoImport mandoc 1.14.2
Baptiste Daroussin [Mon, 31 Jul 2017 19:17:54 +0000 (19:17 +0000)]
Import mandoc 1.14.2

6 years agoRemove redundant include directories which expand to a noop,
Cy Schubert [Mon, 31 Jul 2017 19:07:45 +0000 (19:07 +0000)]
Remove redundant include directories which expand to a noop,
"-I/lib/krb5 -I -I".

Reviewed by: ngie@, markm@
MFC after: 1 month
Differential Revision: D11769

6 years agoBatch v_wire_count decrements in vm_hold_free_pages().
Mark Johnston [Mon, 31 Jul 2017 18:48:58 +0000 (18:48 +0000)]
Batch v_wire_count decrements in vm_hold_free_pages().

Atomic updates to v_wire_count are a significant source of contention, so
combine multiple updates into one in this easy case. Also remove an old
printf that gets executed if the page is shared-busied, which is a case
that will lead to a panic anyway.

Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11791

6 years agoAdd myself to the calendar.
Matt Joras [Mon, 31 Jul 2017 18:10:10 +0000 (18:10 +0000)]
Add myself to the calendar.

Reported by: mckusick
Approved by: rstone (mentor)
Differential Revision: https://reviews.freebsd.org/D11797

6 years agoDon't trace running threads that have interrupts disabled.
Mark Johnston [Mon, 31 Jul 2017 17:57:54 +0000 (17:57 +0000)]
Don't trace running threads that have interrupts disabled.

In this case we shouldn't assume that the thread has a valid frame pointer.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D11787