]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoCentralize the complications for special efficient rounding to integers.
bde [Fri, 20 Jul 2018 12:42:24 +0000 (12:42 +0000)]
Centralize the complications for special efficient rounding to integers.

This was open-coded in range reduction for trig and exp functions.  Now
there are 3 static inline functions rnint[fl]() that replace open-coded
expressions, and type-generic irint() and i64rint() macros that hide the
complications for efficiently using non-generic irint() and irintl()
functions and casts.

Special details:

ld128/e_rem_pio2l.h needs to use i64rint() since it needs a 46-bit integer
result.  Everything else only needs a (less than) 32-bit integer result so
uses irint().

Float and double cases now use float_t and double_t locally instead of
STRICT_ASSIGN() to avoid bugs in extra precision.

On amd64, inline asm is now only used for irint() on long doubles.  The SSE
asm for irint() on amd64 only existed because the ifdef tangles made the
correct method of simply casting to int for this case non-obvious.

5 years agoSet SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done.
rmacklem [Fri, 20 Jul 2018 12:03:16 +0000 (12:03 +0000)]
Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done.

During testing of the pNFS client, it was observed that an RPC could get
stuck in sosend() for a very long time if the network connection to a DS
had failed. This is fixed by setting SO_SNDTIMEO on the TCP socket.
This is only done when CLSET_TIMEOUT is done and this is not done by any
use of the krpc currently in the source tree, so there should be no effect
on extant uses.
A future patch will use CLSET_TIMEOUT for TCP connections to DSs.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16293

5 years agolibcrypt: There is no need to clear message digest context after they
delphij [Fri, 20 Jul 2018 07:16:28 +0000 (07:16 +0000)]
libcrypt: There is no need to clear message digest context after they
are finialized after r336539, so do not do it.

Submitted by: David CARLIER <devnexen gmail com>
MFC after: 1 month (after r336539)
Differential Revision: https://reviews.freebsd.org/D16059

5 years agoGet rid of unused variables.
delphij [Fri, 20 Jul 2018 07:07:27 +0000 (07:07 +0000)]
Get rid of unused variables.

copied_key and copied_salt are assigned with NULL and never used
otherwise. Remove the two variables and related code.

Reviewed by: pfg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16314

5 years agolibmd: Always erase context in _Final method, and when doing
delphij [Fri, 20 Jul 2018 07:01:28 +0000 (07:01 +0000)]
libmd: Always erase context in _Final method, and when doing
it, consistently use explicit_bzero().

Update manual pages to match the behavior.

Reviewed by: pfg, allanjude, jmg
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D16316

5 years agoBump version to 1200075 for zfsloader being folded into loader.
imp [Fri, 20 Jul 2018 05:34:02 +0000 (05:34 +0000)]
Bump version to 1200075 for zfsloader being folded into loader.

As an aside: 1200074 should be used as the last version with big
endian arm support, should that be needed. it was actually removed
a day later, but no bump was made until now.

5 years agoMention zfsloader being folded into loader in UPDATING.
imp [Fri, 20 Jul 2018 05:26:36 +0000 (05:26 +0000)]
Mention zfsloader being folded into loader in UPDATING.

5 years agoRemove three stray instances of zfsloader.
imp [Fri, 20 Jul 2018 05:26:14 +0000 (05:26 +0000)]
Remove three stray instances of zfsloader.

5 years agoHoist EFI_TARGET and SOURCE_DATE_EPOCH up into efi/Makefile.inc
imp [Fri, 20 Jul 2018 05:18:03 +0000 (05:18 +0000)]
Hoist EFI_TARGET and SOURCE_DATE_EPOCH up into efi/Makefile.inc

5 years agoNM and OBJCOPY are already defined for all builds. There's no need to
imp [Fri, 20 Jul 2018 05:17:56 +0000 (05:17 +0000)]
NM and OBJCOPY are already defined for all builds. There's no need to
conditionally define them here.

5 years agoEliminate zfsloader man page.
imp [Fri, 20 Jul 2018 05:17:49 +0000 (05:17 +0000)]
Eliminate zfsloader man page.

Remove all cross references to zfsloader.8 and /boot/zfsloader.
Move ZFS specific info into loader.8.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16361

5 years agoCollapse zfsloader functionality back down into loader.
imp [Fri, 20 Jul 2018 05:17:37 +0000 (05:17 +0000)]
Collapse zfsloader functionality back down into loader.

We no longer really need a separate zfsloader. It was useful when we
were first supporting ZFS and had limited ability to properly boot off
of ZFS without the special boot loader. Now that the boot loader has
matured, go the way loader.efi pioneered and just build one
binary. Change the name of the loader to load in the secondary boot
blocks to be just /boot/loader. Provide a symbolic link from zfsloader
to loader so people who have not upgraded their boot blocks are not
affected. This has the happy benefit of making coexistence easier as
well (fewer binaries in the matrix).

Discussed with: allanjude@, kevans@
RelNotes: Yes
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16361

5 years agoRemove a redundant declaration.
cy [Fri, 20 Jul 2018 02:25:39 +0000 (02:25 +0000)]
Remove a redundant declaration.

While at it add a blank line, conforming with the convention
used in this file.

X-MFC-with: r336203

5 years agoTo reduce our diff between our sources and our upline, sync up
cy [Fri, 20 Jul 2018 02:17:19 +0000 (02:17 +0000)]
To reduce our diff between our sources and our upline, sync up
with upline. Also making it easier to read.

Obtained from: diffing base with ports
X-MFC-with: r336203

5 years agoMFV: r336486
cy [Fri, 20 Jul 2018 02:04:10 +0000 (02:04 +0000)]
MFV: r336486

Prevent reinstallation of an already in-use group key.
Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410.

Obtained from: https://w1.fi/security/2017-1/\
rebased-v2.6-0002-Prevent-reinstallation-\
of-an-already-in-use-group-ke.patch
X-MFC-with: r336203

5 years agoRevert r336501. It was a of the wrong rev from the vendor branch.
cy [Fri, 20 Jul 2018 01:53:28 +0000 (01:53 +0000)]
Revert r336501. It was a of the wrong rev from the vendor branch.

5 years agocryptocheck: Correct mismatch between OpenSSL use and OCF Blake2
cem [Fri, 20 Jul 2018 01:51:05 +0000 (01:51 +0000)]
cryptocheck: Correct mismatch between OpenSSL use and OCF Blake2

This corrects a mistake introduced to the cryptocheck tool in r331418.

Our CRYPTO_BLAKE2B and CRYPTO_BLAKE2S algorithms refer to either the plain,
unkeyed hashes (specified with cri_klen = 0), or a Blake2-specific keyed MAC
(when a cri_key is provided).

In contrast, OpenSSL's Blake2 algorithms only provide the plain hash.
Cryptocheck's T_HMAC corresponds to OpenSSL's HMAC() routine, which is the
ordinary HMAC construction applied to any plain, unkeyed hash.  We don't
have any HMAC-Blake2 cipher modes in OCF, so fix the test to only test
Blake2 as a plain hash.

(Ideally we would test keyed Blake2 as well, but that is left as future
work.)

PR: 229795

5 years agoAdd ntpd to the list of users/groups to check before installing.
ian [Fri, 20 Jul 2018 00:44:04 +0000 (00:44 +0000)]
Add ntpd to the list of users/groups to check before installing.

5 years agoMake it possible to run ntpd as a non-root user, add ntpd uid and gid.
ian [Thu, 19 Jul 2018 23:55:29 +0000 (23:55 +0000)]
Make it possible to run ntpd as a non-root user, add ntpd uid and gid.

Code analysis and runtime analysis using truss(8) indicate that the only
privileged operations performed by ntpd are adjusting system time, and
(re-)binding to privileged UDP port 123. These changes add a new mac(4)
policy module, mac_ntpd(4), which grants just those privileges to any
process running with uid 123.

This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes
them the owner of the /var/db/ntp directory, so that it can be used as a
location where the non-privileged daemon can write files such as the
driftfile, and any optional logfile or stats files.

Because there are so many ways to configure ntpd, the question of how to
configure it to run without root privs can be a bit complex, so that will be
addressed in a separate commit. These changes are just what's required to
grant the limited subset of privs to ntpd, and the small change to ntpd to
prevent it from exiting with an error if running as non-root.

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

5 years agoNote big endian arm removal.
imp [Thu, 19 Jul 2018 23:54:18 +0000 (23:54 +0000)]
Note big endian arm removal.

5 years agoarm64: Add vt_efifb to GENERIC
manu [Thu, 19 Jul 2018 21:59:52 +0000 (21:59 +0000)]
arm64: Add vt_efifb to GENERIC

We can now have efifb being setup correctly.
Enjoy video output on some boards when you couldn't before.

Tested-On:  Pine64
Tested-On:  Pine64-LTS
Tested-On:  Pinebook

5 years agoRaise the size of L3 table for early devmap on arm64
manu [Thu, 19 Jul 2018 21:58:06 +0000 (21:58 +0000)]
Raise the size of L3 table for early devmap on arm64

Some driver (like efifb) needs to map more than the current L2_SIZE
Raise the size so we can map the framebuffer setup by the bootloader.

Reviewed by: cognet

5 years agoRevert r336509. Fails buildworld.
jhibbits [Thu, 19 Jul 2018 21:06:58 +0000 (21:06 +0000)]
Revert r336509.  Fails buildworld.

I had naively assumed that building kernel would be sufficient to test that
the header is sane.  However, it turns out this now needs -fms-extensions to
build.  Rather than sprinkling -fms-extensions all over the place, revert
for now, and revisit with a better fix.

5 years agoofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout
jhibbits [Thu, 19 Jul 2018 20:22:46 +0000 (20:22 +0000)]
ofwfb: Check for /chosen/stdout-path in addition to /chosen/stdout

Some platforms use /chosen/stdout-path as the property containing the path to
the stdout node, not /chosen/stdout.

5 years agoWhitespace changes due to changes in ident.
tuexen [Thu, 19 Jul 2018 20:16:33 +0000 (20:16 +0000)]
Whitespace changes due to changes in ident.

5 years agoMerge the md_page structs for AIM and Book-E into a single unioned struct
jhibbits [Thu, 19 Jul 2018 20:13:33 +0000 (20:13 +0000)]
Merge the md_page structs for AIM and Book-E into a single unioned struct

Summary:
Ports like sysutils/lsof troll through kernel structures, and
therefore include kernel headers and all the dirty secrets involved.  struct
vm_page includes the struct md_page inline, which currently is only defined
if AIM or BOOKE is defined.  Thus, by default, sysutils/lsof cannot build,
due to the struct md_page having an incomplete type.  Fix this by merging
the two struct definitions into an anonymous struct-union.

A similar change could be made to unify the pmap structures as well.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D16232

5 years agoRevert https://svnweb.freebsd.org/changeset/base/336503
tuexen [Thu, 19 Jul 2018 20:11:14 +0000 (20:11 +0000)]
Revert https://svnweb.freebsd.org/changeset/base/336503
since I also ran the export script with different parameters.

5 years agoDelete an XXX comment addressed by r336505.
markj [Thu, 19 Jul 2018 20:11:08 +0000 (20:11 +0000)]
Delete an XXX comment addressed by r336505.

X-MFC with: r336505
Sponsored by: The FreeBSD Foundation

5 years agoMFV r336490:
cy [Thu, 19 Jul 2018 20:10:34 +0000 (20:10 +0000)]
MFV r336490:

Prevent installation of an all-zero TK.
This is also upline git commit 53bb18cc8b7a4da72e47e4b3752d0d2135cffb23.

Obtained from: https://w1.fi/security/2017-1/\
rebased-v2.6-0004-Prevent-installation-\
of-an-all-zero-TK.patch
X-MFC-with: r336203

5 years agoHave preload_delete_name() free pages backing preloaded data.
markj [Thu, 19 Jul 2018 20:00:28 +0000 (20:00 +0000)]
Have preload_delete_name() free pages backing preloaded data.

On i386 and amd64, add a vm_phys segment for physical memory used to
store the kernel binary and other preloaded data.  This makes it
possible to free such memory back to the system once it is no longer
needed, e.g., when a preloaded kernel module is unloaded.  Previously,
it would have remained unused.

Reviewed by: kib, royger
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D16330

5 years agoProvide the full module path to preload_delete_name().
markj [Thu, 19 Jul 2018 19:50:42 +0000 (19:50 +0000)]
Provide the full module path to preload_delete_name().

The basename will never match against the preload metadata, so these
calls previously had no effect.

Reviewed by: kib, royger
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D16330

5 years agoWhitespace changes due to change if ident.
tuexen [Thu, 19 Jul 2018 19:33:42 +0000 (19:33 +0000)]
Whitespace changes due to change if ident.

5 years agoMFV: r336486
cy [Thu, 19 Jul 2018 19:22:26 +0000 (19:22 +0000)]
MFV: r336486

Prevent reinstallation of an already in-use group key.
Upline git commit cb5132bb35698cc0c743e34fe0e845dfc4c3e410.

Obtained from: https://w1.fi/security/2017-1/\
rebased-v2.6-0002-Prevent-reinstallation-\
of-an-already-in-use-group-ke.patch
X-MFC-with: r336203

5 years agoRevert r336497 for now, as it breaks on architectures using gcc, with:
dim [Thu, 19 Jul 2018 19:07:25 +0000 (19:07 +0000)]
Revert r336497 for now, as it breaks on architectures using gcc, with:

cc1: warnings being treated as errors
/usr/src/lib/msun/src/s_cpow.c: In function 'cpow':
/usr/src/lib/msun/src/s_cpow.c:63: warning: implicit declaration of function 'CMPLX'

5 years agoMFV: r336485
cy [Thu, 19 Jul 2018 19:04:30 +0000 (19:04 +0000)]
MFV: r336485

Address: hostapd: Avoid key reinstallation in FT handshake

Obtained from: https://w1.fi/security/2017-1/\
rebased-v2.6-0001-hostapd-Avoid-key-\
reinstallation-in-FT-handshake.patch
X-MFC-with: r336203

5 years agoWhen reporting an error, print the errno value.
kib [Thu, 19 Jul 2018 19:03:18 +0000 (19:03 +0000)]
When reporting an error, print the errno value.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

5 years agoFix powl, cpow, cpowf, and cpowl imports from OpenBSD
dim [Thu, 19 Jul 2018 18:44:10 +0000 (18:44 +0000)]
Fix powl, cpow, cpowf, and cpowl imports from OpenBSD

This is a follow-up to r336299.

* lib/msun/Makefile:
  . Remove polevll.c

* lib/msun/ld80/e_powl.c:
  . Copy contents of polevll.c to here.  This is the only consumer of
    these functions.  Make functions 'static inline'.
  . Make reducl a 'static inline' function.

* lib/msun/man/exp.3:
  . Remove BUGS section that no longer applies.

* lib/msun/src/math_private.h:
  . Remove prototypes of __p1evll() and __polevll()

* lib/msun/src/s_cpow.c:
* lib/msun/src/s_cpowf.c:
* lib/msun/src/s_cpowl.c
  . Use the CMPLX macro from either C99 or math_private.h (depends of
    compiler support) instead of the problematic use of complex I.

Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
PR: 229876
MFC after: 1 week

5 years agoStop writing past the end of the buffer in the msgget_limit test. The value
andrew [Thu, 19 Jul 2018 17:13:46 +0000 (17:13 +0000)]
Stop writing past the end of the buffer in the msgget_limit test. The value
in i is already correct to write to the last item in the buf array.

Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

5 years agoRevert r329254. The underlying cause for the copy-on-write problem in
alc [Thu, 19 Jul 2018 17:01:10 +0000 (17:01 +0000)]
Revert r329254.  The underlying cause for the copy-on-write problem in
multithreaded programs that was addressed by r329254 was in the
implementation of pmap_enter() on some architectures, notably, amd64.
kib@, markj@ and I have audited all of the pmap_enter() implementations,
and fixed the broken ones, specifically, amd64 (r335784, r335971), i386
(r336092), mips (r336248), and riscv (r336294).

To be clear, the reason to address the problem within pmap_enter() and
revert r329254 is not just a matter of principle.  An effect of r329254
was that a copy-on-write fault actually entailed two page faults, not
one, even for single-threaded programs.  Now, in the expected case for
either single- or multithreaded programs, we are back to a single page
fault to complete a copy-on-write operation.  (In extremely rare
circumstances, a multithreaded program could suffer two page faults.)

Reviewed by: kib, markj
Tested by: truckman
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D16301

5 years agonewsyslog.8: Remove cutesy nonsense
cem [Thu, 19 Jul 2018 16:03:20 +0000 (16:03 +0000)]
newsyslog.8: Remove cutesy nonsense

Sponsored by: Dell EMC Isilon

5 years agoFix spurious and extra underflows and resulting inaccuracies for some cases
bde [Thu, 19 Jul 2018 15:04:10 +0000 (15:04 +0000)]
Fix spurious and extra underflows and resulting inaccuracies for some cases
with 1 huge component and 1 tiny (but nowhere near denormal) component.
Rescale earlier so that a scale factor of 2 can be combined with a non-
scale divisor of 2, so that the division doesn't shift out a bit.  In the
usual case where the scale factor is just 1, the division may shift out a
bit, but then the underflow is not spurious and the inaccuracies are harder
to fix.

5 years agoOops, r336412 undid the fix of the overflow threshold in r323003. Restore
bde [Thu, 19 Jul 2018 14:24:48 +0000 (14:24 +0000)]
Oops, r336412 undid the fix of the overflow threshold in r323003.  Restore
the previous overflow threshold and adjust comments.

5 years agoDescribe how to prevent *.core files from being created using ulimit.
0mp [Thu, 19 Jul 2018 13:09:29 +0000 (13:09 +0000)]
Describe how to prevent *.core files from being created using ulimit.

While here, pet mandoc.

Reviewed by: eadler (previous revision), jilles (previous revision), mat (mentor)
Approved by: manpages (jilles), mat (mentor)
Differential Revision: https://reviews.freebsd.org/D15609

5 years agoPROFILE, TESTS and CXX build options are no longer broken for RISC-V.
br [Thu, 19 Jul 2018 13:02:29 +0000 (13:02 +0000)]
PROFILE, TESTS and CXX build options are no longer broken for RISC-V.

Sponsored by: DARPA, AFRL

5 years agoUpdate mentor and mentee information.
0mp [Thu, 19 Jul 2018 12:58:10 +0000 (12:58 +0000)]
Update mentor and mentee information.

Reviewed by: mat (mentor)
Approved by: mat (mentor)
Differential Revision: https://reviews.freebsd.org/D16295

5 years agoAdd a GCC 7.1.0 no-error warning flag.
br [Thu, 19 Jul 2018 12:56:54 +0000 (12:56 +0000)]
Add a GCC 7.1.0 no-error warning flag.

This is required to build libdevdctl.

Note this flag is not required for GCC 8.1.0.

Sponsored by: DARPA, AFRL

5 years agofdt_pinctrl: Add some TSLOG annotations
manu [Thu, 19 Jul 2018 11:41:53 +0000 (11:41 +0000)]
fdt_pinctrl: Add some TSLOG annotations

While we see the time spent in the pin controller attach via the hooks in
DEVICE_ATTACH, it is useful to see the time spent configuring the pins.

5 years agocpufreq_dt: Add operating-points-v2 support
manu [Thu, 19 Jul 2018 11:31:49 +0000 (11:31 +0000)]
cpufreq_dt: Add operating-points-v2 support

Oppv2 add more flexibility on regulator value for the core voltage amongst
other new thing.
For now only shared opp table is supported as I don't have hardware with
non-shared opp table.

Tested-On: OrangePi One (with oppv1 and oppv2)
Tested-On: Pine64-LTS

5 years agokern_cpu: When adding abs frequency allow for unordered insertion
manu [Thu, 19 Jul 2018 11:28:14 +0000 (11:28 +0000)]
kern_cpu: When adding abs frequency allow for unordered insertion

Keep the list ordered as some code assume that it is but allow for
unordered cf_settings sets.

5 years agoarm: Implement cpu_est_clockrate for armv[67]
manu [Thu, 19 Jul 2018 11:27:11 +0000 (11:27 +0000)]
arm: Implement cpu_est_clockrate for armv[67]

5 years agoxen: add missing file from r336474
royger [Thu, 19 Jul 2018 10:14:52 +0000 (10:14 +0000)]
xen: add missing file from r336474

5 years agoxen: implement early init helper for PVHv2
royger [Thu, 19 Jul 2018 08:44:52 +0000 (08:44 +0000)]
xen: implement early init helper for PVHv2

In order to setup an initial environment and jump into the generic
hammer_time initialization function. Some of the code is shared with
PVHv1, while other code is PVHv2 specific.

This allows booting FreeBSD as a PVHv2 DomU and Dom0.

Sponsored by: Citrix Systems R&D

5 years agoxen: allow very early initialization of the hypercall page
royger [Thu, 19 Jul 2018 08:13:41 +0000 (08:13 +0000)]
xen: allow very early initialization of the hypercall page

Allow the hypercall page to be initialized very early, even before
vtophys is functional. Also make the function global so it can be
called by other files.

This will be needed in order to perform the early bringup on PVHv2
guests.

Sponsored by: Citrix Systems R&D

5 years agoxen: attach the PV CPU if no CPU device is present
royger [Thu, 19 Jul 2018 08:00:52 +0000 (08:00 +0000)]
xen: attach the PV CPU if no CPU device is present

When booted as PVHv2, there's no ACPI CPU object, so attach the PV CPU
device in order to take it's place.

This is required in case some device or driver tries to poke at the
PCPU device field.

Sponsored by: Citrix Systems R&D

5 years agoxen: do not limit PV console usage to PV guests
royger [Thu, 19 Jul 2018 07:58:24 +0000 (07:58 +0000)]
xen: do not limit PV console usage to PV guests

The Xen PV console is also available to HVM and PVHv2 guests, so don't
limit the console usage to PV guests only.

Sponsored by: Citrix Systems R&D

5 years agoxen: remove direct usage of HYPERVISOR_start_info
royger [Thu, 19 Jul 2018 07:54:45 +0000 (07:54 +0000)]
xen: remove direct usage of HYPERVISOR_start_info

HYPERVISOR_start_info is only available to PV and PVHv1 guests, HVM
and PVHv2 guests get this data from HVM parameters that are fetched
using a hypercall.

Instead provide a set of helper functions that should be used to fetch
this data. The helper functions have different implementations
depending on whether FreeBSD is running as PVHv1 or HVM/PVHv2 guest
type.

This helps to cleanup generic Xen code by removing quite a lot of
xen_pv_domain and xen_hvm_domain macro usages.

Sponsored by: Citrix Systems R&D

5 years agoxen: add PVHv2 entry point
royger [Thu, 19 Jul 2018 07:39:35 +0000 (07:39 +0000)]
xen: add PVHv2 entry point

The PVHv2 entry point is fairly similar to the multiboot1 one. The
kernel is started in protected mode with paging disabled. More
information about the exact BSP state can be found in the pvh.markdown
document on the Xen tree.

This entry point is going to be joined with the native entry point at
hammer_time, and in order to do so the BSP needs to be bootstrapped
into long mode with the same set of page tables as used on bare metal.

Sponsored by: Citrix Systems R&D

5 years agoAdd myself (zleslie) to calendar.freebsd
zleslie [Thu, 19 Jul 2018 04:31:41 +0000 (04:31 +0000)]
Add myself (zleslie) to calendar.freebsd

PR: D15896
Approved by: swills(mentor)

5 years agoFix the build of tools/regression/sockets/unix_cmsg
asomers [Thu, 19 Jul 2018 00:22:18 +0000 (00:22 +0000)]
Fix the build of tools/regression/sockets/unix_cmsg

MFC after: 2 weeks

5 years agoBump the ICMP echo limits to match the RFC
rrs [Wed, 18 Jul 2018 22:49:53 +0000 (22:49 +0000)]
Bump the ICMP echo limits to match the RFC

Reviewed by: tuexen
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D16333

5 years agoIf the console is already set, don't override it.
imp [Wed, 18 Jul 2018 22:45:45 +0000 (22:45 +0000)]
If the console is already set, don't override it.

If console=X is specified on the command line, it's effectively
overridden by the current code. It shouldn't do that.

5 years agoIf rootdev is set, use it as currdev.
imp [Wed, 18 Jul 2018 22:45:26 +0000 (22:45 +0000)]
If rootdev is set, use it as currdev.

Setting rootdev in the enviornment should specify things
completely. If it is set, then have it override everything else.

PR: 229770
Differential Review: https://reviews.freebsd.org/D16322

5 years agoFix description.
oshogbo [Wed, 18 Jul 2018 21:57:04 +0000 (21:57 +0000)]
Fix description.

5 years agobge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX
eugen [Wed, 18 Jul 2018 18:28:17 +0000 (18:28 +0000)]
bge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX
found in some MacBook Pro.

PR: 229727
Reported by: Stephan Neuhaus <sten@artdecode.de> and others
Tested by: Stephan Neuhaus <sten@artdecode.de>
Approved by: mav (mentor)
MFC after: 1 month

5 years agoPort r324665 and r325285 to arm64.
markj [Wed, 18 Jul 2018 17:58:17 +0000 (17:58 +0000)]
Port r324665 and r325285 to arm64.

These changes ensure that reclaim_pv_chunk() can be safely be
executed concurrently by multiple threads.

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

5 years agoConsistently use full stops.
trasz [Wed, 18 Jul 2018 16:28:57 +0000 (16:28 +0000)]
Consistently use full stops.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL

5 years agoFix a couple of typos in r334844 noticed by Richard Kojedzinszky.
sef [Wed, 18 Jul 2018 16:03:40 +0000 (16:03 +0000)]
Fix a couple of typos in r334844 noticed by Richard Kojedzinszky.

Submitted by: Richard Kojedzinszky
Reviewed by: sef
Approved by: mav

5 years agoMake the definition of struct kevent in event.h match what the man page for kevent...
dab [Wed, 18 Jul 2018 13:04:03 +0000 (13:04 +0000)]
Make the definition of struct kevent in event.h match what the man page for kevent(2) says.

This is a trivial comment-only fix. The man page for kevent(2) gives
the definition of struct kevent, including a comment on each
field. The actual definition in sys/event.h omitted the comments on
some fields. Add the comments in. Not only does this make the man page
and include file agree, but the comments are useful in and of
themselves.

Reviewed by: kib (D15778: commented that this should be a separate commit)
MFC after: 3 days
Sponsored by: Dell EMC

5 years agoAdd a GCC 8.1 warning flag.
br [Wed, 18 Jul 2018 11:31:15 +0000 (11:31 +0000)]
Add a GCC 8.1 warning flag.

This is required to build ATF.

Sponsored by: DARPA, AFRL

5 years agoRemove the dead code from ARM cpufunc_* files.
mmel [Wed, 18 Jul 2018 10:33:07 +0000 (10:33 +0000)]
Remove the dead code from ARM cpufunc_* files.
The elf trampoline was never been supported for ARMv6 and ARMv7 and was
disconnected from kernel build many months ago.

MFC after: 2 weeks

5 years agoUse unspecified address family when connecting as a client in
hselasky [Wed, 18 Jul 2018 10:23:30 +0000 (10:23 +0000)]
Use unspecified address family when connecting as a client in
libibverbs example utilities.

This allows connecting to both IPv4 and IPv6 and reverts
some FreeBSD only patches.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoAdd ability to parse sysfs paths under FreeBSD in libibumad.
hselasky [Wed, 18 Jul 2018 10:20:39 +0000 (10:20 +0000)]
Add ability to parse sysfs paths under FreeBSD in libibumad.

Add the ability to to parse sysfs paths to sysctl nodes by replacing '/' with '.'

Submitted by: slavash@
MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoUpdate version information for the mlx5 and mlx5en(4) modules.
hselasky [Wed, 18 Jul 2018 10:12:53 +0000 (10:12 +0000)]
Update version information for the mlx5 and mlx5en(4) modules.

While at it bump some copyright dates.

MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoDo not inline transmit headers and use HW VLAN tagging if supported by mlx5en(4).
hselasky [Wed, 18 Jul 2018 10:03:30 +0000 (10:03 +0000)]
Do not inline transmit headers and use HW VLAN tagging if supported by mlx5en(4).

Query the minimal inline mode supported by the card.
When creating a send queue, cache the queried mode and optimize the transmit
if no inlining is required.  In this case, we can avoid touching the headers
cache line and avoid dirtying several more lines by copying headers into
the send WQEs.  Also, if no inline headers are used, hardware assists in
the VLAN tag framing.

Submitted by: kib@, slavash@
MFC after: 1 week
Sponsored by: Mellanox Technologies

5 years agoAlso check if __ARM_ARCH_6KZ__ is defined when detecting when to use ARMv6
andrew [Wed, 18 Jul 2018 09:17:37 +0000 (09:17 +0000)]
Also check if __ARM_ARCH_6KZ__ is defined when detecting when to use ARMv6
instructions. There is some code that still uses the _ARM_ARCH_* macros.

Sponsored by: DARPA, AFRL

5 years agoImplemented Device Lost Timer, which is used to give target device the time to recove...
ram [Wed, 18 Jul 2018 07:01:34 +0000 (07:01 +0000)]
Implemented Device Lost Timer, which is used to give target device the time to recover before marking dead.

Issue: IO fails immediately after doing port-toggle.
Fix: Added LDT(Device Lost Timer)- we wait a specific period of time prior to telling the OS about lost device.

Approved by: ken, mav
MFC after: 3 days
Differential Revision: D16196

5 years agoRemove unused variable
cem [Wed, 18 Jul 2018 04:44:11 +0000 (04:44 +0000)]
Remove unused variable

Reported by: gcc

5 years agoaesni(4): Add SHA2-224(-HMAC) support as well
cem [Wed, 18 Jul 2018 04:43:18 +0000 (04:43 +0000)]
aesni(4): Add SHA2-224(-HMAC) support as well

5 years agoaesni(4): Add sha256 plain hash support
cem [Wed, 18 Jul 2018 04:37:14 +0000 (04:37 +0000)]
aesni(4): Add sha256 plain hash support

5 years agoaesni(4): Abstract out hash/HMAC support
cem [Wed, 18 Jul 2018 04:29:44 +0000 (04:29 +0000)]
aesni(4): Abstract out hash/HMAC support

No functional change.

Verified with cryptocheck.

5 years agoglxsb: Convert remaining OCF driver to new interface
cem [Wed, 18 Jul 2018 03:32:28 +0000 (03:32 +0000)]
glxsb: Convert remaining OCF driver to new interface

glxsb, an i386 AMD Geode specific driver, was missed in r336439.  Correct that
mistake and adapt it to the new interface as well.

X-MFC-with: 336439

5 years agoOpenCrypto: Convert sessions to opaque handles instead of integers
cem [Wed, 18 Jul 2018 00:56:25 +0000 (00:56 +0000)]
OpenCrypto: Convert sessions to opaque handles instead of integers

Track session objects in the framework, and pass handles between the
framework (OCF), consumers, and drivers.  Avoid redundancy and complexity in
individual drivers by allocating session memory in the framework and
providing it to drivers in ::newsession().

Session handles are no longer integers with information encoded in various
high bits.  Use of the CRYPTO_SESID2FOO() macros should be replaced with the
appropriate crypto_ses2foo() function on the opaque session handle.

Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to
the opaque handle interface.  Discard existing session tracking as much as
possible (quick pass).  There may be additional code ripe for deletion.

Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style
interface.  The conversion is largely mechnical.

The change is documented in crypto.9.

Inspired by
https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html .

No objection from: ae (ipsec portion)
Reported by: jhb

5 years agoFixes for the following issues:
davidcs [Tue, 17 Jul 2018 23:56:13 +0000 (23:56 +0000)]
Fixes for  the following issues:
1. Fix taskqueues drain/free to fix panic seen when interface is being
   bought down and in parallel asynchronous link events happening.

2. Fix bxe_ifmedia_status()

Submitted by:Vaishali.Kulkarni@cavium.com and Anand.Khoje@cavium.com
MFC after:5 days

5 years agoRemove special cases for armeb in the build.
imp [Tue, 17 Jul 2018 23:23:54 +0000 (23:23 +0000)]
Remove special cases for armeb in the build.

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

5 years agoRemove kernel support for armeb
imp [Tue, 17 Jul 2018 23:23:45 +0000 (23:23 +0000)]
Remove kernel support for armeb

Remove all the big-endian arm architectures (ixp425 and ixp435)
support in the kernel and associated drivers.

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

5 years agoRemove armeb from arch.7
imp [Tue, 17 Jul 2018 23:23:39 +0000 (23:23 +0000)]
Remove armeb from arch.7

Remove all the details about armeb from arch(7), except for its
release start and end, like alpha, ia64 and pc98.

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

5 years agoAs discussed several times on freebsd-arch, start to decommission armeb.
imp [Tue, 17 Jul 2018 23:23:34 +0000 (23:23 +0000)]
As discussed several times on freebsd-arch, start to decommission armeb.

Remove armeb/arm from KNOWN_ARCHS.
Remove armeb from arm universe targets.

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

5 years agoCheck that EC2SNSTOPIC and EC2PUBLIC are non-empty, along with being
cperciva [Tue, 17 Jul 2018 23:16:05 +0000 (23:16 +0000)]
Check that EC2SNSTOPIC and EC2PUBLIC are non-empty, along with being
defined, in order to avoid problems with thermite.sh.

Reported by: gjb

5 years agoFix compile error introduced in r336245.
imp [Tue, 17 Jul 2018 23:00:52 +0000 (23:00 +0000)]
Fix compile error introduced in r336245.

Include sys/boot.h to pickup the prototypes for boot_parse_arg.

5 years agoRemove bogus attempt to simulate scrolling. It's not needed and messes
imp [Tue, 17 Jul 2018 21:45:14 +0000 (21:45 +0000)]
Remove bogus attempt to simulate scrolling. It's not needed and messes
up serial output. Setting the cursor position after every character is
inefficient, and causes all lines to be over-printed in the serial
console for the boot loader. Allow the terminal to do the emulation.

This isn't completely perfect when the size of the terminal attached
to the serial port isn't the same as 80x25 to match the viedoe console
(or whatever the video console is). While imperfect still, these
changes make it much better.

This makes the serial port useful with UEFI.

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

5 years agoFix a typo: change lists to list to match rest of sentence.
imp [Tue, 17 Jul 2018 21:18:49 +0000 (21:18 +0000)]
Fix a typo: change lists to list to match rest of sentence.

Also, I misspoke in r336428. Any devices on sparc64 machines on "isa"
that can do DMA can do 32-bit address DMA and aren't limited to
24-bits of address.

5 years agoRemove VM_FREELIST_ISADMA
imp [Tue, 17 Jul 2018 21:08:01 +0000 (21:08 +0000)]
Remove VM_FREELIST_ISADMA

Sparc64 doesn't have any devices that do DMA that are attached to isa
or ebus, so we don't need a low-memory pool.

5 years agoRemove VM_FREELIST_ISADMA. It's not needed on these architectures.
imp [Tue, 17 Jul 2018 21:07:53 +0000 (21:07 +0000)]
Remove VM_FREELIST_ISADMA. It's not needed on these architectures.

Differential Review: https://reviews.freebsd.org/D16290

5 years agohyperv/hn: Fix panic in hypervisor code upon device detach event
dexuan [Tue, 17 Jul 2018 21:05:08 +0000 (21:05 +0000)]
hyperv/hn: Fix panic in hypervisor code upon device detach event

Submitted by: hselasky
Reviewed by: dexuan
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D16139

5 years agoMore typos
imp [Tue, 17 Jul 2018 20:26:17 +0000 (20:26 +0000)]
More typos

Noticed by: ian@

5 years agoFix typo in the command summary.
imp [Tue, 17 Jul 2018 20:11:52 +0000 (20:11 +0000)]
Fix typo in the command summary.

Of course, I can't get the command to work, but it's a start...

5 years agoTeach EC2 AMI release code to send an SNS notification after publishing
cperciva [Tue, 17 Jul 2018 19:05:30 +0000 (19:05 +0000)]
Teach EC2 AMI release code to send an SNS notification after publishing
new AMIs if EC2SNSTOPIC is defined.

Reviewed by: gjb
Requested by: Amazon

5 years agoconfig(8): Invert checks; envmode/hintmode reflect "env provided"1
kevans [Tue, 17 Jul 2018 15:16:34 +0000 (15:16 +0000)]
config(8): Invert checks; envmode/hintmode reflect "env provided"1

5 years agoaudit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2)
asomers [Tue, 17 Jul 2018 15:12:55 +0000 (15:12 +0000)]
audit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2)

Also, fix a bug in common code that could cause other tests to fail: using
ppoll(2) in combination with buffered I/O for /dev/auditpipe.  Fix it by
disabling buffering.

Submitted by: aniketp
MFC after: 2 weeks
Sponsored by: Google, Inc. (GSoC 2018)
Differential Revision: https://reviews.freebsd.org/D16099

5 years agoAdd a FALLTHROUGH comment to kvprintf().
markj [Tue, 17 Jul 2018 14:56:54 +0000 (14:56 +0000)]
Add a FALLTHROUGH comment to kvprintf().

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 3 days