Displaying 1 50 of 260,839 commits (0.016s)

HardenedBSD — stand/common dev_net.c

net_parse_rootpath() has no parameters

Add void for parameter list.
Delta File
+1 -1 stand/common/dev_net.c
+1 -1 1 file

HardenedBSD — stand/efi/libefi efipart.c

loader.efi: efipart does not recognize partitionless disks

Rework the block device handle check to allow more robust device
classification. This is mostly usability issue - it can be quite confusing
for user when no disks are listed with lsdev.

Add more comments about what and why is done.

Reviewed by:        imp
Differential Revision:        https://reviews.freebsd.org/D13026
Delta File
+100 -11 stand/efi/libefi/efipart.c
+100 -11 1 file

HardenedBSD — share/man/man4 arcmsr.4, sys/dev/arcmsr arcmsr.c arcmsr.h

MFC r325532: Update arcmsr(4) to 1.40.00.01:

 - Fix clear doorbell queue buffer for ADAPTER_TYPE_B
 - Fix release memory resource when detach device
 - Add support for ARC-1216, 1226 SAS 12Gb controllers
 - Declare some functions as static
 - Change checking dword read/write for IOP rqbuffer.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

HardenedBSD — usr.bin/patch patch.c

patch(1): don't assume a match if we run out of context to check

Patches with very little context (-U0 and -U1) could get misapplied if
the file to be patched changes and a hunk is no longer applicable. Matching
with fuzz would be attempted and default to a match when we unexpectedly ran
out of context.

This also affected patches with higher levels of context but had limited
actual context due to the hunk being located near the beginning/end of file.

PR:                74127, 223545 (exp-run)
Reviewed by:        emaste, pfg
Approved by:        emaste (mentor)
Differential Revision:        https://reviews.freebsd.org/D12631
Delta File
+3 -0 usr.bin/patch/patch.c
+3 -0 1 file

HardenedBSD — sys/cddl/dev/profile profile.c

PowerPC has 12 artificial frames for the profiler

It may need to be different between AIM and Book-E, this was tested only on
Book-E (64- and 32-bit)

MFC after:        3 weeks
Delta File
+1 -1 sys/cddl/dev/profile/profile.c
+1 -1 1 file

HardenedBSD — usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: do not duplicate patchlist entries

PR:                221079
Submitted by:        Masachika ISHIZUKA
Submitted by:        ota at j.email.ne.jp
Reviewed by:        cperciva
MFC after:        1 week

HardenedBSD — sys/dev/bhnd bhnd.h bhnd_bus_if.m, sys/dev/bhnd/bhndb bhndb_subr.c bhndb.c

bhnd(4): Add support for querying DMA address translation parameters

BHND Wi-Fi chipsets and SoCs share a common DMA engine, operating within
backplane address space. To support host DMA on Wi-Fi chipsets, the bridge
core maps host address space onto the backplane; any host addresses must
be translated to their corresponding backplane address.


- Defines a new bhnd_get_dma_translation(9) API to support querying DMA
  address translation parameters from the bhnd(4) bus.
- Extends bhndb(4) to provide DMA translation descriptors from a DMA
  address translation table defined in the host bridge-specific
  bhndb_hwcfg.
- Defines bhndb(4) DMA address translation tables for all supported host
  bridge cores.
- Extends mips/broadcom's bhnd_nexus driver to return an identity (no-op)
  DMA translation descriptor; no translation is required when addressing
  the SoC backplane.

Approved by:        adrian (mentor)
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D12582

HardenedBSD — sys/dev/bhnd bhnd_bus_if.m bhnd.h, sys/dev/bhnd/bcma bcma_subr.c bcma.c

bhnd(4): implement MIPS and PCI(e) interrupt support

On BHND MIPS SoCs, this replaces the use of hard-coded MIPS IRQ#s in the
common bhnd(4) core drivers; we now register an INTRNG child PIC that
handles routing of backplane interrupt vectors via the MIPS core.

On BHND PCI devices, backplane interrupt vectors are now routed to the
PCI/PCIe host bridge core when bus_setup_intr() is called, where they are
dispatched by the PCI core via a host interrupt (e.g. INTx/MSI).

The bhndb(4) bridge driver tracks registered interrupt handlers for the
bridged bhnd(4) devices and manages backplane interrupt routing, while
delegating actual bus interrupt setup/teardown to the parent bus on behalf
of the bridged cores.

Approved by:        adrian (mentor, implicit)
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D12518

HardenedBSD — sys/contrib/cloudabi cloudabi_vdso_armv6_on_64bit.S cloudabi_vdso_armv6.S

Import the latest CloudABI definitions, v0.18.

In addition to some small style fixes to the ARMv6 vDSO, this release
includes a new vDSO that can be used for the execution of ARMv6/ARMv7
code on 64-bit platforms.

Just like for i686 on x86-64, this new vDSO is responsible for padding
arguments and return values to 64-bit values, so that the kernel can
easily forward system calls to the native system calls.

Obtained from:        https://github.com/NuxiNL/cloudabi

HardenedBSD — etc/periodic/daily 200.backup-passwd

filter all passwords (not only changed) from periodic passwd backup

The periodic 200.backup-passwd script outputs any differences it finds
in master.passwd, relative to the previous backup.  It intends to elide
the encrypted password field, but previously did so only for changed
lines (i.e., those beginning with - or + in the diff).

Apply the sed expression also to unchanged lines to also elide their
passwords.

PR:                223461
Reported by:        Andre Albsmeier
MFC after:        2 weeks
Sponsored by:        The FreeBSD Foundation

HardenedBSD — usr.bin/systat vmstat.c Makefile

systat: use and correctly display 64bit counters.

Following struct vmtotal changes, make systat use and correctly
display 64-bit counters.  Switch to humanize_number(3) to overcome
homegrown arithmetics limits in pretty printing large numbers.  Use
1024 as a divisor for memory fields to make it consistent with other
tools and users expectations.

Submitted by:        Pawel Biernacki <pawel.biernacki at gmail.com>
Sponsored by:        Mysterious Code Ltd.
PR:        2137
Differential revision:        https://reviews.freebsd.org/D13105
Delta File
+40 -20 usr.bin/systat/vmstat.c
+1 -1 usr.bin/systat/Makefile
+41 -21 2 files

HardenedBSD — stand Makefile.inc

Unbreak riscv build in universe.

riscv doesn't have -msoft-float. For the moment, just don't add
anything. There's no /boot/loader or other bootstrap contained in the
tree for riscv*. However, with real hardware coming next year, there
are plans for one, so keep building at least a minimal libsa and
ficl to prevent bitrot.

Sponsored by: Netflix
Delta File
+3 -1 stand/Makefile.inc
+3 -1 1 file

HardenedBSD — . Makefile

Use TARGET_ARCH=riscv64 when TARGET=riscv

The supported targets are riscv64 and riscv64sf. Use the former when
building with a bare TARGET=riscv and it is the more common one.

Sponsored by: Netflix
Delta File
+1 -1 Makefile
+1 -1 1 file

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

zfs_write: fix problem with writes appearing to succeed when over quota

The problem happens when the writes have offsets and sizes aligned with
a filesystem's recordsize (maximum block size).  In this scenario
dmu_tx_assign() would fail because of being over the quota, but the uio
would already be modified in the code path where we copy data from the
uio into a borrowed ARC buffer.  That makes an appearance of a partial
write, so zfs_write() would return success and the uio would be modified
consistently with writing a single block.

That bug can result in a data loss because the writes over the quota
would appear to succeed while the actual data is being discarded.

This commit fixes the bug by ensuring that the uio is not changed until
after all error checks are done.  To achieve that the code now uses
uiocopy() + uioskip() as in the original illumos design.  We can do that
now that uiocopy() has been updated in r326067 to use
vn_io_fault_uiomove().

Reported by:        mav
Analyzed by:        mav
Reviewed by:        mav
Pointyhat to:        avg (myself)
MFC after:        1 week
X-MFC after:        r326067
X-Erratum:        wanted

HardenedBSD — stand/i386/gptzfsboot Makefile, stand/i386/libi386 Makefile

Fix gptzfsboot for cases with GELI.

HAVE_GPT isn't currently a thing, but HAVE_GELI is. Replace the former
with the latter and remove util.o from the build list (it's picked up
from libsa/libsa32, and that's OK).

Sponsored by: Netflix

HardenedBSD — release/tools ec2.conf gce.conf

Remove /etc/resolv.conf from virtual machine images, which is
copied from the build host.  It is renamed to /etc/resolv.conf.bak
on boot, so never used anyway.

Noticed by:        peter
MFC after:        3 days
Sponsored by:        The FreeBSD Foundation

HardenedBSD — sys/cddl/compat/opensolaris/kern opensolaris_uio.c

make illumos uiocopy use vn_io_fault_uiomove

uiocopy() is currently unused, its purpose is copy data from a uio
without modifying the uio.  It was in use before the vn_io_fault support
was added to ZFS, at which point our code diverged from the illumos code
a little bit.  Because ZFS is the only (potential) user of the function
we are free to modify it to better suit ZFS needs.

The intention behind this change is to remove the differences introduced
earlier in zfs_write().

While here, re-implement uioskip() using uiomove() with
uio_segflg == UIO_NOCOPY.
The story of uioskip is the same as with uiocopy.

Reviewed by:        mav
MFC after:        1 week

HardenedBSD — sys/arm64/conf GENERIC, sys/conf files

Add a driver for the EFI RTC. This uses the EFI Runtime Services to query
the system time.

As we seem to only read this time on boot, and this is the only source of
time on many arm64 machines we need to enable this by default there. As
this is not always the case with U-Boot firmware, or when we have been
booted from a non-UEFI environment we only enable the device driver when
the Runtime Services are present and reading the time doesn't result in an
error.

PR:                212185
Reviewed by:        imp, kib
Tested by:        emaste
Relnotes:        yes
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D12650

HardenedBSD — sys/cam cam.c

Fix uninitialized variable from 326034

Reported by:        Coverity
CID:                1382887
MFC after:        20 days
X-MFC-With:        326034
Sponsored by:        Spectra Logic Corp
Delta File
+2 -1 sys/cam/cam.c
+2 -1 1 file

HardenedBSD — lib/libproc proc_sym.c, lib/libproc/tests proc_test.c target_prog.c

Refine symtab sorting in libproc.

Add some rules to more closely match what illumos does when an address
resolves to multiple symbols:
- prefer non-local symbols
- prefer symbols with fewer leading underscores and no leading '$'

Add some regression tests to verify these rules.

HardenedBSD — cddl/usr.sbin/dtrace/tests/tools exclude.sh

Annotate usdt/tst.eliminate.ksh as EXFAIL.

It appears to depend on some behaviour specific to the Sun link editor.

MFC after:        1 week

HardenedBSD — sys/dev/vnic nicvf_queues.c

MFC r325813 (bz): Unbreak IPv6.

No longer return ENXIO when trying to send an IPv6 packet in
nicvf_sq_add_hdr_subdesc().
Restructure the code so that the upper layer protocol parts are
agnostic of the L3 protocol (and no longer specific to IPv4).
With this basic IPv6 packets go through.  We are still seeing
weird behaviour which needs further diagnosis.

PR:                223669
Delta File
+71 -62 sys/dev/vnic/nicvf_queues.c
+71 -62 1 file

HardenedBSD — sys/dev/vnic nicvf_main.c

MFC r325811: vnic: report that the driver supports multicast

The driver is currently hardcoded to force promiscuous mode, so all of
the MAC filtering code is presently unused and multicast should "just
work."  Report to the higher layers that multicast is supported.

PR:                223573
Reported by:        bz
Sponsored by:        The FreeBSD Foundation
Delta File
+1 -1 sys/dev/vnic/nicvf_main.c
+1 -1 1 file

HardenedBSD — sys/ofed/include/linux device.h

MFC r299674 and r299931:
Handle case of class being set, but not parent when calling
device_register() in the LinuxKPI.

Requested by:        Chelsio
Sponsored by:        Mellanox Technologies
Delta File
+9 -5 sys/ofed/include/linux/device.h
+9 -5 1 file

HardenedBSD — usr.bin/gzip gzip.c gzip.1

Support SIGINFO.

Obtained from:        NetBSD
MFC after:        2 weeks

HardenedBSD — usr.sbin/efidp efidp.c

This program is more useful if it skips leading whitespace when
parsing a textual UEFI Device Path, since otherwise it things the
passed in path is a filename. While here, reduce the repetition of
8192.

Sponsored by: Netflix
Delta File
+11 -4 usr.sbin/efidp/efidp.c
+11 -4 1 file

HardenedBSD — usr.sbin/efidp efidp.8

Document what the command line arguments actually do. List some of the
size limitations.

Sponsored by: Netflix
Delta File
+23 -4 usr.sbin/efidp/efidp.8
+23 -4 1 file

HardenedBSD — sys/geom/part g_part_mbr.c

While the EFI spec allows numbers to be in many forms, libefivar
produces hex numbers for the dsn. Since that come is from EDK2, change
this for symmetry, by generating the dsn as a hex number.

Noticed by: gpart list | grep efimedia | awk -F: '{print $2;}' | \
        sed -e 's/^ *//g;s/,,/,/' | grep MBR | efidp -p | efidp -f
Sponsored by: Netflix
Delta File
+1 -1 sys/geom/part/g_part_mbr.c
+1 -1 1 file

HardenedBSD — sys/geom/part g_part_ebr.c g_part_gpt.c

Remove trailing whitespace (one I just introduced and a bunch of
others in the same directory).

Sponsored by: Netflix

HardenedBSD — sys/geom/part g_part_mbr.c

Implement efi media tagging for MBR partitioning types.

Sponsored by: Netflix
Delta File
+9 -1 sys/geom/part/g_part_mbr.c
+9 -1 1 file

HardenedBSD — cddl/contrib/opensolaris/lib/libdtrace/common dt_link.c

dt_modtext: return error on archs lacking an implementation

Reported by:        mmel
Reviewed by:        markj
MFC after:        1 week
MFC with:        r325042
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D13176

HardenedBSD — sys/powerpc/booke pmap.c

Check the page table before TLB1 in pmap_kextract()

The vast majority of pmap_kextract() calls are looking for a physical memory
address, not a device address.  By checking the page table first this saves
the formerly inevitable 64 (on e500mc and derivatives) iteration loop
through TLB1 in the most common cases.

Benchmarking this on the P5020 (e5500 core) yields a 300% throughput
improvement on dtsec(4) (115Mbit/s -> 460Mbit/s) measured with iperf.

Benchmarked on the P1022 (e500v2 core, 16 TLB1 entries) yields a 50%
throughput improvement on tsec(4) (~93Mbit/s -> 165Mbit/s) measured with
iperf.

MFC after:        1 week
Relnotes:        Maybe (significant performance improvement)
Delta File
+13 -8 sys/powerpc/booke/pmap.c
+13 -8 1 file

HardenedBSD — lib/libsysdecode flags.c sysdecode_enum.3, usr.bin/kdump kdump.c

MFC 319493,319509,319520,319595,319677,319679-319681,319688,319689,
319761-319768,320010,322899,322959,323020,323021,323151:

Sync libsysdecode, kdump, and truss with head (aside from changes such
as ino64 that are not applicable to 11).

319493:
Decode the arguments passed to __cap_rights_get() and cap_rights_limit().

319509:
Decode the argument passed to cap_getmode().

The returned integer value is output.

319520:
Decode the 'who' argument passed to getrusage().

Add a new sysdecode_getrusage_who() which decodes the RUSAGE_* constant
passed as the first argument to getrusage().  Use this function in both
kdump and truss to decode the first argument to getrusage().

319595:
Decode arguments to dup, dup2, getdirentries, pread, and pwrite.

- dup and dup2 print fd arguments in decimal.

    [105 lines not shown]

HardenedBSD — share/mk bsd.cpu.mk

Add -mno-avx2 for clang as well as -mno-avx. We don't want either of
them when asking for no SIMD.

Reviewed by: emaste@
Sponsored by: Netflix
Delta File
+1 -1 share/mk/bsd.cpu.mk
+1 -1 1 file

HardenedBSD — sys/cam/scsi scsi_da.c

da(4): Short-circuit unnecessary BIO_FLUSH commands

sys/cam/scsi/scsi_da.c
        Complete BIO_FLUSH commands immediately if the da(4) device hasn't
        been written to since the last flush. If we haven't written to the
        device, there is no reason to send a flush.

Submitted by:        gibbs
Reviewed by:        imp
MFC after:        3 weeks
Sponsored by:        Spectra Logic Corp
Differential Revision:        https://reviews.freebsd.org/D13106
Delta File
+21 -0 sys/cam/scsi/scsi_da.c
+21 -0 1 file

HardenedBSD — sys/mips/beri beri_machdep.c

Remove a couple variables that are unused after r325790.

Reported by:        rpokala
Delta File
+0 -2 sys/mips/beri/beri_machdep.c
+0 -2 1 file

HardenedBSD — lib/libcam/tests cam_test.c libcam_test.c, sys/cam cam.c

Fix multiple bugs in cam_strmatch

* Wrongly matches strings that are shorter than the pattern
* Fails to match negative character sets
* Fails to match character sets that aren't at the end of the pattern
* Fails to match character ranges

Reviewed by:        imp
MFC after:        3 weeks
Sponsored by:        Spectra Logic Corp
Differential Revision:        https://reviews.freebsd.org/D13173

HardenedBSD — sys/net iflib.c

Fix off-by-one error in bit_nclear() usage

bit_nclear() takes the bit numbers for the start and end bits, not the start
and a count.  This was resulting in memory corruption past the end of the
bitstr_t.

Sponsored by:        Limelight Networks
Delta File
+1 -1 sys/net/iflib.c
+1 -1 1 file

HardenedBSD — sbin/camcontrol camcontrol.c

Print ZAC device type in "camcontrol identify" output

ZAC (Zoned-device ATA Command set) is the standard for addressing SMR
(shingled magnetic recording) devices over SATA.  Drives indicate their
support for ZAC in their IDENTIFY block. Print whether and how a drive
supports ZAC in the output of "camcontrol identify".

Reviewed by:        ken, imp
MFC after:        3 weeks
Sponsored by:        Spectra Logic Corp
Differential Revision:        https://reviews.freebsd.org/D13171
Delta File
+12 -0 sbin/camcontrol/camcontrol.c
+12 -0 1 file

HardenedBSD — sys/fs/msdosfs msdosfs_vnops.c

msdosfs(5): Reflect READONLY attribute in file mode

Msdosfs allows setting READONLY by clearing the owner write bit of the file
mode.  (While here, correct the misspelling of S_IWUSR as VWRITE.  No
functional change.)

In msdosfs_getattr, intuitively reflect that READONLY attribute to userspace
in the file mode.

Reported by:        Karl Denninger <karl AT denninger.net>
Sponsored by:        Dell EMC Isilon
Delta File
+3 -1 sys/fs/msdosfs/msdosfs_vnops.c
+3 -1 1 file

HardenedBSD — lib Makefile, usr.bin Makefile

Install strings unconditionally

Previously it was enabled by WITH_/WITHOUT_TOOLCHAIN, but it is commonly
expected to be available and may have non-toolchain consumers.  As it
is now taken from the BSD-licensed ELF Tool Chain project, just install
it unconditionally.

PR:                213665, 223725
Reviewed by:        bdrewery
MFC after:        1 month
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D8398
Delta File
+2 -1 lib/Makefile
+1 -1 usr.bin/Makefile
+3 -2 2 files

HardenedBSD — sys/kern vfs_bio.c

Update a comment in brelse() to match reality.
Delta File
+12 -3 sys/kern/vfs_bio.c
+12 -3 1 file

HardenedBSD — lib/libc/iconv citrus_none.c

iconv: Fix a pointer mismatch.

Catch NULL pointer earlier, check for empty string later.
Apparently this fixes a GCC8 warning.

Obtained from:        NetBSD (CVS Rev. 1.21, 1.22) through DragonFlyBSD
MFC after:        1 week
Delta File
+2 -2 lib/libc/iconv/citrus_none.c
+2 -2 1 file

HardenedBSD — include/arpa tftp.h, sys/arm/xscale/ixp425 if_npereg.h

Indent protection and some other oops from the prvious commits.

HardenedBSD — sys/dev/cxgbe t4_main.c

cxgbe(4): Add a custom board to the device id list.

MFC after:        1 week
Sponsored by:        Chelsio Communications
Delta File
+1 -0 sys/dev/cxgbe/t4_main.c
+1 -0 1 file

HardenedBSD — bin/cat cat.c, bin/chflags chflags.c

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

HardenedBSD — include glob.h resolv.h, include/arpa nameser_compat.h ftp.h

include: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Delta File
+4 -1 include/arpa/nameser_compat.h
+3 -1 include/glob.h
+3 -1 include/resolv.h
+3 -1 include/arpa/ftp.h
+3 -1 include/ctype.h
+3 -1 include/locale.h
+162 -18 72 files not shown
+181 -24 78 files

HardenedBSD — sys/amd64/amd64 bpf_jit_machdep.c bpf_jit_machdep.h, sys/amd64/ia32 ia32_signal.c

sys: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

HardenedBSD — sys/dev/bce if_bce.c if_bcefw.h, sys/dev/bwi bwiphy.h bwirf.c

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Delta File
+3 -1 sys/dev/mpt/mpilib/mpi_type.h
+3 -1 sys/dev/bwi/bwiphy.h
+3 -1 sys/dev/bwi/bwirf.c
+3 -1 sys/dev/bwi/bwirf.h
+3 -1 sys/dev/bwi/if_bwi.c
+3 -1 sys/dev/bwi/if_bwireg.h
+421 -13 238 files not shown
+439 -19 244 files

HardenedBSD — sys/dev/evdev evdev_utils.c

evdev: change USB scancode 0x54 from KEY_SLASH to KEY_KPSLASH

Submitted by:                dumbbell
Reviewed by:                gonzo, wulf
Approved by:                gonzo (mentor)
MFC after:                2 weeks
Differential Revision:        https://reviews.freebsd.org/D12983
Delta File
+1 -1 sys/dev/evdev/evdev_utils.c
+1 -1 1 file