]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years ago- Fix incorrect values in the computation of CCK and OFDM transmit power
Kevin Lo [Sat, 17 Jun 2017 14:39:25 +0000 (14:39 +0000)]
- Fix incorrect values in the computation of CCK and OFDM transmit power
  for the rtl8188eu chipset
- Rename struct r92c_rom member names: s/channel_plan/reserved5/,
  s/xtal_calib/channel_plan to be compliant with definitions of the efuse
  in vendor hal_pg.h

7 years agoManually load tunable CPU quirks.
Michal Meloun [Sat, 17 Jun 2017 14:36:25 +0000 (14:36 +0000)]
Manually load tunable CPU quirks.
These are needed too early, far before SYSINIT is processed.

Reported by: zbb
Pointy hat to: mmel
MFC after: 3 weeks
MFC with:  r319896

7 years agoDo not leak syslog_mutex on cancellation.
Konstantin Belousov [Sat, 17 Jun 2017 11:29:59 +0000 (11:29 +0000)]
Do not leak syslog_mutex on cancellation.

Make syslog(3) resilent to cancellation occuring in supported deferred
mode.  Code must unlock syslog_mutex on cancel, install the cleanup
handler.

Diagnosed and tested by: eugen
Discussed with: dchagin
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoCorrect translations between abridged and full x87 tags.
Konstantin Belousov [Sat, 17 Jun 2017 11:25:31 +0000 (11:25 +0000)]
Correct translations between abridged and full x87 tags.

Reported and tested by: karnajit wangkhem <karnajitw@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUndefine temporary macro.
Ruslan Bukin [Sat, 17 Jun 2017 07:36:46 +0000 (07:36 +0000)]
Undefine temporary macro.
This fixes world build.

Sponsored by: DARPA, AFRL

7 years agoPages that are passed to swap_pager_putpages() should already be fully
Alan Cox [Sat, 17 Jun 2017 03:05:25 +0000 (03:05 +0000)]
Pages that are passed to swap_pager_putpages() should already be fully
dirty.  Assert that they are fully dirty rather than redundantly calling
vm_page_dirty() on them.

Reviewed by: kib, markj
MFC after: 1 week
X-MFC after: r319932

7 years agoo Move logic that determines size of the input image into its own
Maxim Sobolev [Sat, 17 Jun 2017 02:58:31 +0000 (02:58 +0000)]
o Move logic that determines size of the input image into its own
  file. That logic has grown quite significantly now;

o add a special handling for the snapshot images. Those have some
  extra headers at the end of the image and we don't need those
  in the output image really.

MFC after: 6 weeks

7 years agoUPDATING: sort 20170531 entry correctly (from r319664)
Ed Maste [Sat, 17 Jun 2017 01:27:15 +0000 (01:27 +0000)]
UPDATING: sort 20170531 entry correctly (from r319664)

7 years agoAdd UPDATING note about kevent(2) ABI change.
Konstantin Belousov [Sat, 17 Jun 2017 01:09:18 +0000 (01:09 +0000)]
Add UPDATING note about kevent(2) ABI change.

Sponsored by: The FreeBSD Foundation

7 years agoBump __FreeBSD_version for r320043, struct event 64-bit data.
Konstantin Belousov [Sat, 17 Jun 2017 01:06:48 +0000 (01:06 +0000)]
Bump __FreeBSD_version for r320043, struct event 64-bit data.

Sponsored by: The FreeBSD Foundation

7 years agoRegen.
Konstantin Belousov [Sat, 17 Jun 2017 00:58:19 +0000 (00:58 +0000)]
Regen.

7 years agoAdd abstime kqueue(2) timers and expand struct kevent members.
Konstantin Belousov [Sat, 17 Jun 2017 00:57:26 +0000 (00:57 +0000)]
Add abstime kqueue(2) timers and expand struct kevent members.

This change implements NOTE_ABSTIME flag for EVFILT_TIMER, which
specifies that the data field contains absolute time to fire the
event.

To make this useful, data member of the struct kevent must be extended
to 64bit.  Using the opportunity, I also added ext members.  This
changes struct kevent almost to Apple struct kevent64, except I did
not changed type of ident and udata, the later would cause serious API
incompatibilities.

The type of ident was kept uintptr_t since EVFILT_AIO returns a
pointer in this field, and e.g. CHERI is sensitive to the type
(discussed with brooks, jhb).

Unlike Apple kevent64, symbol versioning allows us to claim ABI
compatibility and still name the new syscall kevent(2).  Compat shims
are provided for both host native and compat32.

Requested by: bapt
Reviewed by: bapt, brooks, ngie (previous version)
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D11025

7 years agoStyle.
Konstantin Belousov [Fri, 16 Jun 2017 23:41:13 +0000 (23:41 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
X-Differential revision: https://reviews.freebsd.org/D11025

7 years agoMove the description of kern.kq_calloutmax sysctl into a new paragraph
Konstantin Belousov [Fri, 16 Jun 2017 23:25:11 +0000 (23:25 +0000)]
Move the description of kern.kq_calloutmax sysctl into a new paragraph
for better presentation.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoStart a new sentence on the new line.
Konstantin Belousov [Fri, 16 Jun 2017 23:17:31 +0000 (23:17 +0000)]
Start a new sentence on the new line.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

7 years agoTCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatch
Sean Bruno [Fri, 16 Jun 2017 22:32:23 +0000 (22:32 +0000)]
TCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatch
(tcp wrapper oracle) warning fixes via edits to the C code files

contrib/tcp_wrappers/fakelog.c
  Warnings for each of functions: openlog( ), vsyslog( ), VARARGS( ),
  closelog( )
    warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    warning: control reaches end of non-void function [-Wreturn-type]
  Fixes:
      Explicitly added specification of function type to void for each
        function, suppressing both warnings for each function listed
contrib/tcp_wrappers/inetcf.c
  Warnings:
      warning: incompativle redeclaration of library function 'malloc'
        note: 'malloc' is a builtin with type 'void *(unsigned long)'
      warning: implicit declaration of function 'check_path' is invalid in C99
        [-Wimplicit-function-declaration]
  Fixes:
      Removed redeclaration of malloc on line 21
      Included library <stdlib.h> in the code which contains the malloc( )
        function in it's library
      Included scaffold.h header file in the code that contains check-path( )
        function
contrib/tcp_wrappers/scaffold.c
  Warnings:
      warning: implicitly declaring library function 'exit' with type
        'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
      note: include the header <stdlib.h> or explicitly provide a declaration
        for 'exit'
  Fixes:
      Included <stdlib.h> in the code which contains the exit( ) function in
      it's library
contrib/tcp_wrappers/tcpdchk.c
  Warnings:
      warning: implicit declaration of function 'getopt' is invalid
        in C99 [-Wimplicit-function-declaration]
      warning: implicit declaration of function 'atoi' is invalid
        in C99 [-Wimplicit-function-declaration]
  Fixes:
      Included the specific function <getopt.h> library to the code
      Included<stdlib.h> to the code which contains the atoi( ) function in
        the library
contrib/tcp_wrappers/tcpdmatch.c
  Warnings:
      warning: implicit declaration of function 'getopt' is invalid in C99
        [-Wimplicit-function-declaration]
  Fixes:
      Included<stdlib.h> to the code which contains the getopt( ) function in
        the library

Submitted by: Aaron Prieger <aprieger@llnw.com>
Reviewed by: vangyzen
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D10995

7 years agoWITH_META_MODE: End each ERROR_CMD CMD line with ';'.
Bryan Drewery [Fri, 16 Jun 2017 21:48:42 +0000 (21:48 +0000)]
WITH_META_MODE: End each ERROR_CMD CMD line with ';'.

This makes it easier to debug multi-line command failures.

X-MFC-With: r319862
MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoFix more incorrect library directories fix 'stale .depend' rebuilds.
Bryan Drewery [Fri, 16 Jun 2017 21:37:05 +0000 (21:37 +0000)]
Fix more incorrect library directories fix 'stale .depend' rebuilds.

Reported by: sbruno
MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoFix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd.
Bryan Drewery [Fri, 16 Jun 2017 20:47:12 +0000 (20:47 +0000)]
Fix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd.

This originally came in r275052.

Reported by: sbruno
MFC after: 3 days
Sponsored by: Dell EMC Isilon

7 years agoAdd chain loader support for loader
Toomas Soome [Fri, 16 Jun 2017 20:08:44 +0000 (20:08 +0000)]
Add chain loader support for loader

Implement simple chain loader in loader; this update does add chain command,
taking device or file as argument to load and start new boot loader.

In case of BIOS, the chain will read the boot block to address 0000:7c00 and
jumps on it. In case of UEFI, the chain command is to be used with efi
application, typically stored in EFI System Partition.

The update also does add simple menu entry, if the variable chain_disk is set.
The value of the variable chain_disk is used as argument for chain loading.

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5992

7 years agoDecode arguments to sched_* family of system calls.
John Baldwin [Fri, 16 Jun 2017 20:03:09 +0000 (20:03 +0000)]
Decode arguments to sched_* family of system calls.

This includes decoding both scheduler policy constants and the sched_param
structure for sched_get_priority_max(), sched_get_priority_min(),
sched_getparam(), sched_getscheduler(), sched_rr_get_interval(),
sched_setparam(), and sched_setscheduler().

7 years agoQuiesce clang warning while building lpc.
Sean Bruno [Fri, 16 Jun 2017 20:00:39 +0000 (20:00 +0000)]
Quiesce clang warning while building lpc.

usr.sbin/lpr/lpc/lpc.c
  Warning
    passing 'char *[20]' to parameter of type 'const char **' discards
    qualifiers in nested pointer types
    [-Wincompatible-pointer-types-discards-qualifiers]
  Fix:
     Explicitly cast the variable "margv" to const char ** only for it's
     use as a parameter to suppress the error

Submitted by: Aaron Prieger <aprieger@llnw.com>
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D11019

7 years agobsdinstall: correct comment after r320007
Ed Maste [Fri, 16 Jun 2017 19:26:33 +0000 (19:26 +0000)]
bsdinstall: correct comment after r320007

Submitted by: vangyzen

7 years agobsdinstall: use consistent EFI configuration across platforms
Ed Maste [Fri, 16 Jun 2017 18:58:48 +0000 (18:58 +0000)]
bsdinstall: use consistent EFI configuration across platforms

- increase arm64 EFI partition to 200M, as x86
- use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86
- increase ZFS EFI partition to 200M

PR: 201898
Reviewed by: allanjude, manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11239

7 years agoRevert change to description introduced in r320002
Zbigniew Bodek [Fri, 16 Jun 2017 17:31:56 +0000 (17:31 +0000)]
Revert change to description introduced in r320002

Currently some ARM platforms implement their own platform_probe_and_attach()
function and other use common routine that calls platform's PLATFORM_ATTACH
method.
Keep the old description to match the preferred way of naming things.

Pointed out by: andrew

7 years agoEnhance Armada 38x SoC identification string
Zbigniew Bodek [Fri, 16 Jun 2017 17:18:29 +0000 (17:18 +0000)]
Enhance Armada 38x SoC identification string

Add hw_clockrate and CPU frequency, basing on sample-at-reset
configuration.

Submitted by: Arnaud Ysmal <arnaud.ysmal@stormshield.eu>
Marcin Wojtas <mw@semihalf.com>
Obtained from: Stormshield, Semihalf
Sponsored by: Stormshield
Reviewed by: andrew
Differential revision: https://reviews.freebsd.org/D10899

7 years agoDocument st_flags in the stat(2).
Maxim Sobolev [Fri, 16 Jun 2017 15:09:43 +0000 (15:09 +0000)]
Document st_flags in the stat(2).

Approved by: mckusick,vangyzen,jilles
Differential Revision: https://reviews.freebsd.org/D10852

7 years agoDon't print all timezones during installworld.
Edward Tomasz Napierala [Fri, 16 Jun 2017 14:19:23 +0000 (14:19 +0000)]
Don't print all timezones during installworld.

Submitted by: Alex Richardson <alr48@cl.cam.ac.uk>
Reviewed by: gjb
MFC after: 1 month
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11154

7 years agoMinor style improvements to pmap_remap_vm_attr()
Zbigniew Bodek [Fri, 16 Jun 2017 13:53:02 +0000 (13:53 +0000)]
Minor style improvements to pmap_remap_vm_attr()

Use correct platform_ function name in the comment and remove
redundant tabs.

7 years agoFix typo in "Marvell" string
Zbigniew Bodek [Fri, 16 Jun 2017 10:16:24 +0000 (10:16 +0000)]
Fix typo in "Marvell" string

Change Marwell to Marvell

Pointed out by: Ravi Pokala <rpokala@mac.com>

7 years agoMerge libxo-0.8.2:
Phil Shafer [Fri, 16 Jun 2017 06:29:21 +0000 (06:29 +0000)]
Merge libxo-0.8.2:
- xohtml: Add "-w" option to pull support files from gh_pages
- Add "upload-xohtml-files" target to publish support files in gh_pages/
- add HISTORY/AUTHORS section to man pages
- xohtml: Add div.units as standard CSS text
- Don't treat values as format strings; they are not
- add "-p" to "mkdir -p build" in setup.sh
- add test case for {U:%%} (from df.c)
- detect end-of-string in '%' and '' escaping
- make xo_simple_field, for common simple cases
- xohtml: nuke "n" in "echo" commands
- rename "format" to "fmt" for consistency; same for "str" to "value"
- update test cases

Submitted by: phil

7 years agoImport libxo 0.8.2
Phil Shafer [Fri, 16 Jun 2017 06:12:07 +0000 (06:12 +0000)]
Import libxo 0.8.2

7 years agoWITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.
Bryan Drewery [Fri, 16 Jun 2017 04:28:10 +0000 (04:28 +0000)]
WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty.

This was sed'ing on stdin for failing .PHONY targets.

Reported by: Mark Millard
X-MFC-With: r319862
MFC after: 1 week
Sponsored by: Dell EMC Isilon

7 years agoCheck if pthread_create(3) successfully created the thread prior to call
Marcelo Araujo [Fri, 16 Jun 2017 01:26:01 +0000 (01:26 +0000)]
Check if pthread_create(3) successfully created the thread prior to call
pthread_join(3). The variable tid is not yet initialized in case
the authentication fails at early stage, that would lead pthread_join be
called with an uninitialized variable.

CID: 1375950
Reported by: Coverity, cem
Reviewed by: cem
MFC after: 3 weeks.
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D11150

7 years ago[ar71xx] migrate all of the duplicate configuration out into a shared config file.
Adrian Chadd [Fri, 16 Jun 2017 00:44:23 +0000 (00:44 +0000)]
[ar71xx] migrate all of the duplicate configuration out into a shared config file.

This brings the default configurations (drivers, net80211 settings, etc) and some
of the shared configuration into std.AR_MIPS_BASE.  I haven't yet moved the
-current settings (witness, memguard, etc) into it.

This should simplify building a lot of the same test images for my MIPS AP board
development and testing.

This is a work in progress; it's not designed to be perfect!

7 years agocopy(9): clarify that copystr() does not return EFAULT
Eric van Gyzen [Thu, 15 Jun 2017 21:34:43 +0000 (21:34 +0000)]
copy(9): clarify that copystr() does not return EFAULT

The previous wording implied that copystr() could return EFAULT.

MFC after: 6 weeks
Sponsored by: Dell EMC

7 years agobnxt(4): Implement temporary workaround in driver to report supported media
Sean Bruno [Thu, 15 Jun 2017 21:14:48 +0000 (21:14 +0000)]
bnxt(4):  Implement temporary workaround in driver to report supported media
types that are currently unavailable from the firmware.  e.g. 10G, 25G, 50G
& 100G

Submitted by: bhargava.marreddy@broadcom.com
Reviewed by: venkatkumar.duvvuru@broadcom.com
Differential Revision: https://reviews.freebsd.org/D10816

7 years agobnxt(4) Enable LRO support
Sean Bruno [Thu, 15 Jun 2017 21:06:03 +0000 (21:06 +0000)]
bnxt(4) Enable LRO support

iflib - Handle out of order packet delivery from hardware in support of LRO

Out of order updates to rxd's is fixed in r315217. However, it is not
completely fixed.  While refilling the buffers, iflib is not considering
the out of order descriptors. Hence, it is refilling sequentially.
"idx" variable in _iflib_fl_refill routine is incremented sequentially.
By doing refilling sequentially, it will override the SGEs that
are *IN USE* by other connections.  Fix is to maintain a bitmap of
rx descriptors and differentiate the used one with unused one and
refill only at the unused indices.  This patch also fixes a
few bugs in bnxt, related to the same feature.

Submitted by: bhargava.marreddy@broadcom.com
Reviewed by: shurd@
Differential Revision: https://reviews.freebsd.org/D10681

7 years agoPlug read(2) and write(2) on listening sockets.
Gleb Smirnoff [Thu, 15 Jun 2017 20:11:29 +0000 (20:11 +0000)]
Plug read(2) and write(2) on listening sockets.

7 years agoReplace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
Stephen J. Kiernan [Thu, 15 Jun 2017 20:06:41 +0000 (20:06 +0000)]
Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).
Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
expects number of 512-byte blocks while tmpfs size option wants number of
bytes.

Reviewed by: brooks
Approved by: sjg (mentor)
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D11106

7 years agocxgbe(4): Fix per-queue netmap operation.
Navdeep Parhar [Thu, 15 Jun 2017 19:56:59 +0000 (19:56 +0000)]
cxgbe(4):  Fix per-queue netmap operation.

Do not attempt to initialize netmap queues that are already initialized
or aren't supposed to be initialized.  Similarly, do not free queues
that are not initialized or aren't supposed to be freed.

PR: 217156
Sponsored by: Chelsio Communications

7 years agoRevert r319921 which seems to cause NFS booting assertion panics in
Sean Bruno [Thu, 15 Jun 2017 17:46:20 +0000 (17:46 +0000)]
Revert r319921 which seems to cause NFS booting assertion panics in
various configurations.

Reported by: pho@

7 years agoSome minor improvements to vnode_pager_generic_putpages().
Konstantin Belousov [Thu, 15 Jun 2017 14:34:33 +0000 (14:34 +0000)]
Some minor improvements to vnode_pager_generic_putpages().
- Add asserts that the pages to write are dirty.  The last page, if
  partially written, is only required to be dirty, while completely
  written pages should have all dirty bit set.
- Use uintmax_t to print vm_page pindexes.
- Use NULL instead of casted zero.
- Remove if () test which duplicated the loop ending condition.
- Miscellaneous style fixes.

Reviewed by: alc, markj (previous version)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUse static device numbering instead of dynamic one when creating
Hans Petter Selasky [Thu, 15 Jun 2017 11:56:40 +0000 (11:56 +0000)]
Use static device numbering instead of dynamic one when creating
mlx4en network interfaces. This prevents infinite unit number growth
typically when the mlx4en driver is used inside virtual machines which
support runtime PCI attach and detach.

MFC after: 3 days
Sponsored by: Mellanox Technologies

7 years agoUpdate jemalloc to 5.0.0.
Jason Evans [Thu, 15 Jun 2017 07:15:05 +0000 (07:15 +0000)]
Update jemalloc to 5.0.0.

7 years agoUse nitems() from sys/param.h.
Marcelo Araujo [Thu, 15 Jun 2017 06:48:36 +0000 (06:48 +0000)]
Use nitems() from sys/param.h.

MFC after: 4 weeks.

7 years agoUse nitems() from sys/param.h.
Marcelo Araujo [Thu, 15 Jun 2017 06:46:40 +0000 (06:46 +0000)]
Use nitems() from sys/param.h.

MFC after: 4 weeks.

7 years agoInitialize variables and use byteorder(9) instead of aliasing char array
Marcelo Araujo [Thu, 15 Jun 2017 06:21:01 +0000 (06:21 +0000)]
Initialize variables and use byteorder(9) instead of aliasing char array
buf via uint32_t pointer.

CID: 1375949
Reported by: Coverity, cem
Reviewed by: cem
MFC after: 3 weeks
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D11153

7 years agoddb show socket debugging
Ryan Libby [Thu, 15 Jun 2017 04:49:12 +0000 (04:49 +0000)]
ddb show socket debugging

Display the mbuf/cluster count for a sockbuf and fix a couple whitespace
issues in the output.

Reviewed by: jhb, markj (both previous version)
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11062

7 years agoUpgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0
David C Somayajulu [Thu, 15 Jun 2017 02:45:43 +0000 (02:45 +0000)]
Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0
Add support for pci deviceID 0x8070 for QLE41xxx product line which
supports 10GbE/25GbE/40GbE

MFC after:5 days

7 years agoCorrect example directory location.
Cy Schubert [Thu, 15 Jun 2017 00:59:02 +0000 (00:59 +0000)]
Correct example directory location.

Submitted by: olivier@
MFC after: 3 days

7 years agolld: Add armelf emulation mode
Ed Maste [Wed, 14 Jun 2017 19:36:28 +0000 (19:36 +0000)]
lld: Add armelf emulation mode

Obtained from: LLD r305375

7 years agolld: Fix weak symbols on arm and aarch64
Ed Maste [Wed, 14 Jun 2017 18:56:33 +0000 (18:56 +0000)]
lld: Fix weak symbols on arm and aarch64

Given

.weak target
 .global _start
_start:
 b target

The intention is that the branch goes to the instruction after the
branch, effectively turning it on a nop.  The branch adds the runtime
PC, but we were adding it statically too.

I noticed the oddity by inspection, but llvm-objdump seems to agree,
since it now prints things like:

b       #-4 <_start+0x4>

Obtained from:  LLD commit r305212
Differential Revision:  https://reviews.freebsd.org/D11191

Reviewed by: dim, Rafael Espíndola
Obtained from: LLD r305212
MFC after: 3 days

7 years agolld: sort relocations
Ed Maste [Wed, 14 Jun 2017 18:53:33 +0000 (18:53 +0000)]
lld: sort relocations

No functional change; applied to facilitate merge of later LLD commit.

Reviewed by: dim, Rafael Espíndola
Obtained from: LLD r298797
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D11190

7 years agoModernize FreeBSD version numbers in freebsd-update(8).
Glen Barber [Wed, 14 Jun 2017 18:34:22 +0000 (18:34 +0000)]
Modernize FreeBSD version numbers in freebsd-update(8).
While here, expand a contraction to make textproc/igor happy.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

7 years agoMFV r319951: 8311 ZFS_READONLY is a little too strict
Andriy Gapon [Wed, 14 Jun 2017 16:55:47 +0000 (16:55 +0000)]
MFV r319951: 8311 ZFS_READONLY is a little too strict

illumos/illumos-gate@2889ec41c05e9ffe1890b529b3111354da325aeb
https://github.com/illumos/illumos-gate/commit/2889ec41c05e9ffe1890b529b3111354da325aeb

https://www.illumos.org/issues/8311
  Description:
  There was a misunderstanding about the enforcement details of the "Read-only"
  flag introduced for SMB/CIFS compatibility, way back in 2007 in the Sun PSARC
  2007/315 case.
  The original authors thought enforcement of the READONLY flag should work
  similarly as the IMMUTABLE flag. Unfortunately, that enforcement is
  incompatible with the expectations of Windows applications using this feature
  through the SMB service. Applications assume (and the MS File System Algorithms
  MS-FSA confirms they should) that an SMB client can:
  (a) Open an SMB handle on a file with read/write access,
  (b) Set the DOS attributes to include the READONLY flag,
  (c) continue to have write access via that handle.
  This access model is essentially the same as a Unix/POSIX application that
  creates a file (with read/write access), uses fchmod() to change the file mode
  to something not granting write access (i.e. 0444), and then continues to write
  that file using the open handle it got before the mode change.
  Currently, the SMB server works-around this problem in a way that will become
  difficult to maintain as we implement support for SMB3 persistent handles, so
  SMB depends on this fix.
  I've written a test program that can be used to demonstrate this problem, and
  added it to zfs-tests (tests/functional/acl/cifs/cifs_attr_004_pos).
  It currently fails, but will pass when this problem fixed.
  Steps to Reproduce:
    Run the test program on a ZFS file system.
  Expected Results:
    Pass
  Actual Results:
    Fail.

Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Prakash Surya <prakash.surya@delphix.com>
Author: Gordon Ross <gwr@nexenta.com>
MFC after: 2 weeks

7 years agoFix indentation.
Mark Johnston [Wed, 14 Jun 2017 16:55:23 +0000 (16:55 +0000)]
Fix indentation.

MFC after: 1 week

7 years ago8311 ZFS_READONLY is a little too strict
Andriy Gapon [Wed, 14 Jun 2017 16:46:49 +0000 (16:46 +0000)]
8311 ZFS_READONLY is a little too strict

illumos/illumos-gate@2889ec41c05e9ffe1890b529b3111354da325aeb
https://github.com/illumos/illumos-gate/commit/2889ec41c05e9ffe1890b529b3111354da325aeb

https://www.illumos.org/issues/8311
  Description:
  There was a misunderstanding about the enforcement details of the "Read-only"
  flag introduced for SMB/CIFS compatibility, way back in 2007 in the Sun PSARC
  2007/315 case.
  The original authors thought enforcement of the READONLY flag should work
  similarly as the IMMUTABLE flag. Unfortunately, that enforcement is
  incompatible with the expectations of Windows applications using this feature
  through the SMB service. Applications assume (and the MS File System Algorithms
  MS-FSA confirms they should) that an SMB client can:
  (a) Open an SMB handle on a file with read/write access,
  (b) Set the DOS attributes to include the READONLY flag,
  (c) continue to have write access via that handle.
  This access model is essentially the same as a Unix/POSIX application that
  creates a file (with read/write access), uses fchmod() to change the file mode
  to something not granting write access (i.e. 0444), and then continues to write
  that file using the open handle it got before the mode change.
  Currently, the SMB server works-around this problem in a way that will become
  difficult to maintain as we implement support for SMB3 persistent handles, so
  SMB depends on this fix.
  I've written a test program that can be used to demonstrate this problem, and
  added it to zfs-tests (tests/functional/acl/cifs/cifs_attr_004_pos).
  It currently fails, but will pass when this problem fixed.
  Steps to Reproduce:
    Run the test program on a ZFS file system.
  Expected Results:
    Pass
  Actual Results:
    Fail.

Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Prakash Surya <prakash.surya@delphix.com>
Author: Gordon Ross <gwr@nexenta.com>

7 years ago5220 L2ARC does not support devices that do not provide 512B access
Andriy Gapon [Wed, 14 Jun 2017 16:44:10 +0000 (16:44 +0000)]
5220 L2ARC does not support devices that do not provide 512B access

illumos/illumos-gate@403a8da73c64ff9dfb6230ba045c765a242213fb
https://github.com/illumos/illumos-gate/commit/403a8da73c64ff9dfb6230ba045c765a242213fb

https://www.illumos.org/issues/5220
  There are disk devices that have logical sector size larger than 512B, for
  example 4KB. That is, their physical sector size is larger than 512B and they
  do not provide emulation for 512B sector sizes. For such devices both a data
  offset and a data size must be properly aligned. L2ARC should arrange that
  because it uses physical I/O.
  zio_vdev_io_start() performs a necessary transformation if io_size is not
  aligned to vdev_ashift, but that is done only for logical I/O. Something
  similar should be done in L2ARC code.
      * a temporary write buffer should be allocated if the original buffer is
        not going to be compressed and its size is not aligned
      * size of a temporary compression buffer should be ashift aligned
      * for the reads, if a size of a target buffer is not sufficiently large and
        it is not aligned then a temporary read buffer should be allocated

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>

7 years agoMFV r319948: 5428 provide fts(), reallocarray(), and strtonum()
Andriy Gapon [Wed, 14 Jun 2017 16:42:38 +0000 (16:42 +0000)]
MFV r319948: 5428 provide fts(), reallocarray(), and strtonum()

illumos/illumos-gate@4585130b259133a26efae68275dbe56b08366deb
https://github.com/illumos/illumos-gate/commit/4585130b259133a26efae68275dbe56b08366deb

https://www.illumos.org/issues/5428

Most of the upstream change is not applicable to FreeBSD.
Only the renaming of strtonum to zfs_strtonum is relevant to us.
And we already had it partially done.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>
MFC after: 1 week

7 years ago5428 provide fts(), reallocarray(), and strtonum()
Andriy Gapon [Wed, 14 Jun 2017 16:36:01 +0000 (16:36 +0000)]
5428 provide fts(), reallocarray(), and strtonum()

illumos/illumos-gate@4585130b259133a26efae68275dbe56b08366deb
https://github.com/illumos/illumos-gate/commit/4585130b259133a26efae68275dbe56b08366deb

https://www.illumos.org/issues/5428

Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Joshua M. Clulow <josh@sysmgr.org>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

7 years agoMFV r319945,r319946: 8264 want support for promoting datasets in libzfs_core
Andriy Gapon [Wed, 14 Jun 2017 16:31:36 +0000 (16:31 +0000)]
MFV r319945,r319946: 8264 want support for promoting datasets in libzfs_core

illumos/illumos-gate@a4b8c9aa65a0a735aba318024a424a90d7b06c37
https://github.com/illumos/illumos-gate/commit/a4b8c9aa65a0a735aba318024a424a90d7b06c37

https://www.illumos.org/issues/8264
  Oddly there is a lzc_clone function, but no lzc_promote function.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@kebe.com>
Approved by: Dan McDonald <danmcd@kebe.com>
Author: Andrew Stormont <astormont@racktopsystems.com>
MFC after: 1 week

7 years ago8264 want support for promoting datasets in libzfs_core
Andriy Gapon [Wed, 14 Jun 2017 16:27:54 +0000 (16:27 +0000)]
8264 want support for promoting datasets in libzfs_core

illumos/illumos-gate@a4b8c9aa65a0a735aba318024a424a90d7b06c37
https://github.com/illumos/illumos-gate/commit/a4b8c9aa65a0a735aba318024a424a90d7b06c37

https://www.illumos.org/issues/8264
  Oddly there is a lzc_clone function, but no lzc_promote function.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@kebe.com>
Approved by: Dan McDonald <danmcd@kebe.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

7 years ago8264 want support for promoting datasets in libzfs_core
Andriy Gapon [Wed, 14 Jun 2017 16:23:15 +0000 (16:23 +0000)]
8264 want support for promoting datasets in libzfs_core

illumos/illumos-gate@a4b8c9aa65a0a735aba318024a424a90d7b06c37
https://github.com/illumos/illumos-gate/commit/a4b8c9aa65a0a735aba318024a424a90d7b06c37

https://www.illumos.org/issues/8264
  Oddly there is a lzc_clone function, but no lzc_promote function.

Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@kebe.com>
Approved by: Dan McDonald <danmcd@kebe.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

7 years agoCheck return value from soaccept().
Gleb Smirnoff [Wed, 14 Jun 2017 16:13:20 +0000 (16:13 +0000)]
Check return value from soaccept().

Coverity: 1376209

7 years agoDon't try to assign interrupts to a CPU on single-CPU systems.
John Baldwin [Wed, 14 Jun 2017 13:34:09 +0000 (13:34 +0000)]
Don't try to assign interrupts to a CPU on single-CPU systems.

All interrupts are routed to the sole CPU in that case implicitly.
This is a regression in EARLY_AP_STARTUP.  Previously the 'assign_cpu'
variable was only set when a multi-CPU system finished booting, so
it's value both meant that interrupts could be assigned and that
there was more than one CPU.

PR: 219882
Reported by: ota@j.email.ne.jp
MFC after: 3 days

7 years agoddb show files: fix up file types and whitespace
Ryan Libby [Wed, 14 Jun 2017 07:46:52 +0000 (07:46 +0000)]
ddb show files: fix up file types and whitespace

This makes ddb show files more descriptive and also adjusts the
whitespace to align the columns for non-32-bit architectures.

Reviewed by: cem (previous version), jhb
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D11061

7 years agoActually add the mpc85xx_get_platform_clock() function.
Justin Hibbits [Wed, 14 Jun 2017 04:26:37 +0000 (04:26 +0000)]
Actually add the mpc85xx_get_platform_clock() function.

Follow up r319935 by actually committing the mpc85xx_get_platform_clock()
function.  This function was created to facilitate other development, and I
thought I had committed it earlier.

Some blocks depend on the platform clock rather than the system clock.
The System clock is derived from the platform clock as one-half the
platform clock.  Rewrite mpc85xx_get_system_clock() to use the new
function.

Pointy-hat to: jhibbits

7 years agoUse mpc85xx_get_platform_clock() instead of rolling our own.
Justin Hibbits [Wed, 14 Jun 2017 04:16:37 +0000 (04:16 +0000)]
Use mpc85xx_get_platform_clock() instead of rolling our own.

Now that we have a single source for the platform clock, we don't need to
roll our own in every user.

7 years agoDon't call vm_pager_page_unswapped() when writing or deleting a dirty page.
Mark Johnston [Wed, 14 Jun 2017 03:55:11 +0000 (03:55 +0000)]
Don't call vm_pager_page_unswapped() when writing or deleting a dirty page.

The swap space backing a clean page is released when it is first dirtied,
so there's no need to attempt to release swap space when the page is
already dirty.

Reviewed by: alc
MFC after: 1 week

7 years agoFree the request page if an I/O error occurs while reading from swap.
Mark Johnston [Wed, 14 Jun 2017 03:50:02 +0000 (03:50 +0000)]
Free the request page if an I/O error occurs while reading from swap.

After such a failure, the page is invalid, so there's point in keeping it
around. Moreover, such pages were not being inserted into the active queue,
making them unreclaimable until a subsequent write or delete made them
valid.

Reported by: alc
Reviewed by: alc (previous revision)
MFC after: 1 week

7 years agoFix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs.
Mark Johnston [Wed, 14 Jun 2017 03:45:26 +0000 (03:45 +0000)]
Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs.

Such requests would previously mark the entire page as valid, which was
incorrect since nothing guaranteed that the page's contents had been
initialized. This change also modifies subpage BIO_DELETEs so that the
entire page is marked dirty, rather than only a subrange. There is no
benefit to creating partially dirty swap pages.

Reviewed by: alc, kib (previous version)
MFC after: 3 days

7 years agoChase r319848: remove -v option from getopt() call.
Cy Schubert [Wed, 14 Jun 2017 02:42:38 +0000 (02:42 +0000)]
Chase r319848: remove -v option from getopt() call.

7 years ago-n (do nothing) is not a commmand option.
Cy Schubert [Wed, 14 Jun 2017 02:41:22 +0000 (02:41 +0000)]
-n (do nothing) is not a commmand option.

7 years agoUse nitems(..) when computing `max` instead of the longhand version of
Enji Cooper [Wed, 14 Jun 2017 02:28:10 +0000 (02:28 +0000)]
Use nitems(..) when computing `max` instead of the longhand version of
the same logic

MFC after: 1 month

7 years agoAdd myself (rlibby) as a src committer and markj as my mentor.
Ryan Libby [Tue, 13 Jun 2017 23:50:55 +0000 (23:50 +0000)]
Add myself (rlibby) as a src committer and markj as my mentor.

Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D11189

7 years agobnxt: In case of multi queues, have unique name for different IRQs.
Sean Bruno [Tue, 13 Jun 2017 23:49:49 +0000 (23:49 +0000)]
bnxt: In case of multi queues, have unique name for different IRQs.

Submitted by: bhargava.marreddy@broadcom.com
Differential Revision: https://reviews.freebsd.org/D11149

7 years agoAdd new sysctl to allow changing of timing of the txq timers.
Sean Bruno [Tue, 13 Jun 2017 23:16:38 +0000 (23:16 +0000)]
Add new sysctl to allow changing of timing of the txq timers.

Add new sysctl to override use of busdma in the driver.

Submitted by: Drew Gallitin <gallatin@netflix.com>

7 years agoRevert r319796 for now, it can cause undefined references when linking
Dimitry Andric [Tue, 13 Jun 2017 21:01:06 +0000 (21:01 +0000)]
Revert r319796 for now, it can cause undefined references when linking
in some circumstances.

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>

7 years agoPlug mbuf leak in the busdma path of iflib.
Sean Bruno [Tue, 13 Jun 2017 19:32:23 +0000 (19:32 +0000)]
Plug mbuf leak in the busdma path of iflib.

Submitted by: Michael Tuexen <tuexen@freebsd.org>
Reported by: Drew Gallitin <gallatin@netflix.com>

7 years agoRemove stray return.
Konstantin Belousov [Tue, 13 Jun 2017 19:02:12 +0000 (19:02 +0000)]
Remove stray return.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoEnable HWPMC overflow IRQ on both CPUs in MPIC
Zbigniew Bodek [Tue, 13 Jun 2017 18:55:21 +0000 (18:55 +0000)]
Enable HWPMC overflow IRQ on both CPUs in MPIC

This commit enables usage of HWPMC interrupts for the
Marvell SoCs, which use MPIC (Armada38x and ArmadaXP).
Those interrupts require extra unmasking, comparing to
others. Also, in order to process counters per-CPU,
they are masked/unmasked using separate registers' sets
for each core.

Submitted by: Michal Mazur <mkm@semihalf.com>
           Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10913

7 years agoFix INVARIANTS debug code in HWPMC
Zbigniew Bodek [Tue, 13 Jun 2017 18:53:56 +0000 (18:53 +0000)]
Fix INVARIANTS debug code in HWPMC

When HWPMC stops sampling, ps_pmc may be freed before samples
are processed. In such situation treat PMC as stopped.
Add "ifdef" to fix build without INVARIANTS code.

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10912

7 years agoFix event table for Cortex A9.
Zbigniew Bodek [Tue, 13 Jun 2017 18:52:39 +0000 (18:52 +0000)]
Fix event table for Cortex A9.

Removed events 0x8 (INSTR_EXECUTED), 0xE (PC_PROC_RETURN) and
0x13-0x1d not supported on Cortex A9.
Add events 0x68 and 0x6E which replaced 0x8 and 0xE.

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10911

7 years agoFix HWPMC interrupt handling in Counting Mode
Zbigniew Bodek [Tue, 13 Jun 2017 18:51:23 +0000 (18:51 +0000)]
Fix HWPMC interrupt handling in Counting Mode

Additionally:
 - Fix support for Cycle Counter (evsel == 0xFF)
 - Stop and mask interrupts from all counters on init and finish

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10910

7 years agoAdd detection of CPU class for ARMv6/v7
Zbigniew Bodek [Tue, 13 Jun 2017 18:50:08 +0000 (18:50 +0000)]
Add detection of CPU class for ARMv6/v7

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: andrew
Differential revision: https://reviews.freebsd.org/D10909

7 years agoEnable in-band link management on A388-Clearfog board
Zbigniew Bodek [Tue, 13 Jun 2017 18:48:51 +0000 (18:48 +0000)]
Enable in-band link management on A388-Clearfog board

This patch adds in-band link management over SGMII of the
SFP transceiver on Armada-388-Clearfog board.

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Netgate
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10708

7 years agoEnable neta controller support in ARMADA38X
Zbigniew Bodek [Tue, 13 Jun 2017 18:47:42 +0000 (18:47 +0000)]
Enable neta controller support in ARMADA38X

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10707

7 years agoIntroduce Armada 38x/XP network controller support
Zbigniew Bodek [Tue, 13 Jun 2017 18:46:29 +0000 (18:46 +0000)]
Introduce Armada 38x/XP network controller support

This patch contains a new driver for the network unit of Marvell
Armada 38x/XP SoCs, called NETA. This support was thoroughly tested
and optimised in terms of stability and performance. Additional
hardware features, like Buffer Management (BM) or Parser and Classifier
(PnC) will be progressively supported as needed.

Submitted by: Fabien Thomas <fabien.thomas@stormshield.eu>
      Arnaud Ysmal <arnaud.ysmal@stormshield.eu>
      Zbigniew Bodek <zbb@semihalf.com>
      Michal Mazur <mkm@semihalf.com>
      Bartosz Szczepanek <bsz@semihalf.com>
      Marcin Wojtas <mw@semihalf.com>

Obtained from: Semihalf
Sponsored by: Stormshield (main development)
Netgate (cleanup and upstreaming)
Differential revision: https://reviews.freebsd.org/D10706

7 years agoPrevent multiple lock initialization in e6000sw probe
Zbigniew Bodek [Tue, 13 Jun 2017 18:35:14 +0000 (18:35 +0000)]
Prevent multiple lock initialization in e6000sw probe

r319886 ("Add the initial support for the Marvell 88E6141
and 88E6341 switches.") unveiled a problem with possible
multiple lock creation. Move its initialization
to the driver attach and for obtaining the switch ID
create a temprorary one, which is immediately destroyed
after the check.

Submitted by: Zbigniew Bodek <zbb@semihalf.com>
      Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf

7 years agoReduce the frequency of hint updates on allocation without incurring
Alan Cox [Tue, 13 Jun 2017 17:49:49 +0000 (17:49 +0000)]
Reduce the frequency of hint updates on allocation without incurring
additional allocation overhead.  Previously, blst_meta_alloc() updated the
hint after every successful allocation.  However, these "eager" hint
updates are of no actual benefit if, instead, the "lazy" hint update at
the start of blst_meta_alloc() is generalized to handle all cases where
the number of available blocks is less than the requested allocation.
Previously, the lazy hint update at the start of blst_meta_alloc() only
handled the ALL-FULL case.  (I would also note that this change provides
consistency between blist_alloc() and blist_fill() in that their hint
maintenance is now entirely lazy.)

Eliminate unnecessary checks for terminators in blst_meta_alloc() and
blst_meta_fill() when handling ALL-FREE meta nodes.

Eliminate the field "bl_free" from struct blist.  It is redundant.  Unless
the entire radix tree is a single leaf, the count of free blocks is stored
in the root node.  Instead, provide a function blist_avail() for obtaining
the number of free blocks.

In blst_meta_alloc(), perform a sanity check on the allocation once rather
than repeating it in a loop over the meta node's children.

In blst_leaf_fill(), use the optimized bitcount*() function instead of a
loop to count the blocks being allocated.

Add or improve several comments.

Address some nearby style errors.

Reviewed by: kib
MFC after: 6 weeks
Differential Revision: https://reviews.freebsd.org/D11146

7 years agostyle(9) fixes.
Olivier Houchard [Tue, 13 Jun 2017 16:19:32 +0000 (16:19 +0000)]
style(9) fixes.

Reported by: cem

7 years agoThe variable nargv is allocated but never freed, so free it when the it
Stephen J. Kiernan [Tue, 13 Jun 2017 15:50:16 +0000 (15:50 +0000)]
The variable nargv is allocated but never freed, so free it when the it
is no longer used.

Submitted by: Thomas Rix <trix@juniper.net>
Reviewed by: ed
Approved by: sjg (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D9652

7 years agoHint at the intended usage for the "ll" field of struct uuid_private.
Mark Johnston [Tue, 13 Jun 2017 15:37:04 +0000 (15:37 +0000)]
Hint at the intended usage for the "ll" field of struct uuid_private.

Discussed with: kib
MFC after: 1 week

7 years agosbin/ipfw: strcpy, strncpy => strlcpy
Alan Somers [Tue, 13 Jun 2017 14:57:48 +0000 (14:57 +0000)]
sbin/ipfw: strcpy, strncpy => strlcpy

Reported by: Coverity
CID: 13561621356166
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10662

7 years agoAdd missing header dependencies (based on looking in the .depend file).
Ian Lepore [Tue, 13 Jun 2017 14:07:13 +0000 (14:07 +0000)]
Add missing header dependencies (based on looking in the .depend file).

Reported by: gjb

7 years agoHandle partial writes
Pietro Cerutti [Tue, 13 Jun 2017 13:26:50 +0000 (13:26 +0000)]
Handle partial writes

Reported by: ed
Reviewed by: cognet
Approved by: cognet

7 years agoImprove yes' throughput
Pietro Cerutti [Tue, 13 Jun 2017 12:35:01 +0000 (12:35 +0000)]
Improve yes' throughput

On my system, this brings up the throughput from ~20 to ~600 MiB/s.

Inspired by: https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/

Reviewed by: cognet
Approved by: cognet

7 years agoImplement tunable CPU quirks.
Michal Meloun [Tue, 13 Jun 2017 12:07:18 +0000 (12:07 +0000)]
Implement tunable CPU quirks.
These quirks are intended for optimizing CPU performance, not for
applying errata workarounds. Nobody can expect that CPU with unfixed
errata is stable enough to execute the kernel until quirks are applied.

MFC after: 3 weeks

7 years agoResurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib()
Andrey V. Elsukov [Tue, 13 Jun 2017 10:52:31 +0000 (10:52 +0000)]
Resurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib()
with acquired RIB lock.

This fixes a possible panic due to trying to acquire RIB rlock when it is
already exclusive locked.

PR: 215963, 215122
MFC after: 1 week
Sponsored by: Yandex LLC