Displaying 1 50 of 256,323 commits (0.025s)

HardenedBSD — usr.sbin/mountd mountd.c

mountd: Replace malloc+strcpy to strdup

Reviewed by:        bapt
MFC after:        1 week
Sponsored by:        Gandi.net
Differential Revision:        https://reviews.freebsd.org/D12503
Delta File
+7 -9 usr.sbin/mountd/mountd.c
+7 -9 1 file

HardenedBSD — lib/msun Makefile Symbol.map, lib/msun/amd64 e_fmod.S e_fmodl.S

Synchronize most of libm with head as of r323004.  This excludes a few
arch-specific updates for powerpcspe, mips and riscv, for which support
has not been merged yet.

Bump __FreeBSD_version for the addition of cacoshl, cacosl, casinhl,
casinl, catanl, catanhl, sincos, sincosf, and sincosl.

MFC r305382 (by bde):

  Add asm versions of fmod(), fmodf() and fmodl() on amd64.  Add asm
  versions of fmodf() amd fmodl() on i387.

  fmod is similar to remainder, and the C versions are 3 to 9 times
  slower than the asm versions on x86 for both, but we had the strange
  mixture of all 6 variants of remainder in asm and only 1 of 6
  variants of fmod in asm.

MFC r305384 (by bde):

  Disconnect the "optimized" asm variants of cos(), sin() and tan() from
  the build on i386.  Leave them in the source tree for regression tests.

  The asm functions were always much less accurate (by a factor of more
  than 10**18 in the worst case).  They were faster on old CPUs.  But
  with each new generation of CPUs they get relatively slower.  The

    [216 lines not shown]
Delta File
+258 -258 lib/msun/ld80/s_logl.c
+417 -0 lib/msun/src/catrigl.c
+128 -128 lib/msun/ld80/k_expl.h
+134 -0 lib/msun/src/k_sincosl.h
+126 -0 lib/msun/src/s_sincosf.c
+105 -0 lib/msun/src/s_sincosl.c
+601 -63 32 files not shown
+1,769 -449 38 files

HardenedBSD — sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_acl.c zfs_znode.c, sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys zfs_znode.h

MFC r323479,r323491: zfs: tighten debug versions of ZTOV and VTOZ

Sponsored by:        Panzura

HardenedBSD — sys/opencrypto crypto.c, tests/sys/opencrypto cryptotest.py

crypto(9): Use a more specific error code when a capable driver is not found

When crypto_newsession() is given a request for an unsupported capability,
raise a more specific error than EINVAL.

This allows cryptotest.py to skip some HMAC tests that a driver does not
support.

Reviewed by:        jhb, rlibby
Sponsored by:        Dell EMC Isilon
Differential Revision:        https://reviews.freebsd.org/D12451

HardenedBSD — contrib/gcc/config/arm unwind-arm.c

Fix the return value from _Unwind_Backtrace() on arm.

If unwinding stops due to hitting the end of the call chain, the return
value is supposed to be _URC_END_OF_STACK; other values indicate internal
errors.  The return value from get_eit_entry() is now returned without
translating it to _URC_FAILURE, so that callers can see _URC_END_OF_STACK
when it happens.

HardenedBSD — contrib/gcc/config/arm unwind-arm.c

Fix handling of uncaught exceptions in a std::terminate() handler on arm.

When raising an exception, the unwinder searches for a catch handler and if
none is found it should invoke std::terminate() with the uncaught exception
as the "current" exception.  Before this change, the terminate handler was
invoked with no exception as current (abi::__cxa_current_exception_type()
returned NULL), because the return value from the unwinder indicated an
internal failure in unwinding.  It turns out that was because all errors
from get_eit_entry() were translated to _URC_FAILURE.  Now the error is
returned untranslated, which allows _URC_END_OF_STACK to percolate upwards
to throw_exception() in libcxxrt.  When it sees that return status it
properly calls std::terminate() with the uncaught exception installed
as the current exception, allowing custom terminate handlers to work
with it.

HardenedBSD — . ObsoleteFiles.inc, etc/mtree BSD.usr.dist

Remove the cat pages directory now that catman(1) is gone
Delta File
+4 -142 etc/mtree/BSD.usr.dist
+75 -0 ObsoleteFiles.inc
+79 -142 2 files

HardenedBSD — cddl/usr.sbin/zfsd zfsd_event.cc

Close a memory leak when using zpool_read_all_labels

MFC after:        3 weeks
X-MFC-With:        322854
Sponsored by:        Spectra Logic Corp
Delta File
+5 -2 cddl/usr.sbin/zfsd/zfsd_event.cc
+5 -2 1 file

HardenedBSD — sys/kern sys_process.c

Log signal number passed to PT_STEP requests in KTR_PTRACE traces.

MFC after:        1 week
Delta File
+2 -2 sys/kern/sys_process.c
+2 -2 1 file

HardenedBSD — sys/fs/tmpfs tmpfs_fifoops.c tmpfs_vnops.c

Use tmpfs_print for tmpfs FIFOs.

Reviewed by:        kib (part of a larger patch)

HardenedBSD — libexec/getty gettytab.5 main.c

MFC r323252:

Add a new getty/gettytab capability to generate an initial message dynamically.

This modification adds a new gettytab(5) option (iM) to specify a
program to run that will generate the initial (banner) message that is
displayed before the login prompt. Such a capability is useful when
dynamic information is needed in the banner message that cannot be
supplied by the set of % substitution sequences available in the "im"
option.

Sponsored by:        Dell EMC

HardenedBSD — libexec/getty gettytab.5

MFC r317801 (by trasz):

Fix markup in gettytab(5).

Approved by:        vangyzen (mentor)
Sponsored by:        Dell EMC
Delta File
+36 -36 libexec/getty/gettytab.5
+36 -36 1 file

HardenedBSD — sys/cam/scsi scsi_all.c

MFC:        r323840

Remove an ancient comment about the existence of READ(16)/WRITE(16) for MMC.
Delta File
+0 -4 sys/cam/scsi/scsi_all.c
+0 -4 1 file

HardenedBSD — sys/cddl/compat/opensolaris/sys kcondvar.h, sys/cddl/contrib/opensolaris/uts/common/fs/zfs dmu_tx.c

Use nstosbt() instead of multiplying by SBT_1NS to avoid roundoff errors.

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

HardenedBSD — sys/dev/neta if_mvneta.c

Fix gcc compilation issues in the mvneta driver

Compiling mvneta driver with gcc unveiled two issues, that
required fixing.

Reported by: andrew
Obtained from: Semihalf
Delta File
+13 -12 sys/dev/neta/if_mvneta.c
+13 -12 1 file

HardenedBSD — sys/vm vm_page.c

Change vm_page_try_to_free() to require a managed page.  Essentially,
vm_page_try_to_free() is testing conditions, like clean versus dirty,
that only vary in managed pages.

Suggested by:        kib
Reviewed by:        markj
X-MFC after:        never
Delta File
+8 -7 sys/vm/vm_page.c
+8 -7 1 file

HardenedBSD — sys/contrib/vchiq/interface/vchiq_arm vchiq_2835_arm.c

Modernize the use of vm_page_unwire().  Since r288122, vm_page_unwire()
has returned TRUE when the wire count transitions to zero, eliminating
the need for callers to inspect the page's wire count.

MFC after:        1 week

HardenedBSD — sys/compat/linux linux_stats.c

Small style(9) issue: spaces vs TAB.
Delta File
+1 -1 sys/compat/linux/linux_stats.c
+1 -1 1 file

HardenedBSD — sys/fs/nfsserver nfs_nfsdserv.c

Change a panic to an error return.

There was a panic() in the NFS server's write operation that didn't
need to be a panic() and could just be an error return.
This patch makes that change.
Found by code inspection during development of the pNFS service.

MFC after:        2 weeks
Delta File
+1 -1 sys/fs/nfsserver/nfs_nfsdserv.c
+1 -1 1 file

HardenedBSD — sys/geom geom_subr.c

g_resize_provider_event: Do not invoke orphan method twice

Like r266444, g_resize_provider_event can attempt to orphan an already
orphaned geom_dev consumer.  This will cause a panic in g_dev_orphan.  Apply
the same fix as was applied to g_orphan_register.

Reviewed by:        ae
Sponsored by:        Dell EMC Isilon
Differential Revision:        https://reviews.freebsd.org/D12469
Delta File
+8 -0 sys/geom/geom_subr.c
+8 -0 1 file

HardenedBSD — sys/fs/nfsclient nfs_clcomsubs.c

Remove 0 filling from nfsm_uiombuflist().

nfsm_uiombuflist() zero filled the mbuf list to a multiple of 4bytes
as required for XDR. Unfortunately that modified an mbuf list after
it was m_copym()'d and was broken. This patch removes the zero filling code.
Since nfsm_uiombuflist() is not yet used in head/current, this has no
effect on users.
The function will be used by a future commit of code that adds Flex
File Layout support.
Delta File
+2 -14 sys/fs/nfsclient/nfs_clcomsubs.c
+2 -14 1 file

HardenedBSD — sys/kern subr_witness.c

HBSD: Fix kernel compilation after 795d0e91a564

Conrad's work shuffled things around. HardenedBSD's code to harden the
debug.witness.badstacks sysctl node needs to account for those changes.

Signed-off-by:        Shawn Webb <shawn.webb at hardenedbsd.org>
Sponsored-by:        SoldierX
Delta File
+6 -6 sys/kern/subr_witness.c
+6 -6 1 file

HardenedBSD — usr.bin/calendar/calendars calendar.freebsd

Add myself to the calendar.freebsd

Reviewed by:    pfg (mentor)
Approved by:    pfg (mentor)

HardenedBSD — tools/tools/nanobsd defaults.sh

Fix packages with interactive post install scripts.

Tell pkg(8) we're running non-interactively so packages that with
interactive post install scripts don't hang.

Submitted by: Guido van Rooij
Delta File
+1 -1 tools/tools/nanobsd/defaults.sh
+1 -1 1 file

HardenedBSD — sys/arm/conf VIRT

Remove the VIRT kernel config, it's now useable through GENERIC.

Sponsored by:        DARPA, AFRL
Delta File
+0 -59 sys/arm/conf/VIRT
+0 -59 1 file

HardenedBSD — share/man/man4 mpr.4 mps.4, sys/dev/mpr mpr.c

Add the ability to report and set debug flags as text strings instead of
just integer flags.  Report both for convenience.

Submitted by:        Eygene Ryabinkin (manpage)
Sponsored by:        Netflix
Delta File
+112 -6 sys/dev/mpr/mpr.c
+112 -6 sys/dev/mps/mps.c
+34 -24 share/man/man4/mpr.4
+34 -24 share/man/man4/mps.4
+292 -60 4 files

HardenedBSD — sys/powerpc/aim mmu_oea.c mmu_oea64.c

MFC r323676:
Implement mmu_page_init for AIM platforms.

HardenedBSD — sys/arm/conf GENERIC, sys/arm/freescale/imx files.imx6

Add i.MX6 and Xilinx to GENERIC.

Merge in the missing devices from the IMX6 and ZEDBOARD kernel configs. The
Freescale sdma device has been renamed to fslsdma to mark it as a platform
specific driver.

Reviewed by:        ian
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D11564

HardenedBSD — sys/arm/broadcom/bcm2835 bcm2835_sdhci.c, sys/arm/ti ti_sdhci.c

Rename sdhci_cam_start_slot() into sdhci_start_slot()

This change allows to just call sdhci_start_slot() in SDHCI drivers
and not to think about which stack handles the operation.

As a side effect, this will also fix MMCCAM with sdhci_acpi driver.

Approved by:        imp (mentor)
Differential Revision:        https://reviews.freebsd.org/D12471

HardenedBSD — contrib/one-true-awk lib.c

Don't display empty error context.

Context extraction didn't handle this case and showed uninitialized memory.

Obtained from: OpenBSD lib.c 1.21
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
Delta File
+1 -1 contrib/one-true-awk/lib.c
+1 -1 1 file

HardenedBSD — contrib/one-true-awk run.c

Fix %c for floating values that become 0 when coerced to int.

Obtained from: OpenBSD run.c 1.36 (From Jeremy Devenport)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
Delta File
+1 -1 contrib/one-true-awk/run.c
+1 -1 1 file

HardenedBSD — contrib/one-true-awk lib.c

Fix uninitialized variable

echo | awk 'BEGIN {i=$1; print i}' prints a boatload of stack
garbage. NUL terminate the memory returned from malloc to prevent it.

Obtained from: OpenBSD run.c 1.40
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
Delta File
+1 -0 contrib/one-true-awk/lib.c
+1 -0 1 file

HardenedBSD — sys/contrib/ipfilter/netinet ip_nat.c

Fix typo from r323945.

Reported by:        Gary Jennejohn <gljennjohn at gmail.com>
Point hat to:        cy (me)

HardenedBSD — sys/dev/ti if_ti.c

Since the page "frame" doesn't belong to a vm object, it can't be paged
out.  Since it can't be paged out, it is never actually enqueued in a
paging queue.  Nonetheless, passing PQ_INACTIVE to vm_page_unwire()
creates the appearance that the page "frame" is being enqueued in the
inactive queue.  As of r288122, we can avoid this false impression by
passing PQ_NONE.

MFC after:        1 week
Delta File
+1 -1 sys/dev/ti/if_ti.c
+1 -1 1 file

HardenedBSD — sys/vm vm_map.c

HBSD: fix compile error in vm_map.c

Pointyhat: me
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 2f4bd4287789c7a71e8c0c299a06e98b544e16e9)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+2 -2 sys/vm/vm_map.c
+2 -2 1 file

HardenedBSD — sys/vm vm_map.c

HBSD: fix compile error in vm_map.c

Pointyhat: me
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+2 -2 sys/vm/vm_map.c
+2 -2 1 file

HardenedBSD — bin/pwait pwait.c

HBSD: pull in upstream fix for pwait hang when watching its own pid

From the FreeBSD Bug 218598:

  pwait will deadlock when passed its own PID.
  I experienced this when kern.randompid was set with poudriere.
  The code was more or less this:

  #!/bin/sh
  do_the_thing&
  pwait $!
  do_the_other_thing

  If do_the_thing ends before pwait starts, and do_the_thing and
  pwait get the same pid, pwait waits indefinitely.

FreeBSD-PR: 218598
FreeBSD-PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218598
MFC-to: 10-STABLE
MFC-to: 11-STABLE
X-MFC-with: baf6bf5b16681f98941f25302074ff64df89e076
Submitted-by: Dan McGregor <dan.mcgregor at usask.ca>
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit e0b45ab3bc9443689c2d95ce2e3b552a027f5494)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>

    [2 lines not shown]
Delta File
+7 -0 bin/pwait/pwait.c
+7 -0 1 file

HardenedBSD — bin/pwait pwait.c

HBSD: pull in upstream fix for pwait hang when watching its own pid

From the FreeBSD Bug 218598:

  pwait will deadlock when passed its own PID.
  I experienced this when kern.randompid was set with poudriere.
  The code was more or less this:

  #!/bin/sh
  do_the_thing&
  pwait $!
  do_the_other_thing

  If do_the_thing ends before pwait starts, and do_the_thing and
  pwait get the same pid, pwait waits indefinitely.

FreeBSD-PR: 218598
FreeBSD-PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218598
MFC-to: 10-STABLE
MFC-to: 11-STABLE
X-MFC-with: baf6bf5b16681f98941f25302074ff64df89e076
Submitted-by: Dan McGregor <dan.mcgregor at usask.ca>
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit e0b45ab3bc9443689c2d95ce2e3b552a027f5494)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+7 -0 bin/pwait/pwait.c
+7 -0 1 file

HardenedBSD — sys/kern kern_fork.c

HBSD: enable pid randomization in PAX_HARDENING case

This commit effectiveliy reverts the following commit:

    HBSD: Use HARDEN_RANDOMPID for hardening kern.randompid

    Setting the kern.randompid sysctl node, as we do by default with the
    PAX_HARDENING kernel flag, can cause Poudriere's use of `pwait` to hang
    indefinately. So that users who want to build their own packages using
    Poudriere on HardenedBSD, provide a separate option for hardening PID
    randomization. Add the option to the HARDENEDBSD kernel.

    There is a candidate patch for `pwait` in upstream FreeBSD. However,
    that should be treated separately.

    Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
    Sponsored-by:   SoldierX
    github-issue:   #263
    See-also:       https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218598
    MFC-to:         10-STABLE
    MFC-to:         11-STABLE

Instead of working around user-space tools errors from kernel, pull in
the proper fix to pwait...


    [12 lines not shown]
Delta File
+4 -4 sys/kern/kern_fork.c
+4 -4 1 file

HardenedBSD — sys/amd64/conf HARDENEDBSD, sys/arm64/conf HARDENEDBSD

HBSD: enable pid randomization in PAX_HARDENING case

This commit effectiveliy reverts the following commit:

    HBSD: Use HARDEN_RANDOMPID for hardening kern.randompid

    Setting the kern.randompid sysctl node, as we do by default with the
    PAX_HARDENING kernel flag, can cause Poudriere's use of `pwait` to hang
    indefinately. So that users who want to build their own packages using
    Poudriere on HardenedBSD, provide a separate option for hardening PID
    randomization. Add the option to the HARDENEDBSD kernel.

    There is a candidate patch for `pwait` in upstream FreeBSD. However,
    that should be treated separately.

    Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
    Sponsored-by:   SoldierX
    github-issue:   #263
    See-also:       https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218598
    MFC-to:         10-STABLE
    MFC-to:         11-STABLE

Instead of working around user-space tools errors from kernel, pull in
the proper fix to pwait...


    [10 lines not shown]

HardenedBSD — sys/conf NOTES options, sys/vm vm_map.c

HBSD: rework MAP_GUARD footshooting prevention

Remove the unneeded STACK_GUARD_MAX_PAGES kernel knob, and
restrict the check only in the PAX_HARDENING case.

MFC-to: 11-STABLE
MFC-to: 10-STABLE
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 2b2925a7848f3d3fdb681bfec0adad17754ccd9a)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+24 -13 sys/vm/vm_map.c
+0 -1 sys/conf/NOTES
+0 -1 sys/conf/options
+24 -15 3 files

HardenedBSD — sys/conf options NOTES, sys/vm vm_map.c

HBSD: rework MAP_GUARD footshooting prevention

Remove the unneeded STACK_GUARD_MAX_PAGES kernel knob, and
restrict the check only in the PAX_HARDENING case.

MFC-to: 11-STABLE
MFC-to: 10-STABLE
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 2b2925a7848f3d3fdb681bfec0adad17754ccd9a)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 68b9a7301d1997c9b661437f9b0dee61cbd78d75)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+24 -13 sys/vm/vm_map.c
+0 -3 sys/conf/options
+0 -1 sys/conf/NOTES
+24 -17 3 files

HardenedBSD — sys/conf options NOTES

HBSD: garbage collect STACK_GUARD_SIZE kernel knob

MFC-to: 11-STABLE
Pointyhat: Shawn Webb
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 07dd8b49fac266e164b4f0bfd3b20cb93ca97e9b)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 821173f8e068d6d7a93813b3aa84d0b31a860937)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+1 -2 sys/conf/options
+0 -1 sys/conf/NOTES
+1 -3 2 files

HardenedBSD — sys/conf options

HBSD: garbage collect STACK_GUARD_SIZE kernel knob

MFC-to: 11-STABLE
Pointyhat: Shawn Webb
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
(cherry picked from commit 07dd8b49fac266e164b4f0bfd3b20cb93ca97e9b)
Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+1 -2 sys/conf/options
+1 -2 1 file

HardenedBSD — release Makefile

    HBSD: resolve merge conflict in release/Makefile after 
a3c81b6ad82652cfa97c5a0a84cd99c1ed1a0cae - part II.
    
    Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+2 -6 release/Makefile
+2 -6 1 file

HardenedBSD — release Makefile

    HBSD: resolve merge conflict in release/Makefile after 
a3c81b6ad82652cfa97c5a0a84cd99c1ed1a0cae
    
    Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+2 -7 release/Makefile
+2 -7 1 file

HardenedBSD — libexec/rtld-elf rtld.c

HBSD: resolve merge conflict in rtld.c after af2751ed9fdfb8d9efe2f9b32ccb402ab5f94756

Signed-off-by: Oliver Pinter <oliver.pinter at hardenedbsd.org>
Delta File
+1 -5 libexec/rtld-elf/rtld.c
+1 -5 1 file

HardenedBSD — sys/boot/i386/libi386 Makefile

After the r317886 support for TFTP and NFS can be enable simultaneously.

The cleanup of this distinction was done in the r318988, but this Makefile
was omitted.

Submitted by:        kczekirda@
Delta File
+2 -2 sys/boot/i386/libi386/Makefile
+2 -2 1 file

HardenedBSD — sys/kern subr_witness.c

Revert r323935 as it broke the build

subr_witness.c:2577:4: error: use of undeclared identifier 'req'
                        req->oldidx = 0;
                        ^
Delta File
+16 -45 sys/kern/subr_witness.c
+16 -45 1 file

HardenedBSD — share/man/man9 Makefile

MFC r323655:

Add missing links to the nv man page.
Delta File
+27 -0 share/man/man9/Makefile
+27 -0 1 file