Displaying 1 50 of 250,913 commits (0.024s)

HardenedBSD — sys/cddl/contrib/opensolaris/uts/common/dtrace dtrace_xoroshiro128_plus.c dtrace_xoroshiro128_plus.h, sys/cddl/contrib/opensolaris/uts/common/sys dtrace_impl.h

    MFC: 313176, 313177, 313359
    
    Replace the implementation of DTrace's RAND subroutine for generating
    low-quality random numbers with a modern implementation (xoroshiro128+)
    that is capable of generating better quality randomness without compromising 
performance.
    
    Submitted by:        Graeme Jenkinson

HardenedBSD — sbin/fsck fsck.8

MFC r306733

Add history section to fsck(8)

PR:                212472
Approved by:        bcr (mentor)
Differential Revision:        https://reviews.freebsd.org/D8104
Delta File
+13 -1 sbin/fsck/fsck.8
+13 -1 1 file

HardenedBSD — sbin/fsck fsck.8

MFC r266586

If called without -T or -t, fsck attempts to detect the
file system type.  If this fails, fsck will fail with
"unknown file system type" message.

PR:                188214
Delta File
+13 -1 sbin/fsck/fsck.8
+13 -1 1 file

HardenedBSD — sbin/setkey setkey.8

MFC r306616

setkey appeared in FreeBSD 4.0

PR:                212551
Approved by:        bcr (mentor)
Differential Revision:        https://reviews.freebsd.org/D8105
Delta File
+3 -1 sbin/setkey/setkey.8
+3 -1 1 file

HardenedBSD — sbin/shutdown shutdown.8

MFC r306617

shutdown appeared as a standalone utility in 4.1BSD.
http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html
http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html
PR:                212552
Approved by:        bcr (mentor)
Obtained from:        NetBSD
Differential Revision:        https://reviews.freebsd.org/D8105
Delta File
+6 -4 sbin/shutdown/shutdown.8
+6 -4 1 file

HardenedBSD — bin/dd dd.1

MFC r306715

Add history section for dd(1)
First version of UNIX to include dd found using TUHS
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c

PR:                211777
Approved by:        bcr (mentor)
Differential Revision:        https://reviews.freebsd.org/D8104
Delta File
+6 -1 bin/dd/dd.1
+6 -1 1 file

HardenedBSD — bin/dd dd.1

MFC r285645

Mention the dd-like recoverdisk(1) to help folks find this great BSD command.
Delta File
+1 -0 bin/dd/dd.1
+1 -0 1 file

HardenedBSD — bin/dd dd.1

MFC r270831

Update the date for last example.

Sponsored by: Netflix
Delta File
+1 -1 bin/dd/dd.1
+1 -1 1 file

HardenedBSD — bin/dd dd.1

MFC r270771
Add canonical population of a disk / thumb drive from an image example.
Delta File
+5 -0 bin/dd/dd.1
+5 -0 1 file

HardenedBSD — usr.sbin/makefs cd9660.c

MFC r309192

Fix null dereference when running out of nodes during rename.

PR:                212370
Submitted by:        Sascha Wildner <swildner AT gmail>
Reviewed by:        bcr (mentor)
Approved by:        bapt
Obtained from:        NetBSD
Differential Revision:        https://reviews.freebsd.org/D8643
Delta File
+1 -1 usr.sbin/makefs/cd9660.c
+1 -1 1 file

HardenedBSD — usr.bin/find find.1

MFC r312692

Improve wording when describing -mmin.

PR:                215922
Submitted by:        danielsh AT apache DOT org
Approved by:        bcr (mentor)
Differential Revision:        https://reviews.freebsd.org/D9313
Delta File
+2 -1 usr.bin/find/find.1
+2 -1 1 file

HardenedBSD — usr.bin/find find.1

MFC r281759

find.1: Add missing whitespace:

Obtained from:        Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc)
Delta File
+1 -1 usr.bin/find/find.1
+1 -1 1 file

HardenedBSD — usr.bin/systat systat.1

MFC r309552

Fix error in the example section
Adjust formatting highlighted by igor.

PR:                214683
Submitted by:        Anindya Mukherjee <anindya49 AT hotmail DOT com>
Reviewed by:        jilles
Approved by:        bcr (mentor)
Differential Revision:        https://reviews.freebsd.org/D8591
Delta File
+21 -1 usr.bin/systat/systat.1
+21 -1 1 file

HardenedBSD — usr.sbin/jail jaillex.l

MFC r316022,r316023:

  Fix hexadecimal escape codes in jail.conf(5).

PR:                218154
Submitted by:        Masahiro Konishi <mkonishi at sea.plala.or.jp>
Delta File
+2 -2 usr.sbin/jail/jaillex.l
+2 -2 1 file

HardenedBSD — usr.sbin/wpa/wpa_cli wpa_cli.8

MFC 312684

Extend manual to cover more commands and options.

PR:                203406
Submitted by:        Fehmi Noyan Isi (fnoyanisi AT yahoo DOT com)
Approved by:        wblock (mentor)
Differential Revision:         https://reviews.freebsd.org/D8691
Delta File
+122 -8 usr.sbin/wpa/wpa_cli/wpa_cli.8
+122 -8 1 file

HardenedBSD — usr.sbin/ppp ppp.8

MFC 315964
ftp.microsoft.com is dead and the document was not archived, point to the full
protocol spec document instead.
Fix spelling mistake flagged by igor.
Rephrase bad sentence flagged by igor.

Approved by:                 bcr (mentor)
Differential Revision:         https://reviews.freebsd.org/D10111
Delta File
+4 -4 usr.sbin/ppp/ppp.8
+4 -4 1 file

HardenedBSD — usr.sbin/rrenumd parser.y

rrenumd(8): Fix a trivial Coverity warning

Coverity warns that it is invalid to access following struct members by
accessing the current struct member pointer plus one.  Assuming the
compilers aren't abusing this kind of UB yet, this cleanup isn't a
functional change.

Reported by:        Coverity
CID:                1368713
Sponsored by:        Dell EMC Isilon
Delta File
+2 -2 usr.sbin/rrenumd/parser.y
+2 -2 1 file

HardenedBSD — usr.sbin/makefs cd9660.c makefs.h

makefs: sync with NetBSD

This is a collection of minor changes as diff reduction against NetBSD.

NetBSD revs:
cd9660.c                1.39
cd9660.h                1.19
makefs.c                1.34

Obtained from:        NetBSD
Sponsored by:        The FreeBSD Foundation

HardenedBSD — secure/usr.bin/openssl Makefile

HBSD: Disable cfi-icall for OpenSSL/LibreSSL

`openssl rsa -in somekey.pem` crashes due to cfi-icall when the key
material uses a non-default cipher (ie, is passworded).

Signed-off-by:        Shawn Webb <shawn.webb at hardenedbsd.org>
Sponsored-by:        SoldierX
Delta File
+2 -0 secure/usr.bin/openssl/Makefile
+2 -0 1 file

HardenedBSD — sbin/camcontrol camcontrol.c

MFC r315711: Fix printing bits above first eight.
Delta File
+4 -4 sbin/camcontrol/camcontrol.c
+4 -4 1 file

HardenedBSD — lib/libcam camlib.c

Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)

Part of my original reasoning as far as converting the snprintf
calls was to permit switching over from char[] to wchar_t[] in the
future, as well as futureproof in case cam_errbuf's size was ever
changed.

Unfortunately, my approach was bugged because it conflated the
number of items with the size of the buffer, instead of the number of
elements being a fixed size != 1 byte.

Use nitems(..) instead which counts the quantity of items of a specific
type, as opposed to an unqualified sizeof(..) (which assumes that the
number of characters is equal to the buffer size).

MFC after:        2 months
Noted by:        cem
Sponsored by:        Dell EMC Isilon
Delta File
+27 -27 lib/libcam/camlib.c
+27 -27 1 file

HardenedBSD — sys/boot/forth loader.conf

MFC r315738:

Document some more 10GbE+ network drivers in loader.conf

- if_cxgbe
- if_ixl
- if_ixlv
- sfxge
Delta File
+4 -0 sys/boot/forth/loader.conf
+4 -0 1 file

HardenedBSD — sys/kern kern_sysctl.c

MFC r315699:

Print out name of non-dynamic sysctl in sysctl_remove_oid_locked

This will provide a slightly better smoking gun than just stating
"can't remove non-dynamic nodes!" when calling sysctl_ctx_free(9)
and sysctl_remove_{name,oid}(9) with a non-dynamic (likely
static) sysctl.
Delta File
+2 -1 sys/kern/kern_sysctl.c
+2 -1 1 file

HardenedBSD — sys/dev/cxgbe t4_main.c, sys/dev/cxgbe/iw_cxgbe cm.c iw_cxgbe.h

MFC r315201, r315920, r315921, r315922, r316008, and r316062.

r315201:
cxgbe(4):  Fix an always-true assertion (reported by PVS-Studio).

sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)

r315920:
cxgbe/iw_cxgbe: c4iw_connect should always returns a -ve errno on failure.

r315921:

cxgbe/iw_cxgbe: alloc_ep expects a gfp_t, and it's always ok to sleep during
alloc_ep.

r315922:
cxgbe/iw_cxgbe: allocations that use GFP_KERNEL (which is M_WAITOK on
FreeBSD) cannot fail.

r316008:
cxgbe/iw_cxgbe: Remove unused code.

r316062:
cxgbe/iw_cxgbe: Defer the handling of error CQEs and RDMA_TERMINATE to
the thread that deals with socket state changes.  This eliminates
various bad races with the ithread.

HardenedBSD — sys/dev/cxgbe t4_main.c, sys/dev/cxgbe/iw_cxgbe cm.c iw_cxgbe.h

MFC r315201, r315920, r315921, r315922, r316008, and r316062.

r315201:
cxgbe(4):  Fix an always-true assertion (reported by PVS-Studio).

sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3)

r315920:
cxgbe/iw_cxgbe: c4iw_connect should always returns a -ve errno on failure.

r315921:

cxgbe/iw_cxgbe: alloc_ep expects a gfp_t, and it's always ok to sleep during
alloc_ep.

r315922:
cxgbe/iw_cxgbe: allocations that use GFP_KERNEL (which is M_WAITOK on
FreeBSD) cannot fail.

r316008:
cxgbe/iw_cxgbe: Remove unused code.

r316062:
cxgbe/iw_cxgbe: Defer the handling of error CQEs and RDMA_TERMINATE to
the thread that deals with socket state changes.  This eliminates
various bad races with the ithread.

HardenedBSD — etc ntp.conf

MFC r311103 (ian):

Update ntp.conf to use the ntpd pool feature.

Our previous ntp.conf file configured 3 servers from freebsd.pool.ntp.org
using 3 separate 'server' config lines.  That is now replaced with a single
'pool' line which causes ntpd to add multiple servers from the pool.

More than just making the config smaller, the pool feature in ntpd has one
major advantage over configuring 3 separate servers from a pool: if a server
that was added using a 'pool' statement provides bad time (initially or at
some later date), ntpd automatically discards it and configures a new
different server from the pool without needing to be restarted.

These changes also add a 'tos' line to control how many pool servers get
added, a 'restrict source' line that is required to allow ntpd to add new
peers from the pool, and it deletes a 'restrict 127.127.1.0' line that does
nothing and should never have been there (127.127.1.0 is not a valid IP
address, it's a refclock identifier).

Reviewed by:                cy
MFC requested by:        ache
Differential Revision:  https://reviews.freebsd.org/D9011
Delta File
+36 -16 etc/ntp.conf
+36 -16 1 file

HardenedBSD — share/man/man9 sleep.9, sys/kern subr_sleepqueue.c kern_umtx.c

MFC r315280 r315287

When the RTC is adjusted, reevaluate absolute sleep times based on the RTC

POSIX 2008 says this about clock_settime(2):

    If the value of the CLOCK_REALTIME clock is set via clock_settime(),
    the new value of the clock shall be used to determine the time
    of expiration for absolute time services based upon the
    CLOCK_REALTIME clock.  This applies to the time at which armed
    absolute timers expire.  If the absolute time requested at the
    invocation of such a time service is before the new value of
    the clock, the time service shall expire immediately as if the
    clock had reached the requested time normally.

    Setting the value of the CLOCK_REALTIME clock via clock_settime()
    shall have no effect on threads that are blocked waiting for
    a relative time service based upon this clock, including the
    nanosleep() function; nor on the expiration of relative timers
    based upon this clock.  Consequently, these time services shall
    expire when the requested relative interval elapses, independently
    of the new or old value of the clock.

When the real-time clock is adjusted, such as by clock_settime(3),
wake any threads sleeping until an absolute real-clock time.

    [18 lines not shown]

HardenedBSD — sys/boot/arm/uboot Makefile, sys/boot/efi/boot1 Makefile

self_reloc.c: Pass -Wno-error=maybe-uninitialized to gcc versions greater than 4.2.1

self_reloc.c doesn't initialize `rel` in all cases in the C code, however, the value
might be initialized properly on the stack in the assembly code.

For right now (because this doesn't seem to be breaking anything and my initializing
the stack value could break something since it's called from assembly code) disable
the warning for self_reloc.c. More investigation should be done to determine the
appropriate response to this warning (either intialize the value or find a smarter
way to deal with the warning).

A long MFC timeout is being set for this change to allow a better solution for the
issue to be developed in that time period.

MFC after:        2 months
Reported by:        Jenkins (FreeBSD-head-amd64-gcc job)
Tested with:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon

HardenedBSD — sys/dev/cxgbe/iw_cxgbe mem.c

cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be
registered in one ib_reg_phys_mr.
Delta File
+5 -2 sys/dev/cxgbe/iw_cxgbe/mem.c
+5 -2 1 file

HardenedBSD — sys/cam/ata ata_da.c

In r289137 the legacy_aliases compatibility shims for ata were removed,
also remove a leftover define used for implementing them.

Reviewed by:        mav
Differential Revision:        https://reviews.freebsd.org/D6726
Delta File
+0 -4 sys/cam/ata/ata_da.c
+0 -4 1 file

HardenedBSD — sys/dev/iwn if_iwn.c

iwn: remove unneeded cast.
Delta File
+4 -4 sys/dev/iwn/if_iwn.c
+4 -4 1 file

HardenedBSD — lib/libcam camlib.c

libcam: use __func__ instead of hardcoding the function name as `func_name`

MFC after:        3 days
Tested with:        `cam_device_copy(NULL, NULL)` // ;)..
Sponsored by:        Dell EMC Isilon
Delta File
+30 -36 lib/libcam/camlib.c
+30 -36 1 file

HardenedBSD — sys/dev/iwn if_iwn.c

iwn: drop duplicate synchronization requests.

Rx descriptor / payload is already synchronized in iwn_notif_intr()
(before accessing desc->type / desc->qid fields).

Tested with Intel 6205, STA mode.
Delta File
+12 -39 sys/dev/iwn/if_iwn.c
+12 -39 1 file

HardenedBSD — sys/dev/ichsmb ichsmb_pci.c

Remove #define PCIS_SERIALBUS_SMBUS_PROGIF, unused since r200091
Delta File
+0 -2 sys/dev/ichsmb/ichsmb_pci.c
+0 -2 1 file

HardenedBSD — sys/boot/common ls.c

loader: ls command should display file types properly

With some file system the ls is unable to display file types.

Reviewed by:        allanjude
Approved by:        allanjude (mentor)
Differential Revision:        https://reviews.freebsd.org/D10066
Delta File
+43 -18 sys/boot/common/ls.c
+43 -18 1 file

HardenedBSD — sys/boot/i386/libi386 time.c pxe.c

loader: move bios getsecs into time.c

Move the time related function into time.c, keep the same logic as libefi.

Reviewed by:        allanjude
Approved by:        allanjude (mentor)
Differential Revision:        https://reviews.freebsd.org/D10058

HardenedBSD — sys/boot/efi/boot1 Makefile

Use `-Wno-missing-declarations` with CWARNFLAGS for skein.c

`-Wno-missing-variable-declarations` is a clang-specific flag,
so gcc (not 4.2.1, in particular 6.3.0 in my case) dies when
it's passed the flag.

X-MFC with:        r304321
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+4 -0 sys/boot/efi/boot1/Makefile
+4 -0 1 file

HardenedBSD — sys/boot/efi/boot1 Makefile, sys/boot/i386/boot2 Makefile

Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead

This is a better pattern to follow when creating the bootloaders and doing
the relevant space checks to make sure that the sizes aren't exceeded (and
thus, copy-pasting is a bit less error prone).

MFC after:        3 days
Sponsored by:        Dell EMC Isilon

HardenedBSD — sys/boot/common ls.c

Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)`

This variable has been unused since its inception in r40106.

MFC after:        3 days
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+1 -2 sys/boot/common/ls.c
+1 -2 1 file

HardenedBSD — sys/boot/zfs zfsimpl.c

Remove redundant declaration for `zfs_crc64_table`

zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but
didn't use it.

This fixes a -Wredundant-decls warning.

MFC after:        3 days
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+0 -1 sys/boot/zfs/zfsimpl.c
+0 -1 1 file

HardenedBSD — sys/boot/zfs zfsimpl.c

Don't shadow read(2) definition with `read` argument in vdev_{create,probe}

This fixes several -Wshadow warnings introduced in r192194, but now errors
with gcc 6.3.0.

MFC after:        3 days
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+5 -5 sys/boot/zfs/zfsimpl.c
+5 -5 1 file

HardenedBSD — sbin/nvmecontrol wdc.c

Don't use K&R style prototypes; ANSIfy them

This fixes several -Wold-style-definition warnings.

X-MFC with:        313191
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+3 -3 sbin/nvmecontrol/wdc.c
+3 -3 1 file

HardenedBSD — sys/boot/i386/gptzfsboot Makefile

Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align in CFLAGS

MFC after:        3 days
Sponsored by:        Dell EMC Isilon
Delta File
+3 -1 sys/boot/i386/gptzfsboot/Makefile
+3 -1 1 file

HardenedBSD — sys/boot/efi/boot1 boot_module.h boot1.c

Remove redundant declarations

They're already defined in libstand.h

MFC after:        1 week
Reported by:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon

HardenedBSD — sys/boot/common part.c

Wrap bootcamp DEBUG statement with curly braces

This fixes a -Wempty-body warning with gcc 6.3.0 when PART_DEBUG is undefined.

MFC after:        3 days
Reported by:        Jenkins (FreeBSD-head-amd64-gcc job)
Tested with:        amd64-gcc-6.3.0 (devel/amd64-xtoolchain-gcc)
Sponsored by:        Dell EMC Isilon
Delta File
+2 -1 sys/boot/common/part.c
+2 -1 1 file

HardenedBSD — tools/build/mk OptionalObsoleteFiles.inc

HBSD: tools/build/mk/OptionalObsoleteFiles.inc add ntp docs

  - Add missing files installed in /usr/share/doc/ntp

See also:        https://bugs.freebsd.org/218193
Signed-off-by:        Bernard Spil <brnrd at FreeBSD.org>

HardenedBSD — contrib/ntp/libntp libssl_compat.c, tools/build/mk OptionalObsoleteFiles.inc

HBSD: Resolve merge conflict

Signed-off-by:        Shawn Webb <shawn.webb at hardenedbsd.org>
Sponsored-by:        SoldierX

HardenedBSD — bin/csh Makefile

HBSD: try to fix tcsh build error

X-MFC-with: ce47e1bdce4969404b7327fe9a6e983c25857f28
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+1 -0 bin/csh/Makefile
+1 -0 1 file

HardenedBSD — share/misc bsd-family-tree

DragonFly BSD 4.8.0 release added.
Delta File
+2 -0 share/misc/bsd-family-tree
+2 -0 1 file

HardenedBSD — lib/libcam camlib.c

Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls

Reindent snprintf calls' arguments to match style(9) guidelines with
respect to indentation.

MFC after:        3 days
Sponsored by:        Dell EMC Isilon
Delta File
+79 -80 lib/libcam/camlib.c
+79 -80 1 file