Displaying 1 50 of 263,702 commits (0.038s)

HardenedBSD — share/man/man7 tuning.7

MFC r325215,r325216:

Update tuning(7) some more

At this point its unclear how much help tuning(7) is whatsoever
but leave it around in case someone decides to spend some time on
Delta File
+3 -46 share/man/man7/tuning.7
+3 -46 1 file

HardenedBSD — sys/dev/pci pcireg.h, usr.sbin/pciconf pciconf.c

MFC r315190:

Add constants and descriptions for some new PCI class definitions

HardenedBSD — usr.bin/uname uname.1

MFC r319274:

- Add a simple example to uname(1) manual page to show how the hardware
  platform (returned by -m) can be different from the machine's processor
  architecture (-p)
- Document that make(1) sets universal MACHINE and MACHINE_ARCH variables
  based on these values
Delta File
+24 -1 usr.bin/uname/uname.1
+24 -1 1 file

HardenedBSD — etc/mtree BSD.tests.dist, usr.bin/indent indent.c pr_comment.c

    indent(1): avoid calling write(2) with a negative second parameter.
    indent(1): Avoid out of bound access of array codebuf.
    indent(1): Avoid potential use-after-free.
    indent(1): Fix breakage caused by single comment following "else".
    indent(1) simply wasn't taught that "else" may be followed by a comment
    without any opening brace anywhere on the line, so it was very confused
    in such cases.
    indent(1): fix struct termination detection.
    indent(1): fix struct termination detection.
    indent(1): Removed whitespace shouldn't be considered in column calculations.
    indent(1): Support "f" and "F" floating constant suffixes.
    indent(1): Use NULL instead of zero for pointers.
    indent(1): Attempt to preserve some consistent style.
    indent(1): Yet more style issues.
    indent(1): Consistently indent declarations.
    indent(1): Bail out if there's no more space on the parser stack.
    indent(1): Remove dead code relating to unix-style comments.
    indent(1): Simplify pr_comment().
    indent(1): Fix wrapping of some lines in comments.
    indent(1): Untangle the connection between pr_comment.c and io.c.
    indent(1): Don't newline on cpp lines like #endif unless -bacc is on.
    indent(1): replace function call to bzero with memset.

    [23 lines not shown]

HardenedBSD — stand defs.mk

MFC: r331140

Merge ahead of schedule to fix pc98 build issues.
Delta File
+5 -5 stand/defs.mk
+5 -5 1 file

HardenedBSD — stand Makefile.pc98

Direct commit to stable

Remove libstand32 here. pc98 is a 32-bit platform, so it shouldn't compile
the extra 32-bit copy of libsa. The copy built in libstand is already 32-bit.
Add a comment saying we need an empty Makefile.pc98 since otherwise it would
pull in Makefile.i386 and there is no EFI on pc98, and the machines are too
old to have ZFS or GELI be a viable option (and besides, those don't compile).

Note: We also need r331140 to be MFC'd for pc98 build to work in all cases.
Delta File
+2 -1 stand/Makefile.pc98
+2 -1 1 file

HardenedBSD — sys/cddl/contrib/opensolaris/uts/common/dtrace dtrace.c

Fix an access of an uninitialized variable in dtrace_probe().

Reported by:        Coverity, via cem
MFC after:        3 days

HardenedBSD — sys/dev/flash mx25l.c

Bugfix: wait for writes/erases to complete after starting them, instead of
before starting them.

Using the wait-before logic would make sense if there was useful time-
consuming work that could be done between the end of one write and the
beginning of the next, but it also requires doing the wait-for-ready before
reading, because a prior write or erase could still be in progress.  Reading
is the far more common case, so adding a whole extra bus transaction to
check for ready before each read would soak up any small gains that might be
had from doing async writes.
Delta File
+2 -1 sys/dev/flash/mx25l.c
+2 -1 1 file

HardenedBSD — sys/vm vm_fault.c

Avoid dequeuing the fault page during a soft fault.

Such pages are re-enqueued at the end of the fault handler, preserving
LRU. Rather than performing two separate operations per fault, simply
requeue the page at the end of the fault (or bump its activation count
if it resides in PQ_ACTIVE, avoiding the page queue lock entirely).
This elides some page lock and page queue lock operations in common
cases, e.g., CoW faults.

Note that we must still dequeue the source page for "optimized" CoW
faults since the page may not remain enqueued while it is moved to
another object.

Reviewed by:        alc, kib
Tested by:        pho
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D14625
Delta File
+3 -5 sys/vm/vm_fault.c
+3 -5 1 file

HardenedBSD — sys/kern kern_sendfile.c vfs_bio.c, sys/vm vm_page.c vm_fault.c

Have vm_page_{deactivate,launder}() requeue already-queued pages.

In many cases the page is not enqueued so the change will have no
effect. However, the change is needed to support an optimization in
the fault handler and in some cases (sendfile, the buffer cache) it
was being emulated by the caller anyway.

Reviewed by:        alc
Tested by:        pho
MFC after:        2 weeks
X-Differential Revision: https://reviews.freebsd.org/D14625

HardenedBSD — sys/dev/flash mx25l.c

Eliminate some unneeded intermediate variables.  Eliminate some redundant
parens in shift-and-mask expressions.  Reword and reflow some comments.
Delta File
+36 -45 sys/dev/flash/mx25l.c
+36 -45 1 file

HardenedBSD — sys/vm vm_page.c

Have vm_page_replace() assert that the new page is not enqueued.

The new page does not belong to a VM object, but the page daemon does
not expect to encounter such pages.

Reviewed by:        alc, kib
Tested by:        pho
MFC after:        1 week
X-Differential Revision: https://reviews.freebsd.org/D14625
Delta File
+4 -2 sys/vm/vm_page.c
+4 -2 1 file

HardenedBSD — share/man/man7 development.7

Fix typo.

MFC after:        2 weeks
Delta File
+1 -1 share/man/man7/development.7
+1 -1 1 file

HardenedBSD — sys/dev/flash mx25l.c

Remove a pointless KASSERT and reword a comment a bit.  The KASSERT tested
for the same condition that the preceeding lines checked for and would have
returned EIO, so the assert could never possibly trigger (sc_sectorsize must
inherently be an integer multiple of FLASH_PAGE_SIZE).
Delta File
+2 -10 sys/dev/flash/mx25l.c
+2 -10 1 file

HardenedBSD — lib/libcasper/libcasper libcasper.3, lib/libcasper/services/cap_dns cap_dns.3

Fix similar typos to r331124.

HardenedBSD — lib/libcasper/services/cap_pwd cap_pwd.3

Fix typo.

Submitted by:        Trond Endrestøl <Trond.Endrestol at ximalas.info>

HardenedBSD — sys/dev/flash mx25l.c

Do not overwrite the contents of BIO_WRITE buffers.  SPI inherently
transfers data in both directions at once.  When writing to the device,
use a dummy buffer for the incoming data, not the same buffer as the
outgoing data.  Writes are done in FLASH_PAGE_SIZE chunks, which is only
256 bytes, so just put the dummy buffer into the softc.
Delta File
+2 -1 sys/dev/flash/mx25l.c
+2 -1 1 file

HardenedBSD — share/man/man7 development.7

Here's the new development(7), which removes information that's
no longer relevant (read: most of what was there) and adds some
quick links to point newcomers in the right direction.

Reviewed by:        imp@
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D14680
Delta File
+64 -414 share/man/man7/development.7
+64 -414 1 file

HardenedBSD — lib/libcasper/libcasper libcasper.3

Update libcasper references to all new man pages.
Remove obsolete example. All services has they own example.
This example also show old type of limiting method which is
not recommended to use.

Reviewed by:        bcr@
Differential Revision:        https://reviews.freebsd.org/D14607
Delta File
+9 -53 lib/libcasper/libcasper/libcasper.3
+9 -53 1 file

HardenedBSD — lib/libcasper/services/cap_sysctl cap_sysctl.3 Makefile

Document the sysctl Casper service.

PR:                226102
Reviewed by:        bcr@
Differential Revision:        https://reviews.freebsd.org/D14606

HardenedBSD — lib/libcasper/services/cap_pwd cap_pwd.3 Makefile

Document the pwd Casper service.

PR:                226102
Reviewed by:        bcr@
Differential Revision:        https://reviews.freebsd.org/D14605

HardenedBSD — sys/geom/label g_label.c

Remove unneeded variable which was introduced in r328472.

Pointed out by:        pjd@
Delta File
+1 -3 sys/geom/label/g_label.c
+1 -3 1 file

HardenedBSD — sys/net pfvar.h, sys/netpfil/pf pf.c

MFC r329950:

pf: Cope with overly large net.pf.states_hashsize

If the user configures a states_hashsize or source_nodes_hashsize value we may
not have enough memory to allocate this. This used to lock up pf, because these
allocations used M_WAITOK.

Cope with this by attempting the allocation with M_NOWAIT and falling back to
the default sizes (with M_WAITOK) if these fail.

PR:                209475
Submitted by:        Fehmi Noyan Isi <fnoyanisi AT yahoo.com>
Delta File
+32 -7 sys/netpfil/pf/pf.c
+1 -0 sys/net/pfvar.h
+33 -7 2 files

HardenedBSD — lib/libzstd Makefile, sys/contrib/zstd/lib/freebsd zstd_kfreebsd.c

lib(private)zstd: Fix riscv build

Link __bswap[ds]i2() intrinsics in to libzstd for riscv, where the C runtime
apparently lacks such intrinsics.

Broken in r330894.

Reported by:        asomers
Sponsored by:        Dell EMC Isilon

HardenedBSD — sys/dev/efidev efirt.c

MFC r330843:

efirtc: Pass a dummy tmcap pointer to efi_get_time_locked

As noted in the comment, UEFI spec claims the capabilities pointer is
optional, but some implementations will choke and attempt to dereference it
without checking. This specific problem was found on a Lenovo Thinkpad X220
that would panic in efirtc_identify.

Requested by:        kevans
Delta File
+8 -1 sys/dev/efidev/efirt.c
+8 -1 1 file

HardenedBSD — sbin/savecore savecore.8

Xr crashinfo(8) from savecore(8).

MFC after:        2 weeks
Delta File
+1 -0 sbin/savecore/savecore.8
+1 -0 1 file

HardenedBSD — sys/dev/virtio virtio.c virtqueue.c

MFC r327958, r329601, r329602:

Sync VirtIO IDs with Linux

Add VirtIO bus config_generation method

Add more virtqueue getter methods

HardenedBSD — share/man/man9 pci.9, sys/dev/pci pci.c vga_pci.c

MFC r329598:

Add PCI methods to iterate over the PCI capabilities

VirtIO V1 provides configuration in multiple VENDOR capabilities so this
allows all of the configuration to be discovered.

Reviewed by:        jhb
Differential Revision:        https://reviews.freebsd.org/D14325

HardenedBSD — sys/net80211 ieee80211_tdma.c

    Revert r330471 (MFC of r311861), since it results in compile errors
    sys/net80211/ieee80211_tdma.c:179: error: 'IEEE80211_MODE_VHT_2GHZ' undeclared (first 
use in this function)
    sys/net80211/ieee80211_tdma.c:180: error: 'IEEE80211_MODE_VHT_5GHZ' undeclared (first 
use in this function)
    The IEEE80211_MODE_VHT_2GHZ and IEEE80211_MODE_VHT_5GHZ enum values are
    defined in r310147, but that commit cannot be MFCd as-is, because it
    likely breaks ABI.
Delta File
+0 -2 sys/net80211/ieee80211_tdma.c
+0 -2 1 file

HardenedBSD — sys/net if_fddisubr.c

Repair obvious mismerge in r330897, resulting in misleading gcc error
messages like "sys/net/if_fddisubr.c:1: error: expected '=', ',', ';',
'asm' or '__attribute__' before '-' token".
Delta File
+1 -1 sys/net/if_fddisubr.c
+1 -1 1 file

HardenedBSD — sys/cam/scsi scsi_da.c

Only take out the periph lock when we're modifying the flags of the
softc for an async unit attention. CAM locks, sometimes, the periph
lock and other times does not. We were taking the lock always and
running into lock recursion issues on a non-recursive lock. Now we
take it selectively. It's not clear why xpt takes the lock selectively
before calling us, though, and that's still under investigation.

Reported by:        avg
PR:                226510 (same panic, differnt circumstances)
Sponsored by:        Netflix
Delta File
+6 -2 sys/cam/scsi/scsi_da.c
+6 -2 1 file

HardenedBSD — sys/modules/hyperv/vmbus Makefile

Move assym.s to DPSRCS in vmbus module

assym.s is only to be included by other .s files, and should not
actually be assembled by itself.
Delta File
+2 -2 sys/modules/hyperv/vmbus/Makefile
+2 -2 1 file

HardenedBSD — lib/libufs inode.c, sbin/dump traverse.c main.c

Revert r313780 (UFS_ prefix)
Delta File
+21 -21 sbin/fsck_ffs/suj.c
+18 -20 sys/fs/ext2fs/ext2_vnops.c
+18 -18 sbin/fsdb/fsdbutil.c
+17 -17 sys/ufs/ufs/dinode.h
+16 -17 sys/ufs/ufs/ufs_vnops.c
+16 -16 sys/fs/ext2fs/inode.h
+141 -145 29 files not shown
+247 -254 35 files

HardenedBSD — lib/libmd sha512.3, share/man/man9 zone.9 cnv.9

Fix formatting errors that resulted in apropos(1) output looking weird.

MFC after:        2 weeks

HardenedBSD — tools/tools README

MFC r328509:

tools: remove note about diffburst.

Said tool was removed in 1999 in r51579
Delta File
+0 -2 tools/tools/README
+0 -2 1 file

HardenedBSD — sys/dev/flash mx25l.c

MFC r317870:

[mx25l] add new device ids.
Delta File
+2 -0 sys/dev/flash/mx25l.c
+2 -0 1 file

HardenedBSD — sys/dev/ata/chipsets ata-micron.c

MFC r326387:

Fix typo
Delta File
+1 -1 sys/dev/ata/chipsets/ata-micron.c
+1 -1 1 file

HardenedBSD — usr.sbin/timed/timed extern.h slave.c

MFC r327941:

timed: slave is an infinite loop, mark it as such

HardenedBSD — share/man/man3 pthread_join.3

MFC r328831:

pthread: adding missing header to man page
Delta File
+2 -1 share/man/man3/pthread_join.3
+2 -1 1 file

HardenedBSD — usr.sbin/bsdinstall/scripts auto

MFC r328839:

Add the ThinkPad X1 (sandybridge) to the bsdinstall blacklist

Reviewed by:        AllanJude (for mfc)
Delta File
+1 -1 usr.sbin/bsdinstall/scripts/auto
+1 -1 1 file

HardenedBSD — lib/libc/sys fsync.2

MFC r328959:

fsync.2: Cross-reference fsync(1)
Delta File
+2 -1 lib/libc/sys/fsync.2
+2 -1 1 file

HardenedBSD — sbin/devd devd.cc

MFC r328430,r328431:

devd: minor nits

- mark usage as noreturn
Delta File
+1 -1 sbin/devd/devd.cc
+1 -1 1 file

HardenedBSD — share/examples/kld/cdev/module cdevmod.c cdev.c

MFC r328428:

example cdev: use make_dev_s

Make use of make_dev_s in the example cdev. While here, fix warnings.

HardenedBSD — bin/dd dd.c

MFC r328427:

dd(1): Use a local swapbytes() function.

swab(3) has restrict qualifiers for src and dst.
Avoid relying on undefined overlapping swab behavior.

Obtained From: OpenBSD
Delta File
+16 -1 bin/dd/dd.c
+16 -1 1 file

HardenedBSD — . .arclint

MFC r326959:

arc lint: ignore /tests/ in chmod

shell scripts in scripts don't need
to be chmod +x to work. In fact most are not.
Of the tests I found from a simple search:
65 are chmod +x
84 are chmod -x

simply disable the check for test shell scripts.
Delta File
+2 -1 .arclint
+2 -1 1 file

HardenedBSD — contrib/blacklist/bin blacklistd.c blacklistd.8, contrib/blacklist/libexec blacklistd-helper

Revert attempted MFC.  It included unwanted changes.

HardenedBSD — contrib/blacklist/bin blacklistd.c blacklistd.8, contrib/blacklist/libexec blacklistd-helper

MFC r328861: improve blacklist-helper shell script

HardenedBSD — contrib/elftoolchain/nm nm.c

elftoolchain nm(1): Initialize allocated memory before use

In out of memory scenarios (where one of these allocations failed but
other(s) did not), nm(1) could reference the uninitialized value of these
allocations (undefined behavior).

Always initialize any successful allocations as the most expedient
resolution of the issue.  However, I would encourage upstream elftoolchain
contributors to clean up the error path to just abort immediately, rather
than proceeding sloppily when one allocation fails.

Reported by:        Coverity
Sponsored by:        Dell EMC Isilon
Delta File
+6 -3 contrib/elftoolchain/nm/nm.c
+6 -3 1 file

HardenedBSD — sys/sys ioccom.h

Add _IOC_NEWLEN() and _IOC_NEWTYPE() macros.

These macros take an existing ioctl(2) command and replace the length
with the specified length or length of the specified type respectively.
These can be used to define commands for 32-bit compatibility with fewer
opportunities for cut-and-paste errors then a whole new definition.

Reviewed by:        cem, kib
Obtained from:        CheriBSD
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D14706
Delta File
+4 -0 sys/sys/ioccom.h
+4 -0 1 file

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

libdtrace: Fix another uninitialized dtt_flags UB

Like r331073, eliminate a UB by fully initializing the struct with a designated
initializer.  Note that the similar src_dtt is not fully used, so a similar
treatment was not absolutely required.  I chose to leave it alone.  It
wouldn't hurt to do the same thing, though.

Reported by:        Coverity
Sponsored by:        Dell EMC Isilon