]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agopf tests: Basic ioctl validation for DIOCRGETTABLES, DIOCRGETTSTATS, DIOCRCLRTSTATS...
kp [Fri, 6 Apr 2018 15:57:20 +0000 (15:57 +0000)]
pf tests: Basic ioctl validation for DIOCRGETTABLES, DIOCRGETTSTATS, DIOCRCLRTSTATS and DIOCRSETTFLAGS

Validate the DIOCRGETTABLES, DIOCRGETTSTATS, DIOCRCLRTSTATS and
DIOCRSETTFLAGS ioctls with invalid values. These may succeed (because
the kernel uses the minimally required size, not the specified size),
but should not trigger kernel panics.

MFC after: 1 week

6 years agopf: Improve ioctl validation for DIOCRGETTABLES, DIOCRGETTSTATS, DIOCRCLRTSTATS and...
kp [Fri, 6 Apr 2018 15:54:30 +0000 (15:54 +0000)]
pf: Improve ioctl validation for DIOCRGETTABLES, DIOCRGETTSTATS, DIOCRCLRTSTATS and DIOCRSETTFLAGS

These ioctls can process a number of items at a time, which puts us at
risk of overflow in mallocarray() and of impossibly large allocations
even if we don't overflow.

Limit the allocation to required size (or the user allocation, if that's
smaller). That does mean we need to do the allocation with the rules
lock held (so the number doesn't change while we're doing this), so it
can't M_WAITOK.

MFC after: 1 week

6 years agolualoader: Fix menu skipping with loader.conf(5) vars
kevans [Fri, 6 Apr 2018 15:19:48 +0000 (15:19 +0000)]
lualoader: Fix menu skipping with loader.conf(5) vars

Earlier efforts to stop loading the menu broke the ability to skip the menu
with, e.g., beastie_disable in loader.conf(5) as it was decided before
configuration was read.

Defer bringing in the menu module until we've loaded configuration so that
we can make a more informed decision on whether the menu should be skipped
or not.

6 years agoaw_sid(4): Use prctl read for all reads when it's required
kevans [Fri, 6 Apr 2018 15:17:09 +0000 (15:17 +0000)]
aw_sid(4): Use prctl read for all reads when it's required

It was later found that some operation on the OrangePi one will cause
direct accesses to the eeprom to return wrong data again, so reading it all
once via prctl at attach time is no longer sufficient.

6 years agoIn cases where an application issues certain IPMI commands at a high
jtl [Fri, 6 Apr 2018 15:15:21 +0000 (15:15 +0000)]
In cases where an application issues certain IPMI commands at a high
enough rate, the IPMI code can print large numbers of messages to the
console, such as:
  ipmi0: KCS: Failed to read completion code
  ipmi0: KCS error: ff
  ipmi0: KCS: Failed to read completion code
  ipmi0: KCS error: ff

These seem to be innocuous from a system standpoint, and the user-
space code can deal with the failures. Therefore, suppress printing
these messages to the console unless bootverbose is enabled.

Obtained from: Netflix, Inc.

6 years agopf tests: Basic ioctl validation tests
kp [Fri, 6 Apr 2018 15:03:48 +0000 (15:03 +0000)]
pf tests: Basic ioctl validation tests

Validate the DIOCRADDTABLES and DIOCRDELTABLES ioctls with invalid size
values. All of these requests should fail.

MFC after: 1 week

6 years agopf: Improve ioctl validation for DIOCRADDTABLES and DIOCRDELTABLES
kp [Fri, 6 Apr 2018 15:01:45 +0000 (15:01 +0000)]
pf: Improve ioctl validation for DIOCRADDTABLES and DIOCRDELTABLES

The DIOCRADDTABLES and DIOCRDELTABLES ioctls can process a number of
tables at a time, and as such try to allocate <number of tables> *
sizeof(struct pfr_table). This multiplication can overflow. Thanks to
mallocarray() this is not exploitable, but an overflow does panic the
system.

Arbitrarily limit this to 65535 tables. pfctl only ever processes one
table at a time, so it presents no issues there.

MFC after: 1 week

6 years agoLet syslog(3) use RFC 5424.
ed [Fri, 6 Apr 2018 13:00:45 +0000 (13:00 +0000)]
Let syslog(3) use RFC 5424.

With r332099 changing syslogd(8) to parse RFC 5424 formatted syslog
messages, go ahead and also change the syslog(3) libc function to
generate them. Compared to RFC 3164, RFC 5424 has various advantages,
such as sub-second precision for log entry timestamps.

As this change could have adverse effects when not updating syslogd(8)
or using a different system logging daemon, add a notice to UPDATING and
increase __FreeBSD_version.

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

6 years agoAdd RFC 5424 syslog message parsing to syslogd.
ed [Fri, 6 Apr 2018 12:57:01 +0000 (12:57 +0000)]
Add RFC 5424 syslog message parsing to syslogd.

Syslogd currently uses the RFC 3164 format for its log messages.One
limitation of RFC 3164 is that it cannot be used to log entries with
sub-second precision timestamps. One of our users has expressed a desire
for doing this for doing some basic performance measurements.

This change attempts to make a first cut at switching to RFC 5424 based
logging. The first step is to alter syslogd's input path to properly
parse such messages. It alters the logmsg() prototype to match the
fields of RFC 5424. The parsemsg() function is extended to parse both
RFC 3164 and 5424 messages and call into logmsg() accordingly.

Additional changes include:

- Introducing proper parsing of timestamps, so that they can be printed
  in any desired output format. This means we need to infer the year and
  timezone for RFC 3164 timestamps.
- Removing ISKERNEL. This can now be realised by simply providing an
  APP-NAME (== "kernel").
- Extending RFC 3164 parsing to trim off the TAG prefix and using that
  to derive APP-NAME and PROCID.
- Increase MAXLINE. RFC 5424 mentions we should support 2k messages.

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

6 years agoremove GiB/MiB macros from param.h
royger [Fri, 6 Apr 2018 11:20:06 +0000 (11:20 +0000)]
remove GiB/MiB macros from param.h

And instead define them in the files where they are used.

Requested by: bde

6 years agostand: pass --no-rosegment for i386 bits when linking with lld
emaste [Fri, 6 Apr 2018 02:57:58 +0000 (02:57 +0000)]
stand: pass --no-rosegment for i386 bits when linking with lld

btxld does not correctly handle input with other than 2 PT_LOAD
segments.  Passing --no-rosegment lets lld produce output eqivalent to
ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO.

PR: 225775
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14956

6 years agoAdd 32-bit compat for ioctls that take struct ifgroupreq.
brooks [Thu, 5 Apr 2018 22:14:55 +0000 (22:14 +0000)]
Add 32-bit compat for ioctls that take struct ifgroupreq.

Use an accessor to access ifgr_group and ifgr_groups.

Use an macro CASE_IOC_IFGROUPREQ(cmd) in place of case statements such
as "case SIOCAIFGROUP:". This avoids poluting the switch statements
with large numbers of #ifdefs.

Reviewed by: kib
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14960

6 years agoifconf(): Always zero the whole struct ifreq.
brooks [Thu, 5 Apr 2018 21:58:28 +0000 (21:58 +0000)]
ifconf(): Always zero the whole struct ifreq.

The previous split of zeroing ifr_name and ifr_addr seperately is safe
on current architectures, but would be unsafe if pointers were larger
than 8 bytes. Combining the zeroing adds no real cost (a few
instructions) and makes the security property easier to verify.

Reviewed by: kib, emaste
Obtained from: CheriBSD
MFC after: 3 days
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14912

6 years agoAdded SAL annotatations to system calls.
brooks [Thu, 5 Apr 2018 20:31:45 +0000 (20:31 +0000)]
Added SAL annotatations to system calls.

Modify makesyscalls.sh to strip out SAL annotations.

No functional change.

This is based on work I started in CheriBSD and use to validate fat
pointers at the syscall boundary.  Tal Garfinkel reviewed the changes,
added annotations to COMPAT* syscalls and is using them in a record and
playback framework.  One can envision other uses such as a WITNESS-like
validator for copyin/out as speculated on in the review.

As this time we are only annotating sys/kern/syscalls.master as that is
sufficient for userspace work.  If kernel use cases materialize, we can
annotate other syscalls.master as needed.

Submitted by: Tal Garfinkel <talg@cs.stanford.edu>
Sponsored by: DARPA, AFRL (in part)
Differential Revision: https://reviews.freebsd.org/D14285

6 years agoAdd an ISO9660 "partition table" type to loader.
benno [Thu, 5 Apr 2018 19:45:30 +0000 (19:45 +0000)]
Add an ISO9660 "partition table" type to loader.

When booted via isoboot(8) loader will be handed a disk that simply contains
an ISO9660 image. Currently this confuses it greatly. Teach it how to spot
that it's in this situation and that ISO9660 has one "partition" covering
the whole disk.

Reviewed by: imp
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14915

6 years agoAdd isoboot(8) for booting BIOS systems from HDDs containing ISO images.
benno [Thu, 5 Apr 2018 19:40:46 +0000 (19:40 +0000)]
Add isoboot(8) for booting BIOS systems from HDDs containing ISO images.

This is part of a project for adding the ability to create hybrid CD/USB boot
images. In the BIOS case when booting from something that isn't a CD we need
some extra boot code to actually find our next stage (loader) within an
ISO9660 filesystem. This code will reside in a GPT partition (similar to
gptboot(8) from which it is derived) and looks for /boot/loader in an
ISO9660 filesystem on the image.

Reviewed by: imp
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14914

6 years agoVarious style(9) fixes.
benno [Thu, 5 Apr 2018 19:29:22 +0000 (19:29 +0000)]
Various style(9) fixes.

Reviewed by: strip --strip-debug -o - gptboot.o | md5
Sponsored by: iXsystems, Inc.

6 years agoUse consistent whitespace.
benno [Thu, 5 Apr 2018 19:27:24 +0000 (19:27 +0000)]
Use consistent whitespace.

Reviewed by: strip --strip-debug -o - gptboot.o | md5
Sponsored by: iXsystems, Inc.

6 years agoAllow -DNO_CLEAN buildworld after r332080.
brooks [Thu, 5 Apr 2018 18:19:48 +0000 (18:19 +0000)]
Allow -DNO_CLEAN buildworld after r332080.

6 years agoRemove architecture specific shmat.S files.
brooks [Thu, 5 Apr 2018 18:17:46 +0000 (18:17 +0000)]
Remove architecture specific shmat.S files.

These files are identical to the generated system calls.
In the case of MIPS, the file was already disconnected from the build.

Submitted by: Ali Mashtizadeh <ali@mashtizadeh.com>
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D14976

6 years agoFix the definitions of get_cpu() and put_cpu().
markj [Thu, 5 Apr 2018 17:26:03 +0000 (17:26 +0000)]
Fix the definitions of get_cpu() and put_cpu().

They are supposed to disable preemption.

Reported by: rstone
MFC after: 5 days

6 years agoAdd support for the Coresight technology from ARM Ltd.
br [Thu, 5 Apr 2018 15:45:54 +0000 (15:45 +0000)]
Add support for the Coresight technology from ARM Ltd.

ARM Coresight is a solution for debug and trace of complex SoC designs.

This includes a collection of drivers for ARM Coresight interconnect
devices within a small Coresight framework.

Supported devices are:
o Embedded Trace Macrocell v4 (ETMv4)
o Funnel
o Dynamic Replicator
o Trace Memory Controller (TMC)
o CPU debug module

Devices are connected to each other internally in SoC and the
configuration of each device endpoints is described in FDT.

Typical trace flow (as found on Qualcomm Snapdragon 410e):
CPU0 -> ETM0 -> funnel1 -> funnel0 -> ETF -> replicator -> ETR -> DRAM
CPU1 -> ETM1 -^
CPU2 -> ETM2 -^
CPU3 -> ETM3 -^

Note that both Embedded Trace FIFO (ETF) and Embedded Trace Router (ETR)
are hardware configurations of TMC.

This is required for upcoming HWPMC tracing support.

This is tested on single-core system only.

Reviewed by: andrew (partially)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14618

6 years agoExit with usage when extra arguments are on command line
rgrimes [Thu, 5 Apr 2018 15:00:08 +0000 (15:00 +0000)]
Exit with usage when extra arguments are on command line
preventing mistakes such as "halt 0p" for "halt -p".
Approved by: bde (mentor), phk (mentor)
MFC after: 1 week

6 years agox86: improve reservation of AP trampoline memory
royger [Thu, 5 Apr 2018 14:39:51 +0000 (14:39 +0000)]
x86: improve reservation of AP trampoline memory

So that it doesn't rely on physmap[1] containing an address below
1MiB. Instead scan the full physmap and search for a suitable address
to place the trampoline code (below 1MiB) and the initial memory pages
(below 4GiB).

Sponsored by: Citrix Systems R&D
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D14878

6 years agointroduce GiB and MiB macros
royger [Thu, 5 Apr 2018 14:31:54 +0000 (14:31 +0000)]
introduce GiB and MiB macros

This macros convert from GiB or MiB into bytes.

Sponsored by: Citrix Systems R&D

6 years agoSquash error from geom by sizing ident strings to DISK_IDENT_SIZE.
sbruno [Thu, 5 Apr 2018 13:56:40 +0000 (13:56 +0000)]
Squash error from geom by sizing ident strings to DISK_IDENT_SIZE.

Display attribute in future error strings and differentiate g_handleattr()
error messages for ease of debugging in the future.

"g_handleattr: md1 bio_length 24 strlen 31 -> EFAULT"

Reported by: swills
Reviewed by: imp cem avg
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14962

6 years agoFix ERESTART for lcall $7,$0 syscalls.
kib [Thu, 5 Apr 2018 11:03:21 +0000 (11:03 +0000)]
Fix ERESTART for lcall $7,$0 syscalls.

The lcall trampoline enters kernel by int $0x80, which sets up invalid
length of the instruction for %rip rewind.

Reviewed by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoMake the INTO instruction operational in 32bit mode.
kib [Thu, 5 Apr 2018 11:03:05 +0000 (11:03 +0000)]
Make the INTO instruction operational in 32bit mode.

Having the IDT entry specify ring 0 DPL caused delivery of #GP instead
of #OF.

The instruction is not valid in 64bit mode, which probably explains
why the IDT entry for #OF was initially set this way.  It is
interesting to note that the BOUND instruction works with the IDT #BR
entry DPL 0, most likely CPU considers #BR from BOUND as generated by
a machine, not user.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoremove special handling for stale ptrace dependencies
emaste [Thu, 5 Apr 2018 03:26:42 +0000 (03:26 +0000)]
remove special handling for stale ptrace dependencies

r318957 added special handling for stale ptrace dependency files to
support a -DNO_CLEAN build in a tree last built before r305012.  That
revision is now over a year and a half old, so retire the special case.

Sponsored by: The FreeBSD Foundation

6 years agoRenumber soft-update types starting at 1 instead of 0 to avoid confusion
mckusick [Thu, 5 Apr 2018 00:32:01 +0000 (00:32 +0000)]
Renumber soft-update types starting at 1 instead of 0 to avoid confusion
of zero'ed memory appearing to have a valid soft-update type.

Also correct some comments.

Reviewed by: kib

6 years agocxgbe(4): Always display an error message if SIOCSIFFLAGS will leave
np [Wed, 4 Apr 2018 22:52:24 +0000 (22:52 +0000)]
cxgbe(4): Always display an error message if SIOCSIFFLAGS will leave
IFF_UP and IFF_DRV_RUNNING out of sync.  ifhwioctl in the kernel pays no
attention to the return code from the driver ioctl during SIOCSIFFLAGS
so these messages are the only indication that the ioctl was called but
failed.

MFC after: 1 week
Sponsored by: Chelsio Communications

6 years agoAllow -DNO_CLEAN builds over r332048.
brooks [Wed, 4 Apr 2018 22:46:30 +0000 (22:46 +0000)]
Allow -DNO_CLEAN builds over r332048.

6 years agoRemove architecture specific sigreturn.S files.
brooks [Wed, 4 Apr 2018 22:45:08 +0000 (22:45 +0000)]
Remove architecture specific sigreturn.S files.

All of these files are identical (modulo license blocks and VCS IDs) to
the files generated by lib/libc/sys/Makefile.inc and serve no purpose.

Reported by: Ali Mashtizadeh <ali@mashtizadeh.com>
Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14953

6 years agonetmap: align if_ptnet guest driver to the upstream code (commit 0e15788)
vmaffione [Wed, 4 Apr 2018 21:31:12 +0000 (21:31 +0000)]
netmap: align if_ptnet guest driver to the upstream code (commit 0e15788)

The change upgrades the driver to use the split Communication Status
Block (CSB) format. In this way the variables written by the guest
and read by the host are allocated in a different cacheline than
the variables written by the host and read by the guest; this is
needed to avoid cache thrashing.

Approved by: hrs (mentor)

6 years agoAdd a missing MODULE_DEPEND().
ian [Wed, 4 Apr 2018 21:19:33 +0000 (21:19 +0000)]
Add a missing MODULE_DEPEND().

6 years agoFix kernel memory disclosure in tcp_ctloutput
emaste [Wed, 4 Apr 2018 21:12:35 +0000 (21:12 +0000)]
Fix kernel memory disclosure in tcp_ctloutput

strcpy was used to copy a string into a buffer copied to userland, which
left uninitialized data after the terminating 0-byte.  Use the same
approach as in tcp_subr.c: strncpy and explicit '\0'.

admbugs: 765, 822
MFC after: 1 day
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reported by: Vlad Tsyrklevich
Security: Kernel memory disclosure
Sponsored by: The FreeBSD Foundation

6 years agoTypo.
markj [Wed, 4 Apr 2018 20:15:41 +0000 (20:15 +0000)]
Typo.

MFC after: 3 days

6 years agoFix kernel memory disclosure in linux_ioctl_socket
emaste [Wed, 4 Apr 2018 19:58:25 +0000 (19:58 +0000)]
Fix kernel memory disclosure in linux_ioctl_socket

strlcpy is used to copy a string into a buffer to be copied to userland,
previously leaving uninitialized data after the terminating NUL.  Zero
the buffer first to avoid a kernel memory disclosure.

admbugs: 765, 811
MFC after: 1 day
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reported by: Vlad Tsyrklevich
Sponsored by: The FreeBSD Foundation

6 years agopthread.h: minor indentation cleanups.
pfg [Wed, 4 Apr 2018 15:16:04 +0000 (15:16 +0000)]
pthread.h: minor indentation cleanups.

No functional change.

X-MFC with: r331969

6 years agolinux_ioctl_hdio: fix kernel memory disclosure
emaste [Wed, 4 Apr 2018 14:41:48 +0000 (14:41 +0000)]
linux_ioctl_hdio: fix kernel memory disclosure

Stack-allocated struct linux_hd_big_geometry has undeclared padding
copied to userland.

admbugs: 765
Reported by: Vlad Tsyrklevich
MFC after: 1 day
Security: Kernel memory disclosure
Sponsored by: The FreeBSD Foundation

6 years agoAdd new shared library -- libopencsd.
br [Wed, 4 Apr 2018 14:31:56 +0000 (14:31 +0000)]
Add new shared library -- libopencsd.

OpenCSD is an ARM CoreSight(tm) trace packets decoder.

- Connect libopencsd to the arm64 build.
- Install opencsd headers to /usr/include/opencsd/

Sponsored by: DARPA, AFRL

6 years agoRemove fdt_pm_is_enabled as it's Marvell specific. Replace the only call to
andrew [Wed, 4 Apr 2018 13:37:59 +0000 (13:37 +0000)]
Remove fdt_pm_is_enabled as it's Marvell specific. Replace the only call to
it with a call to the helper function fdt_pm_is_enabled would call.

Sponsored by: DARPA, AFRL

6 years agoEnable Marvell gpio driver to work with many controllers
mw [Wed, 4 Apr 2018 13:20:29 +0000 (13:20 +0000)]
Enable Marvell gpio driver to work with many controllers

This patch moves all global data structures into mv_gpio_softc,
and puts device_t parameter to functions calls everywhere where needed.
As a result, we can create multiple driver instances.

Removed names in function declaration to keep style.

Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14755

6 years agoImprove interrupt and resource allocation in Marvell GPIO driver
mw [Wed, 4 Apr 2018 13:12:49 +0000 (13:12 +0000)]
Improve interrupt and resource allocation in Marvell GPIO driver

This patch adds support for more than one interrupts
in GPIO controller. It reads necessary information (such as cell size)
from FDT, so there are no magic numbers.

Note that interrupts are still not working, but this patch makes
one good step in correct direction

Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14754

6 years agoIntroduce port debouncing mechanism in mv_gpio driver
mw [Wed, 4 Apr 2018 13:08:51 +0000 (13:08 +0000)]
Introduce port debouncing mechanism in mv_gpio driver

This patch introduces gpio debouncing mechanism
with fixed memory allocation in critical section.

When you press button, value at gpio pin connected to button
is changing many times which will cause in unexpected behaviour.
Debouncing mechanism will prevent this phenomenon

Submitted by: Patryk Duda <pdk@semihalf.com>
      Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14753

6 years agoMatch Marvell Armada38X PCIE ranges in dts with Linux
mw [Wed, 4 Apr 2018 13:01:14 +0000 (13:01 +0000)]
Match Marvell Armada38X PCIE ranges in dts with Linux

If driver cannot determine ranges based on fdt, it will calculate
them based on number and type of current port.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14752

6 years agoImport OpenCSD -- an ARM CoreSight(tm) Trace Decode Library.
br [Wed, 4 Apr 2018 12:55:31 +0000 (12:55 +0000)]
Import OpenCSD -- an ARM CoreSight(tm) Trace Decode Library.

Sponsored by: DARPA, AFRL

6 years agoChange reg in Marvell Armada38X pcie FDT
mw [Wed, 4 Apr 2018 12:54:18 +0000 (12:54 +0000)]
Change reg in Marvell Armada38X pcie FDT

Ranges in pcie-controller are unused, so could be changed to match Linux
device tree represntation. Same with interrupt-cells and interrupt-parent.
In PCI controller driver ocd_data are used for matching driver and
choose proper resources acquisition function.
fdt_win_process_child have new argument which provide information
about fdt node containing addresses of MMIO registers.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: manu [DT part]
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14751

6 years agoAdd api for creating resource list based on 'assigned-addresses'
mw [Wed, 4 Apr 2018 12:47:41 +0000 (12:47 +0000)]
Add api for creating resource list based on 'assigned-addresses'

According to device tree binding 'assigned-addresses' can refer to PCIE MMIO
register space. New function ofw_bus_assigned_addresses_to_rl is
provided to support it.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14750

6 years agoMatch Marvell Armada38X PCI compatible with Linux
mw [Wed, 4 Apr 2018 12:41:42 +0000 (12:41 +0000)]
Match Marvell Armada38X PCI compatible with Linux

In Linux FDT pcie does not have compatible string.
Configuration of windows in mv_common was based on fdt compatible.
Now pcie windows are configured by their parent: pcie_controller.
Processing is moved to fdt_win_process_child. fdt_win_process now
only walk through the tree. SOC_NODE_PCI is position of pcie function in
soc_node_spec array.

PCIe probe cannot use ofw_bus_search_compatible, because it needs to
check also device type and parents compatible.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: manu [DT part]
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14749

6 years agoAdd support of PCI_RES_BUS to Marvell PCI driver
mw [Wed, 4 Apr 2018 12:36:55 +0000 (12:36 +0000)]
Add support of PCI_RES_BUS to Marvell PCI driver

GENERIC ARM config use NEW_PCIB driver (https://wiki.freebsd.org/NEW_PCIB).
To satisfy it, allocation and deallocation of PCI_RES_BUS is necessary.
Conditional compilation is added for backward compatibility with ARMv5
configs.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: jhb
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14748

6 years agoImport OpenCSD -- an ARM CoreSight Trace Decode library.
br [Wed, 4 Apr 2018 12:33:46 +0000 (12:33 +0000)]
Import OpenCSD -- an ARM CoreSight Trace Decode library.

Git ID 900407e9d6400f6541138d6c2e483a9fc2d699a4

Sponsored by: DARPA, AFRL

6 years agoMake Marvell armv7 timer and wdt registers definitions common
mw [Wed, 4 Apr 2018 12:30:52 +0000 (12:30 +0000)]
Make Marvell armv7 timer and wdt registers definitions common

Define timers registers for both SoCs and choose proper one during runtime
based on information from FDT.
In WDT driver there are different function for ArmadaXP and other ARMv5 SoCs.
In timer driver registers definitions are stored in resource_spec structure
and chosen during runtime.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14746

6 years agoBump driver version number in mlx5en(4).
hselasky [Wed, 4 Apr 2018 10:45:06 +0000 (10:45 +0000)]
Bump driver version number in mlx5en(4).

MFC after: 1 week
Sponsored by: Mellanox Technologies

6 years agoMake Marvell Armada reset registers usage generic
mw [Wed, 4 Apr 2018 10:14:43 +0000 (10:14 +0000)]
Make Marvell Armada reset registers usage generic

Define reset registers for both Armada38X and ArmadaXP and
choose proper one during runtime based on information from FDT.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14745

6 years agoUse PLATFORM for initializing Marvell ArmadaXP and Armada38X
mw [Wed, 4 Apr 2018 08:40:49 +0000 (08:40 +0000)]
Use PLATFORM for initializing Marvell ArmadaXP and Armada38X

Spliting armv5 and armv7 machdep is necessary for adding Armada38X and
ArmadaXP to GENERIC config.
PLATFORM framework checks SOC type in FDT and will select proper
initialization function implementation during runtime.
Pointers to SoC specific implementation are stored in array of
platform_method_t and provided to framework by FDT_PLATFORM_DEF macro.
PLATFORM framework supports also reset function. To simplify implementation
cpu_reset is moved from mv_common to armv5 and armv7 machdep.

Armada38X and ArmadaXP share now common list of files, so resolve all
dependencies as well.

Submitted by: Rafal Kozik <rk@semihalf.com>
      Marcin Wojtas <mw@semihalf.com>
Reviewed by: mw
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14744

6 years agoregulator: Disable unused regulator
manu [Wed, 4 Apr 2018 06:44:24 +0000 (06:44 +0000)]
regulator: Disable unused regulator

bootloaders such as u-boot might enable regulators, or simply regulators could
be enabled by default by the PMIC, even if we don't have a driver for
the device or subsystem.
Disable unused regulators just before going to userland.
A tunable hw.regulator.disable_unused is added to not disable them in case
this causes problems on some board but the default behavior is to disable
everything unused.
I prefer to break thinks now and fix them rather than never switch to the
case were we disable regulators.

Tested on : Pine64-LTS (an idle board goes from ~0.33A to ~0.27A)
Tested on : BananaPi M2
Differential Revision: https://reviews.freebsd.org/D14781

6 years agoLimit glyph count in vtfont_load to avoid integer overflow.
gordon [Wed, 4 Apr 2018 05:21:46 +0000 (05:21 +0000)]
Limit glyph count in vtfont_load to avoid integer overflow.

Invalid font data passed to PIO_VFONT can result in an integer overflow
in glyphsize.  Characters may then be drawn on the console using glyph
map entries that point beyond the end of allocated glyph memory,
resulting in a kernel memory disclosure.

Submitted by: emaste
Reported by: Dr. Silvio Cesare of InfoSect
Security: CVE-2018-6917
Security: FreeBSD-SA-18:04.vt
Sponsored by: The FreeBSD Foundation

6 years agoAdd nvme_da back.
imp [Wed, 4 Apr 2018 02:37:05 +0000 (02:37 +0000)]
Add nvme_da back.

Now that it can co-exist in the kernel with nvd, add it back to the
cam module.

Sponsored by: Netflix

6 years agoFix minor whitespace nits
imp [Wed, 4 Apr 2018 02:35:48 +0000 (02:35 +0000)]
Fix minor whitespace nits

6 years agoCorrect the ilog2() for calculating memory sizes.
jhibbits [Wed, 4 Apr 2018 02:13:27 +0000 (02:13 +0000)]
Correct the ilog2() for calculating memory sizes.

TLB1 can handle ranges up to 4GB (through e5500, larger in e6500), but
ilog2() took a unsigned int, which maxes out at 4GB-1, but truncates
silently.  Increase the input range to the largest supported, at least for
64-bit targets.  This lets the DMAP be completely mapped, instead of only
1GB blocks with it assuming being fully mapped.

6 years agopthread.h: drop nullability attributes.
pfg [Wed, 4 Apr 2018 02:00:10 +0000 (02:00 +0000)]
pthread.h: drop nullability attributes.

These have been found to be practically useless. We were actually
following the Android bionic library and had some interest in replicating
the same warnings and behaviour but Android has since removed them.

We are still keeping some uses of nullability attributes in other headers,
somewhat in line with Apple's libc.

MFC after: 1 week
Hinted by: bionic (git 3f66e74b903905e763e104396aff52a81718cfde)

6 years agoFix arm64 buildkernel target with "nooptions KDB"
gonzo [Wed, 4 Apr 2018 01:13:28 +0000 (01:13 +0000)]
Fix arm64 buildkernel target with "nooptions KDB"

Make kdb_trap in breakpoint exception handler conditional. If "options KDB"
is not present just panic with message that debugger is not enabled.

PR: 224653

6 years agoFix kernel modules names for Marvell armv7
mw [Tue, 3 Apr 2018 23:49:35 +0000 (23:49 +0000)]
Fix kernel modules names for Marvell armv7

Two modules with the same name cannot be loaded, so Marvell specific drivers
cannot have the same name as the generic drivers.
Files with the same name, even in different folders overlaps their .o files,
so in order to prepare for supporting Marvell platforms in GENERIC armv7
config, modify conflicting names.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14743

6 years agoSplit out delay code in Marvell timer driver for PLATFORM
mw [Tue, 3 Apr 2018 23:29:34 +0000 (23:29 +0000)]
Split out delay code in Marvell timer driver for PLATFORM

The PLATFORM code will perform the software loop in the early boot,
so extract the actual delay code to handle situation, when
the timers are already initialized.

Obtained from: Semihalf
Sponsored by: Stormshield

6 years agoAdd missing flag check in Marvell PCIE driver
mw [Tue, 3 Apr 2018 23:27:07 +0000 (23:27 +0000)]
Add missing flag check in Marvell PCIE driver

Flag was introduced in r331953, but eventually not used.

Obtained from: Semihalf
Sponsored by: Stormshield

6 years agoCatch up with Clang 6.0.
jkim [Tue, 3 Apr 2018 23:11:08 +0000 (23:11 +0000)]
Catch up with Clang 6.0.

MFC after: 3 days

6 years agoMake Marvell AmadaXP timer driver more generic
mw [Tue, 3 Apr 2018 22:21:12 +0000 (22:21 +0000)]
Make Marvell AmadaXP timer driver more generic

Store pointers to SoC specific functions in mv_timer_config structure
and determine proper config in runtime based on compatible string from FDT.
Compatible string for ArmadaXP timers is changed to match Linux FDT.
Armada 38x uses generic Cortex-A9 timer and separate watchdog drivers, so
it does not need to be supported by timer driver.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: manu
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14741

6 years agoMake Marvell Armada watchdog driver more generic
mw [Tue, 3 Apr 2018 22:15:53 +0000 (22:15 +0000)]
Make Marvell Armada watchdog driver more generic

Store platform dependent functions and constants in mv_wdt_config
structure and select proper configuration on runtime based on
compatible string provided in FDT.
Marvell Armada38X and ArmadaXP non-repetitive registers are moved to
generic part of code.
To support armv5 as well, use proper compatible string:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/watchdog/orion_wdt.c?h=v4.13-rc3#n456

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14740

6 years agocryptosoft: Remove a dead store
cem [Tue, 3 Apr 2018 22:11:39 +0000 (22:11 +0000)]
cryptosoft: Remove a dead store

Introduced in r331639 by removing an instance of undefined behavior.

While we're here, the variable scope can be entirely moved inside the loop.

Reported by: Coverity
CID: 1387985
Sponsored by: Dell EMC Isilon

6 years agoMake get_tclk and get_cpu_freq generic for Marvell armv7 SoCs
mw [Tue, 3 Apr 2018 22:10:50 +0000 (22:10 +0000)]
Make get_tclk and get_cpu_freq generic for Marvell armv7 SoCs

In GENERIC kernel choosing proper get_tclk and get_cpu_freq implementation must
be done in runtime. Kernel for both SoC need to have implementation of each
other functions, so common file list mv/files.arm7 is added.
Marvell armv5 SoC have their own non-generic implementation of those function.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14739

6 years agoMake mv_common.c generic for Marvell Armada38X and ArmadaXP
mw [Tue, 3 Apr 2018 21:54:36 +0000 (21:54 +0000)]
Make mv_common.c generic for Marvell Armada38X and ArmadaXP

Preparation for adding Armada38X and ArmadaXP SoC to GENERIC config.
Supported platform are listed in soc_family enum.
struct decode_win_spec contains platform specific functions and constants.
Function mv_check_soc_family checks SoC type and chooses proper structure
in runtime, as well as platform-dependent functions.
Unnecessary dummy functions are removed.
Because of changing registers name to more generic new definition of
FDT_DEVMAP_MAX in mv_machdep is added.

Submitted by: Rafal Kozik <rk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14738

6 years agoMake validation in Marvell mv_common.c generic
mw [Tue, 3 Apr 2018 21:46:28 +0000 (21:46 +0000)]
Make validation in Marvell mv_common.c generic

Validate only drivers used by given platform.
Pointers to validation function
are added to soc_node_spec structure.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14737

6 years agorc.subr.8: Improve documentation of ${name}_limits and ${name}_login_class
jilles [Tue, 3 Apr 2018 21:44:43 +0000 (21:44 +0000)]
rc.subr.8: Improve documentation of ${name}_limits and ${name}_login_class

Submitted by: 0mp
Differential Revision: https://reviews.freebsd.org/D14928

6 years agoSplit get_sar_value function for Marvell ArmadaXP and Armada38X
mw [Tue, 3 Apr 2018 21:38:11 +0000 (21:38 +0000)]
Split get_sar_value function for Marvell ArmadaXP and Armada38X

get_sar_value is implemented only for ArmadaXP and Armada38X. Splitting it for
two different functions and change registers names result in more generic code.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14736

6 years agoMake Marvell mv_pci.c driver generic
mw [Tue, 3 Apr 2018 21:25:15 +0000 (21:25 +0000)]
Make Marvell mv_pci.c driver generic

PCI ports differ between Marvell SoCs, but have the same compatible in FDT.
Identification is made based on parent compatible during attach.
For ArmadaXP skipping enable procedure is necessary. To achieve it
sc_skip_enable_procedure flag is used.
For Armada38x find root procedure is necessary. For other SoCs root link is
always at slot 0. sc_enable_find_root_slot flag is used to select proper
behaviour.
Marvell armv5 platforms does not support msi.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14735

6 years agoEnable ArmadaXP using INTRNG interrupt controller
mw [Tue, 3 Apr 2018 21:17:19 +0000 (21:17 +0000)]
Enable ArmadaXP using INTRNG interrupt controller

Defining INTRNG remove some necessary registers and declarations of
pic_init_secondary, pic_ipi_send, pic_ipi_read and pic_ipi_clear.
Because Marvell ArmadaXP and Armada38X always use INTRNG, include all
INTRNG code and remove code that does not use it.
Separate pic registers declarations for Armada38X are unnecessary, it
works properly with ArmadaXP config.

Submitted by: Rafal Kozik <rk@semihalf.com>
Reviewed by: andrew
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D14734

6 years ago9434 Speculative prefetch is blocked by device removal code.
mav [Tue, 3 Apr 2018 21:16:41 +0000 (21:16 +0000)]
9434 Speculative prefetch is blocked by device removal code.

Device removal code does not set spa_indirect_vdevs_loaded for pools
that never experienced device removal.  At least one visual consequence
of it is completely blocked speculative prefetcher.  This patch sets
the variable in such situations.

6 years agoAdd the etdump utility for dumping El Torito boot catalog information.
benno [Tue, 3 Apr 2018 21:08:10 +0000 (21:08 +0000)]
Add the etdump utility for dumping El Torito boot catalog information.

This can be used to check existing images but will be used in the future to
find EFI ESP images placed in El Torito catalogs so they can be used for
hybrid boot purposes.

Reviewed by: imp (code), sbruno (man page), bcr (man page)
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14952

6 years agoRemove redundant check.
cy [Tue, 3 Apr 2018 20:59:46 +0000 (20:59 +0000)]
Remove redundant check.

Reported by: kib@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785

6 years agoThe correct symbol version for FreeBSD 12 is 1.5.
cy [Tue, 3 Apr 2018 20:53:53 +0000 (20:53 +0000)]
The correct symbol version for FreeBSD 12 is 1.5.

Reported by: kib@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785

6 years agoCorrect the version number for gets_s(3).
cy [Tue, 3 Apr 2018 20:38:25 +0000 (20:38 +0000)]
Correct the version number for gets_s(3).

Reported by: kib@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785

6 years agoInclude update to stdio.h missed in r331936.
cy [Tue, 3 Apr 2018 20:14:37 +0000 (20:14 +0000)]
Include update to stdio.h missed in r331936.

In my attempt to limit the commit in r331936 to only the gets_s()
commit and not include unrelated patches in my tree, this patch
was missed.

Reported by: pfg
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785

6 years agoAdd gets_s(3) to the man page title (noticed by ed@).
cy [Tue, 3 Apr 2018 19:51:23 +0000 (19:51 +0000)]
Add gets_s(3) to the man page title (noticed by ed@).

While I'm at it correct the update date in the man page.

Reported by: ed@
MFC after: 2 weeks
X-MFC with: r331936
Differential Revision: https://reviews.freebsd.org/D12785

6 years agoAdd new gets_s(3) stdio function.
cy [Tue, 3 Apr 2018 18:52:38 +0000 (18:52 +0000)]
Add new gets_s(3) stdio function.

This implements the gets_s(3) function as documented at
http://en.cppreference.com/w/c/io/gets. It facilitates the
optional removal of gets(3).

Reviewed by: ed
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12785

6 years agovtfontcvt: allow .bdf characters less than full height
emaste [Tue, 3 Apr 2018 18:43:00 +0000 (18:43 +0000)]
vtfontcvt: allow .bdf characters less than full height

Sponsored by: The FreeBSD Foundation

6 years agoWrap long lines.
markj [Tue, 3 Apr 2018 18:41:27 +0000 (18:41 +0000)]
Wrap long lines.

MFC after: 3 days

6 years agofix i386 build with CPU_ELAN (LINT for instance) after r331878
avg [Tue, 3 Apr 2018 17:16:06 +0000 (17:16 +0000)]
fix i386 build with CPU_ELAN (LINT for instance) after r331878

x86/cpu_machdep.c now needs to include elan_mmcr.h when CPU_ELAN is set.
While here, also remove the now unneeded inclusion of isareg.h in i386
and amd64 vm_machdep.c.

Reported by: lwhsu
MFC after: 14 days
X-MFC with: r331878

6 years agor330675 introduced an extra window check in the LRO code to ensure it
jtl [Tue, 3 Apr 2018 13:54:38 +0000 (13:54 +0000)]
r330675 introduced an extra window check in the LRO code to ensure it
captured and reported the highest window advertisement with the same
SEQ/ACK.  However, the window comparison uses modulo 2**16 math, rather
than directly comparing the absolute values.  Because windows use
absolute values and not modulo 2**16 math (i.e. they don't wrap), we
need to compare the absolute values.

Reviewed by: gallatin
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D14937

6 years agoRemove fdt_is_enabled, fdt_reg_to_rl, and fdt_get_unit. These are not used
andrew [Tue, 3 Apr 2018 13:30:40 +0000 (13:30 +0000)]
Remove fdt_is_enabled, fdt_reg_to_rl, and fdt_get_unit. These are not used
by anything in the tree.

Sponsored by: DARPA, AFRL

6 years agoSwitch users of fdt_is_enabled to use ofw_bus_node_status_okay. These are
andrew [Tue, 3 Apr 2018 11:01:50 +0000 (11:01 +0000)]
Switch users of fdt_is_enabled to use ofw_bus_node_status_okay. These are
equivalent, so to prepare to remove the former move users to call the
latter.

Sponsored by: DARPA, AFRL

6 years agofix signatures of cpu_reset_real and cpu_reset_proxy, broken in r331878
avg [Tue, 3 Apr 2018 06:46:26 +0000 (06:46 +0000)]
fix signatures of cpu_reset_real and cpu_reset_proxy, broken in r331878

When I moved these functions from i386 and amd64 to x86 I dropped their
prototype declarations (that were correct) and left only their definitions
that became incorrect.

Reported by: bde
MFC after: 15 days
X-MFC with: r331878

6 years agoFix accidental USB port resets by GPIO on Zynq/Zedboard boards
gonzo [Tue, 3 Apr 2018 04:31:54 +0000 (04:31 +0000)]
Fix accidental USB port resets by GPIO on Zynq/Zedboard boards

The Zynq/Zedboard GPIO driver attempts to tri-state all GPIO pins on
boot up but the order in which I reset the hardware can cause the pins
to be briefly held low before being tri-stated.  This is a problem on
boards that use GPIO pins to reset devices.

In particular, the Zybo and ZC-706 boards use a GPIO pin as a USB PHY
reset.  If U-boot enables the USB port before booting the kernel, the
GPIO driver attach causes a glitch on the USB PHY reset and the USB
port loses power.  My fix is to have the GPIO driver leave the pins in
whatever configuration U-boot placed them.

PR: 225713
Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com>
MFC after: 1 week

6 years agoDefault loader.conf: Drop efi_max_resolution to 1x1
kevans [Tue, 3 Apr 2018 02:41:32 +0000 (02:41 +0000)]
Default loader.conf: Drop efi_max_resolution to 1x1

Effectively disabling the mode changing bits in the loader. No matter which
way we go with it, it seems to be wrong- either the firmware doesn't change
the resolution and reports the resolution we requested, or the firmware
changes the resolution and doesn't report the resolution we requested. It
some cases, it does the right thing, but the bad cases outweight those.

Interested individuals can still set efi_max_resolution to 1080p or whatnot
in loader.conf(5) to restore the new behavior, but the new behavior does not
work out well for many cases.

Discussed with: imp

6 years agocxgbe: Implement tcp_info handler for connections handled by t4_tom.
np [Tue, 3 Apr 2018 01:22:15 +0000 (01:22 +0000)]
cxgbe: Implement tcp_info handler for connections handled by t4_tom.

The TCB is read using a memory window right now.  A better alternate to
get self-consistent, uncached information would be to use a GET_TCB
request but waiting for a reply from hw while holding non-sleepable
locks is quite inconvenient.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D14817

6 years agoAdd a hook to allow the toedev handling an offloaded connection to
np [Tue, 3 Apr 2018 01:08:54 +0000 (01:08 +0000)]
Add a hook to allow the toedev handling an offloaded connection to
provide accurate TCP_INFO.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D14816

6 years agoAdd support for a pmap direct map for 64-bit Book-E
jhibbits [Tue, 3 Apr 2018 00:45:38 +0000 (00:45 +0000)]
Add support for a pmap direct map for 64-bit Book-E

As with AIM64, map the DMAP at the beginning of the fourth "quadrant" of
memory, and move the KERNBASE to the the start of KVA.

Eventually we may run the kernel out of the DMAP, but for now, continue
booting as it has been.

6 years agoImport CK as of commit b19ed4c6a56ec93215ab567ba18ba61bf1cfbac8
cognet [Mon, 2 Apr 2018 23:40:50 +0000 (23:40 +0000)]
Import CK as of commit b19ed4c6a56ec93215ab567ba18ba61bf1cfbac8
It should fix ck_pr_[load|store]_ptr on mips and riscv, make sure no
*fence instructions are used on i386, as older cpus don't support it, and
make sure we don't rely on gcc builtins that can lead to calls to
libatomic when linked with -O0.

MFC after: 1 week

6 years agoFix formatting in snd_hda.4
bjk [Mon, 2 Apr 2018 22:59:33 +0000 (22:59 +0000)]
Fix formatting in snd_hda.4

Submitted by: 0mp
Reviewed by: skreuzer
Differential Revision: https://reviews.freebsd.org/D14922

6 years agoBring some order to horizontal and vertical spacing in hier(7).
trasz [Mon, 2 Apr 2018 21:33:16 +0000 (21:33 +0000)]
Bring some order to horizontal and vertical spacing in hier(7).

MFC after: 2 weeks