]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoAdd removed CTM files to ObsoleteFiles.inc as a follow-up to r342126.
se [Mon, 17 Dec 2018 10:17:56 +0000 (10:17 +0000)]
Add removed CTM files to ObsoleteFiles.inc as a follow-up to r342126.

5 years agoloader: zfs reader should not probe partitionless disks (UEFI case)
tsoome [Mon, 17 Dec 2018 07:43:29 +0000 (07:43 +0000)]
loader: zfs reader should not probe partitionless disks (UEFI case)

With r342151 I did fix the BIOS version of zfs_probe_dev() from accessing
the whole disk, but the fix was not complete - we actually did not check
if the device name was really for whole disk. Since UEFI version
is only calling the zfs_probe_dev() with partitions and not with whole
disk, the UEFI loader was not able to find the zfs pools.

This update does correct the issue by calling archsw.arch_getdev() to
translate the device name back to dev_desc, and we have whole disk when both
partition and slice values are -1.

Reported by: alvisen_gmail.com
Differential Revision: https://reviews.freebsd.org/D18558

5 years agoWork around BIOS quirks on HPE Proliant MicroServer Gen10
grog [Mon, 17 Dec 2018 07:09:46 +0000 (07:09 +0000)]
Work around BIOS quirks on HPE Proliant MicroServer Gen10

PR: 221350
Submitted by: Bob Bishop
Reported by: Rafal Lukawiecki
Reviewed by: jhb
MFC after: 2 weeks

5 years agoAdd revision number for TP-Link TL-WN722N to prevent ambiguity between
avos [Mon, 17 Dec 2018 05:07:57 +0000 (05:07 +0000)]
Add revision number for TP-Link TL-WN722N to prevent ambiguity between
different chipsets.

MFC after: 3 days
X-MFC with: 341786

5 years agoOptionalObsoleteFiles: Fix deleting usr/tests/usr.sbin/sa
asomers [Sun, 16 Dec 2018 23:45:46 +0000 (23:45 +0000)]
OptionalObsoleteFiles: Fix deleting usr/tests/usr.sbin/sa

It's a directory, not a file.

Reported by: ngie
MFC after: 2 weeks
X-MFC-With: 300938

5 years agoConditionally install /etc/rc.d/audit* based on ${MK_AUDIT}
asomers [Sun, 16 Dec 2018 23:38:46 +0000 (23:38 +0000)]
Conditionally install /etc/rc.d/audit* based on ${MK_AUDIT}

/usr/sbin/audit(dist)?d are only installed if ${MK_AUDIT} == yes. Their
supporting scripts should only be installed in those instances as well.

Submitted by: ngie
Reviewed by: emaste
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd/pull/242

5 years agoMake (no)ro an alias for (no)readonly
phk [Sun, 16 Dec 2018 18:10:55 +0000 (18:10 +0000)]
Make (no)ro an alias for (no)readonly

5 years agoloader: zfs reader should not probe partitionless disks
tsoome [Sun, 16 Dec 2018 08:58:14 +0000 (08:58 +0000)]
loader: zfs reader should not probe partitionless disks

First of all, normal setups can not boot such pools as the tools
do not support installing boot programs.

Secondly, for proper pool configuration detection, we need to checks all
four label copies on disk, 2 from front and 2 from the end of the disk,
but zfs label does not contain the size of the disk - so we depend on
firmware to report the correct disk size or use information from the
partition table.

Without partition table, we only can rely on firmware to report and support
disk IO properly.

There is a specific case: 8TB disks are reported by BIOS to have 4294967295
sectors (0x00000000ffffffff), the sectors reported by OS is 15628053168
(0x00000003a3812ab0), so the reported size is less than actual but is hitting
32-bit max. Unfortuantely the real limit must be even lower because probing
this disk in this system will wnd up with hung system.

UEFI boot of this system seems not to be affected.

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

5 years agoAdd a missing leading / in a filename.
cy [Sun, 16 Dec 2018 04:06:53 +0000 (04:06 +0000)]
Add a missing leading / in a filename.

MFC after: 3 days

5 years agoDocument new required MI behaviour of pmap_enter(9) for CoW.
kib [Sun, 16 Dec 2018 01:51:38 +0000 (01:51 +0000)]
Document new required MI behaviour of pmap_enter(9) for CoW.

Reviewed by: markj
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D18568

5 years agoperiodic/weekly/340.noid: do not use sysrc(8) that depends
eugen [Sat, 15 Dec 2018 23:20:08 +0000 (23:20 +0000)]
periodic/weekly/340.noid: do not use sysrc(8) that depends
on bsdinstall(8) and may be non-functional
for system built WITHOUT_BSDINSTALL. (*)

Also, add a check for jails sharing whole tree with host (path=/)
and do not skip it.

Reported by: Andre.Albsmeier@siemens.com (*)
MFC after: 1 week

5 years agoRepair build post-r342139
cy [Sat, 15 Dec 2018 22:02:02 +0000 (22:02 +0000)]
Repair build post-r342139

5 years agoRemove, the now very outdated, timed.
gnn [Sat, 15 Dec 2018 21:34:40 +0000 (21:34 +0000)]
Remove, the now very outdated, timed.

Submitted by: Kyle Spiers ksspiers at gmail
Reviewed by: bcr,brooks,bz,sbruno
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D18505

5 years agoClarify panic in set_rootvnode().
mckusick [Sat, 15 Dec 2018 19:18:58 +0000 (19:18 +0000)]
Clarify panic in set_rootvnode().
Check for panic in vfs_mountroot_shuffle().

Sponsored by: Netflix

5 years agoUnder UFS/FFS the VFS_ROOT() function will return an error if the inode
mckusick [Sat, 15 Dec 2018 19:04:50 +0000 (19:04 +0000)]
Under UFS/FFS the VFS_ROOT() function will return an error if the inode
check-hash fails. Panic'ing is not an appropriate response. So, check
for an error return from VFS_ROOT() and when an error is reported,
unwind and return the error.

Reported by:  Gary Jennejohn (gj)
Sponsored by: Netflix

5 years agoEnsure that the inode check-hash is not left zeroed out in the case where
mckusick [Sat, 15 Dec 2018 18:49:30 +0000 (18:49 +0000)]
Ensure that the inode check-hash is not left zeroed out in the case where
the check-hash fails. Prior to the fix in -r342133 the inode with the
zeroed out check-hash was written back to disk causing further confusion.

Reported by:  Gary Jennejohn (gj)
Sponsored by: Netflix

5 years agoReorder ffs_verify_dinode_ckhash() so that it checks the inode check-hash
mckusick [Sat, 15 Dec 2018 18:35:46 +0000 (18:35 +0000)]
Reorder ffs_verify_dinode_ckhash() so that it checks the inode check-hash
before copying in the inode so that the mode and link-count are not set
if the check-hash fails. This change ensures that the vnode will be properly
unwound and recycled rather than being held in the cache.

Initialize the file mode is zero so that if the loading of the inode
fails (for example because of a check-hash failure), the vnode will be
properly unwound and recycled.

Reported by:  Gary Jennejohn (gj)
Sponsored by: Netflix

5 years agoMust set ip->i_effnlink = ip->i_nlink to avoid a soft updates
mckusick [Sat, 15 Dec 2018 17:58:42 +0000 (17:58 +0000)]
Must set ip->i_effnlink = ip->i_nlink to avoid a soft updates
"panic: softdep_update_inodeblock: bad link count" when releasing
a partially initialized vnode after an inode check-hash failure.

Reported by:  Gary Jennejohn <gljennjohn@gmail.com>
Reported by:  Peter Holm (pho)
Sponsored by: Netflix

5 years agoFsck would find, report, and offer to fix inode check-hash failures.
mckusick [Sat, 15 Dec 2018 17:32:47 +0000 (17:32 +0000)]
Fsck would find, report, and offer to fix inode check-hash failures.
If requested to fix the inode check-hash it would confirm having done
it, but then fail to make the fix. The same code is used in fsdb which,
unlike fsck, would actually fix the inode check-hash.

The discrepancy occurred because fsck has two ways to fetch inodes.
The inode by number function ginode() and the streaming inode
function getnextinode() used during pass1. Fsdb uses the ginode()
function which correctly does the fix, while fsck first encounters
the bad inode check-hash in pass1 where it is using the getnextinode()
function that failed to make the correction. This patch corrects
the getnextinode() function so that fsck now correctly fixes inodes
with incorrect inode check-hashs.

Reported by:  Gary Jennejohn <gljennjohn@gmail.com>
Sponsored by: Netflix

5 years agoRevert r331567 CC Cubic: fix underflow for cubic_cwnd()
hiren [Sat, 15 Dec 2018 17:01:16 +0000 (17:01 +0000)]
Revert r331567 CC Cubic: fix underflow for cubic_cwnd()

This change is causing TCP connections using cubic to hang. Need to dig more to
find exact cause and fix it.

Reported by: tj at mrsk dot me, Matt Garber (via twitter)
Discussed with: sbruno (previously), allanjude, cperciva
MFC after: 3 days

5 years agoRemove CTM from 13-CURRENT after the release of FreeBSD-12.0.
se [Sat, 15 Dec 2018 16:53:15 +0000 (16:53 +0000)]
Remove CTM from 13-CURRENT after the release of FreeBSD-12.0.

The removal (and creation of a port) has been pre-announced in UPDATING
1 month ago. Packages are available for all supported FreeBSD vesions.

I did not think that another entry in UPDATING is required to note the
actual removal.

No MFC is planned - CTM shall be kept in base for all releases up to 12.x.

Reviewed by: rgrimes
Approved by: imp, bcr (manpages)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D17935

5 years agoFix bugs in plugable CC algorithm and siftr sysctls.
brooks [Sat, 15 Dec 2018 15:06:22 +0000 (15:06 +0000)]
Fix bugs in plugable CC algorithm and siftr sysctls.

Use the sysctl_handle_int() handler to write out the old value and read
the new value into a temporary variable. Use the temporary variable
for any checks of values rather than using the CAST_PTR_INT() macro on
req->newptr. The prior usage read directly from userspace memory if the
sysctl() was called correctly. This is unsafe and doesn't work at all on
some architectures (at least i386.)

In some cases, the code could also be tricked into reading from kernel
memory and leaking limited information about the contents or crashing
the system. This was true for CDG, newreno, and siftr on all platforms
and true for i386 in all cases. The impact of this bug is largest in
VIMAGE jails which have been configured to allow writing to these
sysctls.

Per discussion with the security officer, we will not be issuing an
advisory for this issue as root access and a non-default config are
required to be impacted.

Reviewed by: markj, bz
Discussed with: gordon (security officer)
MFC after: 3 days
Security: kernel information leak, local DoS (both require root)
Differential Revision: https://reviews.freebsd.org/D18443

5 years agoAdd new USB id in rtwn_usb(4) (RTL8812AU)
avos [Sat, 15 Dec 2018 14:58:45 +0000 (14:58 +0000)]
Add new USB id in rtwn_usb(4) (RTL8812AU)

PR: 234029
Submitted by: <hakotani000@gmail.com>
MFC after: 4 days

5 years agoUpdate clang, llvm, lld, lldb, compiler-rt and libc++ version number to
dim [Sat, 15 Dec 2018 14:08:41 +0000 (14:08 +0000)]
Update clang, llvm, lld, lldb, compiler-rt and libc++ version number to
7.0.1 release r349250.  There were no functional changes since the 7.0.1
rc3 import.

PR: 230240, 230355
Relnotes: yes
MFC after: 2 months
X-MFC-With: r341825

5 years agoMake fsck(8) use pread(2). This cuts the number of syscalls by half.
trasz [Sat, 15 Dec 2018 11:36:20 +0000 (11:36 +0000)]
Make fsck(8) use pread(2). This cuts the number of syscalls by half.

Reviewed by: kib, mckusick
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17586

5 years agoAdd kern.rpc.gss.client_max, to make it possible to bump it easily.
trasz [Sat, 15 Dec 2018 11:32:11 +0000 (11:32 +0000)]
Add kern.rpc.gss.client_max, to make it possible to bump it easily.
This can drastically lower the load on gssd(8) on large NFS servers.

Submitted by: Per Andersson <pa at chalmers dot se>
Reviewed by: rmacklem@
MFC after: 2 weeks
Sponsored by: Chalmers University of Technology
Differential Revision: https://reviews.freebsd.org/D18393

5 years agoImprove R_AARCH64_TLSDESC relocation.
mmel [Sat, 15 Dec 2018 10:38:07 +0000 (10:38 +0000)]
Improve R_AARCH64_TLSDESC relocation.
The original code did not support dynamically loaded libraries and used
suboptimal access to TLS variables.
New implementation removes lazy resolving of TLS relocation - due to flaw
in TLSDESC design is impossible to switch resolver function at runtime
without expensive locking.

Due to this, 3 specialized resolvers are implemented:
 - load time resolver for TLS relocation from libraries loaded with main
   executable (thus with known TLS offset).
 - resolver for undefined thread weak symbols.
 - slower lazy resolver for dynamically loaded libraries with fast path for
   already resolved symbols.

PR: 228892, 232149, 233204, 232311
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18417

5 years agoRevert accidentally included changes in r342108
cem [Sat, 15 Dec 2018 05:47:22 +0000 (05:47 +0000)]
Revert accidentally included changes in r342108

If you're curious, please follow along in https://reviews.freebsd.org/D18537 .

Sorry for the noise.

5 years agoefirt: When present, attempt to use EFI runtime services to shutdown
cem [Sat, 15 Dec 2018 05:46:04 +0000 (05:46 +0000)]
efirt: When present, attempt to use EFI runtime services to shutdown

PR: maybe related to 233998 (inconclusive at this time)
Submitted by: byuu <byuu AT tutanota.com> (previous version)
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D18506

5 years agopowerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation
jhibbits [Sat, 15 Dec 2018 04:53:02 +0000 (04:53 +0000)]
powerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation

Build only the necessary fpu_emu files for supporting the SPE IEEE-754
emulation exception handler.

MFC after: 1 week

5 years ago[mv_pci] Do not attempt to attach disabled PCI ports
gonzo [Sat, 15 Dec 2018 02:35:48 +0000 (02:35 +0000)]
[mv_pci] Do not attempt to attach disabled PCI ports

Fail probe for PCI port if the respective FDT node is not enabled

Differential Revision: https://reviews.freebsd.org/D18385

5 years agomake_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH
arichardson [Fri, 14 Dec 2018 23:53:28 +0000 (23:53 +0000)]
make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH

This fixes building in CheriBSD with a strict tmp path since we don't
bootstrap a cpp but pass the full path to clang-cpp instead.

While touching this file also fix all shellcheck warnings in make_dtb.sh.

Reviewed By: manu
Differential Revision: https://reviews.freebsd.org/D18376

5 years agoFix error check for ACPI_ID_PROBE in the TPM2.0 driver
mw [Fri, 14 Dec 2018 22:22:43 +0000 (22:22 +0000)]
Fix error check for ACPI_ID_PROBE in the TPM2.0 driver

Updated API does not return pointer, so adjust the
TPM2.0 driver accordingly.

Reported by: jhb
Obtained from: Semihalf
Sponsored by: Stormshield

5 years ago[twsi] Make extres/clk part conditional based on the EXT_RESOURCES option value
gonzo [Fri, 14 Dec 2018 21:17:42 +0000 (21:17 +0000)]
[twsi] Make extres/clk part conditional based on the EXT_RESOURCES option value

This should fix kernel build for ARMADA38X and possibly some other ARM configs

Approved by: manu

5 years agoAllow bootstrapping libnv on macOS and Linux
arichardson [Fri, 14 Dec 2018 21:16:04 +0000 (21:16 +0000)]
Allow bootstrapping libnv on macOS and Linux

MacOS/Linux do not define struct cmsgcred but we need to bootstrap libnv
when building on non-FreeBSD systems. Since they are not used during
bootstrap we can just omit these two functions there.

Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D18472

5 years agoAdd some more checking to the RISC-V page fault handler.
markj [Fri, 14 Dec 2018 21:07:12 +0000 (21:07 +0000)]
Add some more checking to the RISC-V page fault handler.

- Panic immediately if witness says we're holding non-sleepable locks.
  This helps ensure that we don't recurse on the pmap lock in
  pmap_fault_fixup().
- Panic if the kernel faults on a user address without setting an
  onfault handler.
- Panic if the fault occurred in a critical section or interrupt
  handler, like we do on other platforms.
- Fix some style issues in trap_pfault().

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18561

5 years agoAvoid needless TLB invalidations in pmap_remove_pages().
markj [Fri, 14 Dec 2018 21:04:30 +0000 (21:04 +0000)]
Avoid needless TLB invalidations in pmap_remove_pages().

pmap_remove_pages() is called during process termination, when it is
guaranteed that no other CPU may access the mappings being torn down.
In particular, it unnecessary to invalidate each mapping individually
since we do a pmap_invalidate_all() at the end of the function.

Also don't call pmap_invalidate_all() while holding a PV list lock, the
global pvh lock is sufficient.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18562

5 years agoAssume that pmap_l1() will return a PTE.
markj [Fri, 14 Dec 2018 21:03:01 +0000 (21:03 +0000)]
Assume that pmap_l1() will return a PTE.

pmaps on RISC-V always have an L1 page table page, so we don't need to
check for this when performing lookups.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18563

5 years agoAdd a QEMU config for RISC-V.
markj [Fri, 14 Dec 2018 21:00:41 +0000 (21:00 +0000)]
Add a QEMU config for RISC-V.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18560

5 years agoEnable witness(4) in the RISC-V GENERIC config.
markj [Fri, 14 Dec 2018 20:57:57 +0000 (20:57 +0000)]
Enable witness(4) in the RISC-V GENERIC config.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18559

5 years agoatomic_cmpset return value is also an int.
imp [Fri, 14 Dec 2018 19:48:42 +0000 (19:48 +0000)]
atomic_cmpset return value is also an int.

5 years agoatomic_fcmpset* return int, not the type of *.
imp [Fri, 14 Dec 2018 19:14:51 +0000 (19:14 +0000)]
atomic_fcmpset* return int, not the type of *.

fcmpset returns true/false as a int, so make the return types and
variables match the int to be consistent with other arch.

Reviewed by: cognet@
Differential Revision: https://reviews.freebsd.org/D18557

5 years agoClean up the riscv pmap_bootstrap() implementation.
markj [Fri, 14 Dec 2018 18:50:32 +0000 (18:50 +0000)]
Clean up the riscv pmap_bootstrap() implementation.

- Build up phys_avail[] in a single loop, excluding memory used by
  the loaded kernel.
- Fix an array indexing bug in the aforementioned phys_avail[]
  initialization.[1]
- Remove some unneeded code copied from the arm64 implementation.

PR: 231515 [1]
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18464

5 years agoallwinner: aw_pwm: Read value at attach
manu [Fri, 14 Dec 2018 18:39:17 +0000 (18:39 +0000)]
allwinner: aw_pwm: Read value at attach

The booloaded might have configured the pwm controller so read the values.

5 years agopwm(8): Add percentage value support for duty cycle
manu [Fri, 14 Dec 2018 18:38:10 +0000 (18:38 +0000)]
pwm(8): Add percentage value support for duty cycle

5 years agopwm: Convert period and duty to unsigned int
manu [Fri, 14 Dec 2018 18:37:26 +0000 (18:37 +0000)]
pwm: Convert period and duty to unsigned int

We don't need a 64 bits value to store nanoseconds

Discused with: ian, jhibbits

5 years agoAdd support for the nForce MCP89 adapter.
markj [Fri, 14 Dec 2018 18:16:35 +0000 (18:16 +0000)]
Add support for the nForce MCP89 adapter.

PR: 234015
Submitted by: Andrejs Bogdanovs <sinchiroca86@gmail.com>
MFC after: 1 week

5 years agoFix TPM driver compilation from r342084
mw [Fri, 14 Dec 2018 17:43:35 +0000 (17:43 +0000)]
Fix TPM driver compilation from r342084

Include recent ACPI_ID_PROBE API change.

5 years agoIntroduce driver for TPM 2.0 in CRB and FIFO (TIS) modes
mw [Fri, 14 Dec 2018 16:14:36 +0000 (16:14 +0000)]
Introduce driver for TPM 2.0 in CRB and FIFO (TIS) modes

It was written basing on:
TCG PC Client Platform TPM Profile (PTP) Specification Version 22, Revision 1.03.
It only supports Locality 0. Interrupts are only supported in FIFO mode.

The driver in FIFO mode was tested on x86 with Infineon SLB9665 discrete TPM chip.
Driver in both modes was also tested on qemu with swtpm running on host.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D18048

5 years agoCompilation failure on ppc and mips due to Revision 342066.
kadesai [Fri, 14 Dec 2018 10:49:48 +0000 (10:49 +0000)]
Compilation failure on ppc and mips due to Revision 342066.
Adding extra memset on chain frame.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoarm64: allwinner: axp81x: Fix double invertion for FLDO1
manu [Fri, 14 Dec 2018 10:26:17 +0000 (10:26 +0000)]
arm64: allwinner: axp81x: Fix double invertion for FLDO1

This fix booting on A64 boards when disabling the unused regulators at boot.
We did disable all the regulator handled by register 0x13 which of course contain
mandatory regulators for the board to be up.

Reported by: Mark Millard <marklmi@yahoo.com>
X-MFC-With: r340848

5 years agoichwd: add Sunrise Point-LP ID
avg [Fri, 14 Dec 2018 09:30:43 +0000 (09:30 +0000)]
ichwd: add Sunrise Point-LP ID

Submitted by: Tetsuya Uemura <t_uemura@macome.co.jp>
Tested by: Tetsuya Uemura <t_uemura@macome.co.jp>
MFC after: 2 weeks
Relnotes: maybe

5 years agoichwd: add support for clearing No Reboot bit in TCOv4
avg [Fri, 14 Dec 2018 09:28:20 +0000 (09:28 +0000)]
ichwd: add support for clearing No Reboot bit in TCOv4

This is based on a patch developed by
Tetsuya Uemura <t_uemura@macome.co.jp>.
Many thanks!

Submitted by: Tetsuya Uemura <t_uemura@macome.co.jp> (earlier version)
Tested by: Tetsuya Uemura <t_uemura@macome.co.jp>
MFC after: 2 weeks

5 years agong_bpf.4: fix EXAMPLES: do not activate promiscuous mode
eugen [Fri, 14 Dec 2018 09:24:14 +0000 (09:24 +0000)]
ng_bpf.4: fix EXAMPLES: do not activate promiscuous mode

PR: 102719
MFC after: 3 days

5 years agoDriver version upgrade 07.708.02.00-fbsd
kadesai [Fri, 14 Dec 2018 08:06:39 +0000 (08:06 +0000)]
Driver version upgrade 07.708.02.00-fbsd

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will increase debug level as current logging level has
kadesai [Fri, 14 Dec 2018 08:05:49 +0000 (08:05 +0000)]
This patch will increase debug level as current logging level has
very minimal prints and even few important messages will not get logged.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoChange IOC INIT wait time to 180 secs to keep it inline with timeout
kadesai [Fri, 14 Dec 2018 08:05:01 +0000 (08:05 +0000)]
Change IOC INIT wait time to 180 secs to keep it inline with timeout
used by internal DCMDs.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add support for NVME PRPs creation by driver for fastpath
kadesai [Fri, 14 Dec 2018 08:04:16 +0000 (08:04 +0000)]
This patch will add support for NVME PRPs creation by driver for fastpath
capable IOs. NVME specification supports specific type of scatter gather list
called as PRP (Physical Region Page) for IO data buffers. Since NVME drive is
connected behind SAS3.5 tri-mode adapter, MegaRAID driver/firmware has to convert
OS SGLs in native NVMe PRP format. For IOs sent to firmware, MegaRAID firmware
does this job of OS SGLs to PRP translation and send PRPs to backend NVME device.
For fastpath IOs, driver will do this OS SGLs to PRP translation.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add support for new DCMD to get PD information and a single data...
kadesai [Fri, 14 Dec 2018 08:03:28 +0000 (08:03 +0000)]
This patch will add support for new DCMD to get PD information and a single data structure
to specify LD and JBOD.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoTo improve RAID 1/10 Write performance, OS drivers need to issue the
kadesai [Fri, 14 Dec 2018 08:02:44 +0000 (08:02 +0000)]
To improve RAID 1/10 Write performance, OS drivers need to issue the
required Write IOs as Fast Path IOs (after the appropriate checks
allowing Fast Path to be used) to the appropriate physical drives
(translated from the OS logical IO) and wait for all Write IOs to complete.

Design: A write IO on RAID volume will be examined if it can be sent in
Fast Path based on IO size and starting LBA and ending LBA falling on to
a Physical Drive boundary. If the underlying RAID volume is a RAID 1/10,
driver issues two fast path write IOs one for each corresponding physical
drive after computing the corresponding start LBA for each physical drive.
Both write IOs will have the same payload and are posted to HW such that
replies land in the same reply queue.

If there are no resources available for sending two IOs, driver will send
the original IO from upper layer to RAID volume through the Firmware.

When both IOs are completed by HW, the resources will be released
and SCSI IO completion handler will be called.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoDetect sequential Write IOs and pass the hint that it is part of sequential
kadesai [Fri, 14 Dec 2018 08:01:49 +0000 (08:01 +0000)]
Detect sequential Write IOs and pass the hint that it is part of sequential
stream to help HBA Firmware do the Full Stripe Writes. For read IOs on
certain RAID volumes like Read Ahead volumes,this will help driver to
send it to Firmware even if the IOs can potentially be sent to
hardware directly (called fast path) bypassing firmware.

Design: 8 streams are maintained per RAID volume as per the combined
firmware/driver design. When there is no stream detected the LRU stream
is used for next potential stream and LRU/MRU map is updated to make this
as MRU stream. Every time a stream is detected the MRU map
is updated to make the current stream as MRU stream.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add new interface to support more than 256 JBODs.
kadesai [Fri, 14 Dec 2018 08:00:45 +0000 (08:00 +0000)]
This patch will add new interface to support more than 256 JBODs.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add support for divert bitmap in RAID map. Divert bitmap is supported for
kadesai [Fri, 14 Dec 2018 08:00:01 +0000 (08:00 +0000)]
This patch will add support for divert bitmap in RAID map. Divert bitmap is supported for
SAS3.5 adapters only.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add support for new Dynamic RaidMap to have different sizes
kadesai [Fri, 14 Dec 2018 07:59:09 +0000 (07:59 +0000)]
This patch will add support for new Dynamic RaidMap to have different sizes
for different number of supported VDs for SAS3.5 MegaRAID adapters.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agoThis patch will add support for next generation(SAS3.5) of Tri mode(SAS, SATA, NVMe)
kadesai [Fri, 14 Dec 2018 07:57:00 +0000 (07:57 +0000)]
This patch will add support for next generation(SAS3.5) of Tri mode(SAS, SATA, NVMe)
MegaRAID adapters.

Submitted by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed by:  Kashyap Desai <Kashyap.Desai@broadcom.com>
Approved by:  ken
MFC after:  3 days
Sponsored by:   Broadcom Inc

5 years agovfs: mostly depessimize NDINIT_ALL
mjg [Fri, 14 Dec 2018 03:55:08 +0000 (03:55 +0000)]
vfs: mostly depessimize NDINIT_ALL

1) filecaps_init was unnecesarily a function call
2) an asignment at the end was preventing tail calling of cap_rights_init

Sponsored by: The FreeBSD Foundation

5 years agoDo not complain when /dev/crypto does not exist.
jkim [Fri, 14 Dec 2018 01:06:34 +0000 (01:06 +0000)]
Do not complain when /dev/crypto does not exist.

Now the new devcrypto engine is enabled since r342009, many users started
seeing "Could not open /dev/crypto: No such file or directory".  Disable
the annoying error message as it is not very useful anyway.

Note the patch was submitted upstream.

https://github.com/openssl/openssl/pull/7896

5 years agoMFV: r342049
jkim [Fri, 14 Dec 2018 00:40:38 +0000 (00:40 +0000)]
MFV: r342049

Merge ACPICA 20181213.

5 years agoCast error message in efi_main.c to CHAR16* to avoid build error
bcran [Thu, 13 Dec 2018 23:49:20 +0000 (23:49 +0000)]
Cast error message in efi_main.c to CHAR16* to avoid build error

5 years agoPrint an error message in efi_main.c if we can't allocate memory for the heap
bcran [Thu, 13 Dec 2018 23:20:58 +0000 (23:20 +0000)]
Print an error message in efi_main.c if we can't allocate memory for the heap

With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes
the loader to be unable to allocate the 64MB it needs for the heap. This change
makes the cause of the error more obvious.

Differential Revision: https://reviews.freebsd.org/D17958

5 years agodtrace: fix userspace access on boxes with SMAP
mjg [Thu, 13 Dec 2018 20:09:38 +0000 (20:09 +0000)]
dtrace: fix userspace access on boxes with SMAP

dtrace has its own routines which were not updated after SMAP support got
implemented. Use ifunc just like for other routines.

This in particular fixes ustack().

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18542

5 years agonda(4) fix check for Dataset Management support
chuck [Thu, 13 Dec 2018 13:25:37 +0000 (13:25 +0000)]
nda(4) fix check for Dataset Management support

In the nda(4) driver, only set DISKFLAG_CANDELETE (a.k.a. can support
BIO_DELETE) if the drive supports Dataset Management. There are reports
that without this check, VMWare Workstation does not work reliably.

Fix is to check the ONCS field in the NVMe Controller Data structure for
support. This check previously existed but did not survive the
big-endian changes.

Reported by: yuripv@yuripv.net
Reviewed by: imp, mav, jimharris
Approved by: imp (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D18493

5 years agoCreate /etc/authpf, used by authpf(8) and authpf-noip(8).
des [Thu, 13 Dec 2018 12:58:42 +0000 (12:58 +0000)]
Create /etc/authpf, used by authpf(8) and authpf-noip(8).

MFC after: 1 week

5 years agoMFV r341771,342040,342041:
mm [Thu, 13 Dec 2018 11:18:45 +0000 (11:18 +0000)]
MFV r341771,342040,342041:
Sync libarchive with vendor.

Relevant vendor changes:
  PR #1102: RAR5 reader - fix big-endian problems
  PR #1105: Fix various crash, memory corruption and infinite loop conditions
  PR #1107: RAR5 reader: removed an unused function: bf_is_last_block

MFC after: 1 week

5 years agoPlug memory leak for AES_*_NIST_GMAC algorithms.
ae [Thu, 13 Dec 2018 08:59:51 +0000 (08:59 +0000)]
Plug memory leak for AES_*_NIST_GMAC algorithms.

swcr_newsession() allocates sw_ictx for these algorithms, thus we need
to free() it in swcr_freesession().

PR: 233907
MFC after: 1 week

5 years agoFix dates that I set into the future incorrectly.
dim [Thu, 13 Dec 2018 06:59:55 +0000 (06:59 +0000)]
Fix dates that I set into the future incorrectly.

Noticed by: ler

5 years agopowerpc/booke: Change KERNBASE to be physical load address
jhibbits [Thu, 13 Dec 2018 05:07:39 +0000 (05:07 +0000)]
powerpc/booke: Change KERNBASE to be physical load address

Previous commits have made VM_MIN_KERNEL_ADDRESS its own separate entity,
and rebased the kernel around that address instead of KERNBASE.  This commit
pulls the trigger to rebase KERNBASE to a physical load address.  The
eventual goal is to align the address with the AIM KERNBASE, but at this
time that's not an option.

Currently a Book-E kernel must be loaded on a 64MB boundary, due to size
issues.  The common load address is at the 64MB mark (0x04000000), so simply
make that the default KERNBASE.

As of this commit, Book-E kernels can be loaded and booted with ubldr.

MFC after: 3 weeks

5 years agopowerpcspe: Fix GPR handling in SPE exception handler
jhibbits [Thu, 13 Dec 2018 04:48:28 +0000 (04:48 +0000)]
powerpcspe: Fix GPR handling in SPE exception handler

Optimize the exception handler to only save and load the upper word of the
GPRs used in the emulating instruction.  This reduces the save/load
overhead, and as a side effect does not overwrite the upper word of any
temporary register.

With this commit I am now able to run editors/abiword and math/gnumeric on a
e500-based system.

MFC after: 1 week
MFC With: r341752,r341751

5 years agoGeneralize AES iov optimization
mmacy [Thu, 13 Dec 2018 04:40:53 +0000 (04:40 +0000)]
Generalize AES iov optimization

Right now, aesni_cipher_alloc does a bit of special-casing
for CRYPTO_F_IOV, to not do any allocation if the first uio
is large enough for the requested size. While working on ZFS
crypto port, I ran into horrible performance because the code
uses scatter-gather, and many of the times the data to encrypt
was in the second entry. This code looks through the list, and
tries to see if there is a single uio that can contain the
requested data, and, if so, uses that.

This has a slight impact on the current consumers, in that the
check is a little more complicated for the ones that use
CRYPTO_F_IOV -- but none of them meet the criteria for testing
more than one.

Submitted by: sef at ixsystems.com
Reviewed by: cem@
MFC after: 3 days
Sponsored by: iX Systems
Differential Revision: https://reviews.freebsd.org/D18522

5 years agoCorrectly implemenet atomic_swap_long for mips64.
imp [Thu, 13 Dec 2018 00:42:26 +0000 (00:42 +0000)]
Correctly implemenet atomic_swap_long for mips64.

MIPS64 has 64-bit longs, so use uint64_t for it, otherwise uint32_t.
sizeof(long) == sizeof(ptr) for all platforms, so define
atomic_swap_ptr in terms of atomic_swap_long.

Submitted by: hps@

5 years agomv_thermal: Add thermal driver for AP806 and CP110 thermal sensor
manu [Wed, 12 Dec 2018 22:33:05 +0000 (22:33 +0000)]
mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoarm64: mv_cp110_icu: Fix build
manu [Wed, 12 Dec 2018 22:24:30 +0000 (22:24 +0000)]
arm64: mv_cp110_icu: Fix build

5 years agomv_gpio: Since it's also an interrupt controller, attach sooner
manu [Wed, 12 Dec 2018 22:10:11 +0000 (22:10 +0000)]
mv_gpio: Since it's also an interrupt controller, attach sooner

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agosdhci_xenon: Add Marvell 8k compatible string
manu [Wed, 12 Dec 2018 22:09:35 +0000 (22:09 +0000)]
sdhci_xenon: Add Marvell 8k compatible string

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoarm64: Add mv_cp110_icu and mv_cp110_gicp
manu [Wed, 12 Dec 2018 22:08:43 +0000 (22:08 +0000)]
arm64: Add mv_cp110_icu and mv_cp110_gicp

icu is a interrupt concentrator in the CP110 block and gicp
is a gic extension to allow interrupts in the CP block to be turned
into GIC SPI interrupts

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agotwsi: Clean up marvell part and add support for Marvell 7k/8k
manu [Wed, 12 Dec 2018 22:05:07 +0000 (22:05 +0000)]
twsi: Clean up marvell part and add support for Marvell 7k/8k

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoarm64: marvell: Add cp110 clock controller support
manu [Wed, 12 Dec 2018 22:04:21 +0000 (22:04 +0000)]
arm64: marvell: Add cp110 clock controller support

The cp110 clock controller controls the clocks and gate of the CP110
hardware block.

Every clock/gate are implemented except the NAND clock.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoarm64: mv_gpio: Add Marvell 8K support
manu [Wed, 12 Dec 2018 22:02:57 +0000 (22:02 +0000)]
arm64: mv_gpio: Add Marvell 8K support

While here put the interrupts setup in it's own function

Sponsored by: Rubicon Communications, LCC ("Netgate")

5 years agoarm64: marvell: Add driver for Marvell Ap806 System Controller
manu [Wed, 12 Dec 2018 22:01:06 +0000 (22:01 +0000)]
arm64: marvell: Add driver for Marvell Ap806 System Controller

The first two clocks are for the clusters and their frequencies can be
found reading a register. Then a fixed 1200Mhz clock is present and two
fixed clocks, 'mss' which is 1200 / 6 and 'sdio' which is 1200 / 3.

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoarm64: mvebu_pinctrl: Add driver for Marvell Pinmux Controller
manu [Wed, 12 Dec 2018 22:00:05 +0000 (22:00 +0000)]
arm64: mvebu_pinctrl: Add driver for Marvell Pinmux Controller

Add a driver compatible with Marvell mvebu-pinctrl and add ap806-pinctrl
support.

Sponsored by: Rubicon Communications, LCC ("Netgate")

5 years agoarm64: Add new SoC type MARVELL_8K
manu [Wed, 12 Dec 2018 21:58:30 +0000 (21:58 +0000)]
arm64: Add new SoC type MARVELL_8K

Sponsored by: Rubicon Communications, LLC ("Netgate")

5 years agoEnable devcryptoeng for OpenSSL.
jkim [Wed, 12 Dec 2018 21:56:47 +0000 (21:56 +0000)]
Enable devcryptoeng for OpenSSL.

Since OpenSSL 1.1.1, the good old BSD-specific cryptodev engine has been
deprecated in favor of this new engine.  However, this engine is not
throughly tested on FreeBSD because it was originally written for Linux.

http://cryptodev-linux.org/

Also, the author actually meant to enable it by default on BSD platforms but
he failed to do so because there was a bug in the Configure script.

https://github.com/openssl/openssl/pull/7882

Now they found that it was more generic issue.

https://github.com/openssl/openssl/pull/7885

Therefore, we need to enable this engine on head to give it more exposure.

5 years agofdt: Add support for simple-mfd bus
manu [Wed, 12 Dec 2018 21:56:45 +0000 (21:56 +0000)]
fdt: Add support for simple-mfd bus

Quoting the binding Documentation :

"These devices comprise a nexus for heterogeneous hardware blocks containing
more than one non-unique yet varying hardware functionality."

Reviewed by: loos
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D17751

5 years agopwm: Fix some arches by using %ju and casting to uintmax_t
manu [Wed, 12 Dec 2018 21:25:52 +0000 (21:25 +0000)]
pwm: Fix some arches by using %ju and casting to uintmax_t

Reported by: ci.freebsd.org

5 years agoarm64: allwinner: Fix pwm dtso
manu [Wed, 12 Dec 2018 21:10:34 +0000 (21:10 +0000)]
arm64: allwinner: Fix pwm dtso

Double patched files ended up in the tree

Reported by: kevans

5 years agoarm64: allwinner: Add DTSO for pwm and r_pwm
manu [Wed, 12 Dec 2018 21:02:22 +0000 (21:02 +0000)]
arm64: allwinner: Add DTSO for pwm and r_pwm

Those are both dtso (overlays) for the two pwm controllers found on the A64.

5 years agoarm64: allwinner: Add pwm driver
manu [Wed, 12 Dec 2018 20:58:43 +0000 (20:58 +0000)]
arm64: allwinner: Add pwm driver

Add a pwm driver for Allwinner PWM
Add pwm and aw_pwm to the GENERIC kernel

5 years agoAdd a pwm subsystem so we can configure pwm controller from kernel and userland.
manu [Wed, 12 Dec 2018 20:56:56 +0000 (20:56 +0000)]
Add a pwm subsystem so we can configure pwm controller from kernel and userland.

The pwm subsystem consist of API for PWM controllers, pwmbus to register them
and a pwm(8) utility to talk to them from userland.

Reviewed by: oshgobo (capsicum), bcr (manpage), 0mp (manpage)
Differential Revision: https://reviews.freebsd.org/D17938

5 years agoAdd NETGRAPH_CHECKSUM.
sobomax [Wed, 12 Dec 2018 20:40:01 +0000 (20:40 +0000)]
Add NETGRAPH_CHECKSUM.

MFC after: 1 week

5 years agolibcapsicum: add missing links
oshogbo [Wed, 12 Dec 2018 20:32:17 +0000 (20:32 +0000)]
libcapsicum: add missing links

Reported by: manu