Displaying 1 50 of 270,703 commits (0.016s)

HardenedBSD — sys/amd64/amd64 xen-locore.S, sys/x86/xen pv.c hvm.c

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

HardenedBSD — sys/x86/xen hvm.c, sys/xen hvm.h

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

Sponsored by: Citrix Systems R&D
Delta File
+53 -41 sys/x86/xen/hvm.c
+8 -0 sys/xen/hvm.h
+61 -41 2 files

HardenedBSD — sys/dev/xen/pvcpu pvcpu.c

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
Delta File
+2 -2 sys/dev/xen/pvcpu/pvcpu.c
+2 -2 1 file

HardenedBSD — sys/dev/xen/console xen_console.c

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
Delta File
+3 -8 sys/dev/xen/console/xen_console.c
+3 -8 1 file

HardenedBSD — sys/dev/xen/balloon balloon.c, sys/dev/xen/console xen_console.c

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

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

HardenedBSD — sys/amd64/amd64 xen-locore.S, sys/xen/interface elfnote.h

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

HardenedBSD — sys/netpfil/ipfw ip_fw_sockopt.c

MFC r336219:
  Use correct size when we are allocating array for skipto index.

  Also, there is no need to use M_ZERO for idxmap_back. It will be
  re-filled just after allocation in update_skipto_cache().

  PR:                229665
Delta File
+2 -4 sys/netpfil/ipfw/ip_fw_sockopt.c
+2 -4 1 file

HardenedBSD — tools/regression/sockets/unix_cmsg Makefile

Fix the build of tools/regression/sockets/unix_cmsg

MFC after:        2 weeks

HardenedBSD — sys/netinet ip_icmp.c, sys/netinet/tcp_stacks rack.c

Bump the ICMP echo limits to match the RFC

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

HardenedBSD — stand/efi/loader main.c

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.
Delta File
+33 -34 stand/efi/loader/main.c
+33 -34 1 file

HardenedBSD — stand/efi/loader main.c

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
Delta File
+18 -5 stand/efi/loader/main.c
+18 -5 1 file

HardenedBSD — lib/libcapsicum capsicum_helpers.3

Fix description.

HardenedBSD — sys/dev/bge if_bge.c

bge(4): disable MSI for BGE_ASICREV_BCM5784/BGE_CHIPREV_5784_AX
found in some MacBook Pro.

PR:                229727
Reported by:        Stephan Neuhaus <sten at artdecode.de> and others
Tested by:        Stephan Neuhaus <sten at artdecode.de>
Approved by:        mav (mentor)
MFC after:        1 month
Delta File
+8 -0 sys/dev/bge/if_bge.c
+8 -0 1 file

HardenedBSD — sys/arm64/arm64 pmap.c, sys/arm64/include pmap.h

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
Delta File
+69 -16 sys/arm64/arm64/pmap.c
+12 -6 sys/arm64/include/pmap.h
+81 -22 2 files

HardenedBSD — sbin/devd devd.conf.5

Consistently use full stops.

MFC after:        2 weeks
Sponsored by:        DARPA, AFRL
Delta File
+19 -19 sbin/devd/devd.conf.5
+19 -19 1 file

HardenedBSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs arc.c

Fix a couple of typos in r334844 noticed by Richard Kojedzinszky.

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

HardenedBSD — sys/sys event.h

    Make the definition of struct kevent in event.h match what the man page for kevent(2) 
    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
    Reviewed by:        kib (D15778: commented that this should be a separate commit)
    MFC after:        3 days
    Sponsored by:        Dell EMC
Delta File
+4 -4 sys/sys/event.h
+4 -4 1 file

HardenedBSD — share/mk bsd.sys.mk

Add a GCC 8.1 warning flag.

This is required to build ATF.

Sponsored by:        DARPA, AFRL
Delta File
+1 -0 share/mk/bsd.sys.mk
+1 -0 1 file

HardenedBSD — sys/arm/arm cpufunc_asm_armv7.S cpufunc_asm_armv6.S, sys/arm/include cpufunc.h

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

HardenedBSD — contrib/ofed/libibverbs/examples rc_pingpong.c srq_pingpong.c

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

HardenedBSD — contrib/ofed/libibumad sysfs.h sysfs.c

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

HardenedBSD — sys/dev/mlx5 doorbell.h mlx5_rdma_if.h, sys/dev/mlx5/mlx5_core mlx5_core.h mlx5_cq.c

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

HardenedBSD — sys/dev/mlx5 vport.h qp.h, sys/dev/mlx5/mlx5_core mlx5_vport.c

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

HardenedBSD — include unistd.h, lib/libc/gen setproctitle.c setproctitle.3

MFC r335939, r336088:
Add setproctitle_fast(3) for frequent callers.

HardenedBSD — . UPDATING

Retrospectively document SVN branch point for stable-10 and its releases.

This is a direct commit to stable/10 because the releases are taken
from the stable/10 branch.

Approved by:        jhb (mentor)
Differential Revision:        D16263
Delta File
+19 -0 1 file

HardenedBSD — sys/arm/include asm.h

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
Delta File
+1 -0 sys/arm/include/asm.h
+1 -0 1 file

HardenedBSD — sys/dev/ocs_fc ocs_cam.c ocs.h

    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

HardenedBSD — sys/crypto/aesni aesni.c

Remove unused variable

Reported by:        gcc
Delta File
+0 -2 sys/crypto/aesni/aesni.c
+0 -2 1 file

HardenedBSD — sys/crypto/aesni aesni.c

aesni(4): Add SHA2-224(-HMAC) support as well
Delta File
+32 -0 sys/crypto/aesni/aesni.c
+32 -0 1 file

HardenedBSD — sys/crypto/aesni aesni.c

aesni(4): Add sha256 plain hash support
Delta File
+6 -0 sys/crypto/aesni/aesni.c
+6 -0 1 file

HardenedBSD — sys/crypto/aesni aesni.c

aesni(4): Abstract out hash/HMAC support

No functional change.

Verified with cryptocheck.
Delta File
+49 -26 sys/crypto/aesni/aesni.c
+49 -26 1 file

HardenedBSD — sys/dev/glxsb glxsb.c glxsb.h

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
Delta File
+18 -91 sys/dev/glxsb/glxsb.c
+0 -3 sys/dev/glxsb/glxsb.h
+18 -94 2 files

HardenedBSD — sbin/dhclient dispatch.c

MFC r336195: unbreak dhclient(8) option 26 processing

  Make dhclient(8) verify if new MTU (option 26) differs from current one
  and skip unneeded MTU change. This check eliminates infinite loop
  of MTU change / link flap / lease verification / MTU change / link flap etc.
  in case of some NIC drivers like em(4) or igb(4).

PR:                229432
Approved by:        mav (mentor)
Delta File
+15 -3 sbin/dhclient/dispatch.c
+15 -3 1 file

HardenedBSD — stand/efi/libefi efi_console.c

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
Delta File
+6 -7 stand/efi/libefi/efi_console.c
+6 -7 1 file

HardenedBSD — sys/sparc64/include vmparam.h

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.
Delta File
+1 -1 sys/sparc64/include/vmparam.h
+1 -1 1 file

HardenedBSD — sys/sparc64/include vmparam.h


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.
Delta File
+3 -6 sys/sparc64/include/vmparam.h
+3 -6 1 file

HardenedBSD — sys/arm64/include vmparam.h, sys/riscv/include vmparam.h

Remove VM_FREELIST_ISADMA. It's not needed on these architectures.

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

HardenedBSD — sys/dev/hyperv/netvsc if_hn.c

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
Delta File
+7 -0 sys/dev/hyperv/netvsc/if_hn.c
+7 -0 1 file

HardenedBSD — stand/efi/libefi env.c

More typos

Noticed by: ian@
Delta File
+3 -3 stand/efi/libefi/env.c
+3 -3 1 file

HardenedBSD — stand/efi/libefi env.c

Fix typo in the command summary.

Of course, I can't get the command to work, but it's a start...
Delta File
+1 -1 stand/efi/libefi/env.c
+1 -1 1 file

HardenedBSD — sys/fs/nfs nfsport.h, sys/fs/nfsserver nfs_nfsdstate.c

MFC: r333645
End grace for the NFSv4 server if all mounts do ReclaimComplete.

The NFSv4 protocol requires that the server only allow reclaim of state
and not issue any new open/lock state for a grace period after booting.
The NFSv4.0 protocol required this grace period to be greater than the
lease duration (over 2minutes). For NFSv4.1, the client tells the server
that it has done reclaiming state by doing a ReclaimComplete operation.
If all NFSv4 clients are NFSv4.1, the grace period can end once all the
clients have done ReclaimComplete, shortening the time period considerably.
This patch does this. If there are any NFSv4.0 mounts, the grace period
will still be over 2minutes.
This change is only an optimization and does not affect correct operation.

HardenedBSD — usr.sbin/config mkmakefile.c

config(8): Invert checks; envmode/hintmode reflect "env provided"1
Delta File
+2 -2 usr.sbin/config/mkmakefile.c
+2 -2 1 file

HardenedBSD — tests/sys/audit process-control.c utils.c

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

HardenedBSD — sys/kern subr_prf.c

Add a FALLTHROUGH comment to kvprintf().

Submitted by:        Sebastian Huber <sebastian.huber at embedded-brains.de>
MFC after:        3 days
Delta File
+1 -0 sys/kern/subr_prf.c
+1 -0 1 file

HardenedBSD — usr.sbin/config main.c

Fix GCC 4.2 build after r336415, proper declaration and prototype
Delta File
+3 -2 usr.sbin/config/main.c
+3 -2 1 file

HardenedBSD — usr.sbin/config mkmakefile.c main.c

config(8): Add compatibility shims for r335998

Plumb the %VERSREQ from Makefile.<arch> through to the rest of config(8).
We've recorded the config(8) version that we're calling "the end of
envmode and hintmode," and we'll write them out for earlier versions. Later
kernel version bumps will remove envmode/hintmode from the kernel as needed,
which is OK since the current kernel does not use them at all.

These compatibility shims really need to go away when the major version
rolls over...

Discussed with:        imp

HardenedBSD — sys/conf Makefile.arm Makefile.arm64, usr.sbin/config configvers.h

Revert r336353 completely based on protest; compatibility shims incoming

HardenedBSD — lib/msun/src s_csqrtl.c s_csqrtf.c

Minor cleanups to csqrt*(), mostly in comments.

Remove the STDC CX_LIMITED_RANGE pragma and its verbose comment.  We still
don't have any C99 compilers (that support fenv pragmas), and if we did
then there are thousands of other places in libm that would need to use
them more than here.

The other cleanups are smaller.

HardenedBSD — sys/dev/mlx5/mlx5_en mlx5_en_rx.c

Use a mbuf header instead of a mbuf cluster for debugging interrupts in mlx5en(4).

MFC after:                1 week
Sponsored by:                Mellanox Technologies
Delta File
+4 -1 sys/dev/mlx5/mlx5_en/mlx5_en_rx.c
+4 -1 1 file

HardenedBSD — sys/dev/mlx5/mlx5_core mlx5_main.c

Add module parameter to limit number of MSIX EQ vectors in mlx5en(4).

For setups having a large amount of PCI devices, it makes sense to limit the
number of MSIX vectors per PCI device, in order to avoid running out of IRQ

MFC after:                1 week
Sponsored by:                Mellanox Technologies
Delta File
+11 -3 sys/dev/mlx5/mlx5_core/mlx5_main.c
+11 -3 1 file