Displaying 1 50 of 273,342 commits (0.018s)

HardenedBSD — contrib/elftoolchain/strings strings.c

Revert r340385, strings capability mode

This needs to be reworked for bootstrapping.

HardenedBSD — sys/dts Makefile.inc, sys/dts/arm Makefile.inc Makefile

Fix test-dts{,o} targets

There were two main problems here:

1.) sys/dts/Makefile.inc is not included from various */overlays directories
    by default, only ../Makefile.inc
2.) When shelling out for DTS/DTSO, cwd != .CURDIR, so enumeration always
    failed

These changes allow make test-dts and make test-dtso to function in their
respective directories.

Reviewed by:        manu
MFC after:        3 days
Differential Revision:        https://reviews.freebsd.org/D17961

HardenedBSD — sys/compat/freebsd32 freebsd32_systrace_args.c freebsd32_proto.h, sys/sys sysproto.h

Regen after r340388: MFC r340302: Fix freebsd32 mknod(at).

Approved by:        re (gjb, implicit)
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17928

HardenedBSD — sys/compat/freebsd32 freebsd32_misc.c syscalls.master, sys/kern syscalls.master

MFC r340302:

Fix freebsd32 mknod(at).

As dev_t is now a 64-bit integer, it requires special handling as a
system call argument.  64-bit arguments are split between two 64-bit
integers due to the way arguments are promoted to allow reuse of most
system call implementations.  They must be reassembled before use.
Further, 64-bit arguments at an odd offset (counting from zero) are
padded and slid to the next slot on powerpc and mips.  Fix the
non-COMPAT11 system call by adding a freebsd32_mknodat() and
appropriately padded declerations.

The COMPAT11 system calls are fully compatible with the 64-bit
implementations so remove the freebsd32_ versions.

Use uint32_t consistently as the type of the old dev_t.  This matches
the old definition.

Reviewed by:        kib
Approved by:        re (gjb)
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17928

HardenedBSD — sys/compat/freebsd32 freebsd32_sysent.c freebsd32_systrace_args.c

Regen after r340377: MFC r340272, r340274, r340294

r340272: Make __sysctl follow the freebsd32_foo convention.
r340274: Make freebsd32_umtx_op follow the freebsd32_foo convention.
r340294: Fix a number of bugs in freebsd32's capabilities.conf.

Approved by:        re (gjb, implicit)
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17925

HardenedBSD — sys/compat/freebsd32 capabilities.conf syscalls.master, sys/kern kern_umtx.c

MFC r340272, r340274, r340294

r340272:
Make __sysctl follow the freebsd32_foo convention.

Sponsored by:        DARPA, AFRL

r340274:
Make freebsd32_umtx_op follow the freebsd32_foo convention.

Sponsored by:        DARPA, AFRL

r340294:
Fix a number of bugs in freebsd32's capabilities.conf.

Bugs range from failure to update after changing syscall implementaion
names to using the wrong name.  Somewhat confusingly, the name in
capabilities.conf is exactly the string that appears in syscalls.master,
not the name with a COMPAT* prefix which is the actual function name.

Found while making a change to use the default capabilities.conf.

Fixes:        r335177, r336980, r340272, r340274, others
Reviewed by:        kib, emaste
Approved by:        re (gjb)

    [2 lines not shown]

HardenedBSD — sys/conf dtb.mk

dtb.mk: Fix passing of ECHO to make_dtb{,o}.sh
Delta File
+4 -4 sys/conf/dtb.mk
+4 -4 1 file

HardenedBSD — . Makefile.libcompat

Use ...-freebsd13.0 in -target strings.

Reported by:        Mark Millard
Delta File
+3 -3 Makefile.libcompat
+3 -3 1 file

HardenedBSD — usr.bin/head head.c

head: fix style nits

No functional change intended.

Reviewed by:        emaste
MFC after:        3 weeks
Differential Revision:        https://reviews.freebsd.org/D14498
Delta File
+13 -8 usr.bin/head/head.c
+13 -8 1 file

HardenedBSD — share/man/man4 rum.4 run.4

MFC r340251:

  Update rum(4) and run(4) man pages to reflect that newer versions
  of TP-LINK TL-WN321G are run(4) and not rum(4) anymore.

  Reported by:        J (tech-lists zyxst.net)
Approved by:        re (kib)
Delta File
+2 -2 share/man/man4/rum.4
+2 -1 share/man/man4/run.4
+4 -3 2 files

HardenedBSD — sys/dev/e1000 em_txrx.c igb_txrx.c

MFC r340310:

Fix first-packet completion

The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.

PR:                233022
Reported by:        lev
Reviewed by:        lev
Approved by:        re (kib)
Sponsored by:        Limelight Networks
Differential Revision:        https://reviews.freebsd.org/D17931

HardenedBSD — sys/net iflib.c

MFC r340236:

Fix rxcsum issue introduced in r338838

r338838 attempted to fix issues with rxcsum and rxcsum6.
However, the rxcsum bits were set as though if_setcapenablebit() was
being called, not if_togglecapenable() which is in use. As a result,
it was not possible to disable rxcsum when rxcsum6 was supported.

PR:                233004
Reported by:        lev
Reviewed by:        lev
Approved by:        re (kib)
Sponsored by:        Limelight Networks
Differential Revision:        https://reviews.freebsd.org/D17881
Delta File
+6 -11 sys/net/iflib.c
+6 -11 1 file

HardenedBSD — sys/conf dtb.mk, sys/tools/fdt make_dtb.sh make_dtbo.sh

MFC r340297: Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s

Approved by:        re (kib)

HardenedBSD — usr.bin/uuencode uuencode.c

Make outfile constant.

MFC after:        2 weeks
Delta File
+1 -1 usr.bin/uuencode/uuencode.c
+1 -1 1 file

HardenedBSD — sys/kern kern_mbuf.c

netdump: Fix netdumping with INVARIANTS kernels

Correct boneheaded assertion I added in r339501.  Mea culpa.

The intent is to notice when an M_WAITOK zone allocation would fail during
netdump, not to prevent all use of mbufs during netdump.

Reviewed by:        markj
X-MFC-With:        r339501
Differential Revision:        https://reviews.freebsd.org/D17957
Delta File
+4 -4 sys/kern/kern_mbuf.c
+4 -4 1 file

HardenedBSD — share/timedef de_AT.ISO8859-15.src de_AT.UTF-8.src

Use blank am_pm and t_fmt_ampm for de_AT and de_DE locales as apparently
they use 24-hour clock notation.  The visible change is that w(1) now
uses 24-hour clock format as it checks for t_fmt_ampm presence.

PR:                231771
Submitted by:        Christoph Schönweiler <public2016 at hauptsignal.at>
Reviewed by:        bapt
Approved by:        kib (mentor, implicit)
MFC after:        1 month
Differential Revision:        https://reviews.freebsd.org/D17945

HardenedBSD — sys/dev/sound/usb uaudio.c

MFC r340248:
Don't read the USB audio sync endpoint when we don't use it to save
isochronous bandwidth.

Sponsored by:                Mellanox Technologies
Delta File
+11 -1 sys/dev/sound/usb/uaudio.c
+11 -1 1 file

HardenedBSD — sbin/ipfw ipfw.8

MFC r340249: ipfw.8: fix small syntax error in an example
Delta File
+1 -1 sbin/ipfw/ipfw.8
+1 -1 1 file

HardenedBSD — lib/libc/sys open.2 stat.2

First draft of documentation for AT/O_BENEATH handling of the absolute
paths.

It was decided that committing the code and drafting of the man page
update is better than allowing the code to rot until wordsmithing
happens.

Reviewed by:        jilles (previous version)
Discussed with:        brooks, jilles, emaste
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Differential revision:        https://reviews.freebsd.org/D17714
Delta File
+64 -15 lib/libc/sys/open.2
+47 -8 lib/libc/sys/stat.2
+21 -7 lib/libc/sys/link.2
+20 -6 lib/libc/sys/chown.2
+20 -6 lib/libc/sys/unlink.2
+20 -6 lib/libc/sys/access.2
+60 -18 3 files not shown
+252 -66 9 files

HardenedBSD — share/man/man5 nsswitch.conf.5

Update nsswitch.conf(5) man page to make it clear additional sources
might be provided by third party software.

Reviewed by:        bcr
MFC after:        2 weeks
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17934
Delta File
+3 -1 share/man/man5/nsswitch.conf.5
+3 -1 1 file

HardenedBSD — usr.sbin/periodic/etc/daily 440.status-mailq

Fix daily mailq script for Postfix and daily_show_success="NO"

Exit with a zero status when Postfix reports "Mail queue is empty" so this
section won't appear in the report at all when daily_show_success="NO".

MFC after:        2 weeks
Sponsored by:        Dell EMC Isilon

HardenedBSD — sys/kern sysv_shm.c

Remove one-use variable.

This also removes a lot of #ifdefs and cleans up a warning when the
AUDIT kernel option is defined, but neither KDTRACE_HOOKS nor MAC are.

Reported and tested by:        danger
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Delta File
+2 -7 sys/kern/sysv_shm.c
+2 -7 1 file

HardenedBSD — sys/kern vfs_lookup.c, sys/sys namei.h

Allow absolute paths for O_BENEATH.

The path must have a tail which does not escape starting/topping
directory.  The documentation will come shortly, see the man pages
commit message for the reason of separate commit.

Reviewed by:        jilles (previous version)
Discussed with:        emaste
Tested by:        pho
Sponsored by:        The FreeBSD Foundation
MFC after:        1 week
Differential revision:        https://reviews.freebsd.org/D17714
Delta File
+50 -7 sys/kern/vfs_lookup.c
+4 -0 sys/sys/namei.h
+54 -7 2 files

HardenedBSD — share/man/man4 ddb.4

Random tweaks to ddb(4) manual page.

MFC after:        2 weeks
Sponsored by:        DARPA, AFRL
Delta File
+6 -4 share/man/man4/ddb.4
+6 -4 1 file

HardenedBSD — sys/modules/dtb/am335x Makefile

Fix dtb path for beaglebone* boards.

This is a direct commit to 11 since head switch to Linux upstream DTS.

Reported by:        jmg
Delta File
+4 -0 sys/modules/dtb/am335x/Makefile
+4 -0 1 file

HardenedBSD — lib/libc/net nsdispatch.c, share/man/man5 nsswitch.conf.5

Don't call stat(2) on nsswitch.conf(5) every time nsdispatch(3)
and dependent functions (eg getpwname(3)) get called. This can
improve performance of binaries that perform a lot of name
lookups, such as gssd(8). It also matches documented behaviour
of Linux and Solaris.

The old code is left in place, should anyone need it, guarded
by #ifdef NS_REREAD_CONF.

Reviewed by:        imp, bcr
MFC after:        2 weeks
Relnotes:        yes
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D17934

HardenedBSD — sys/dev/usb/input uhid.c wmt.c

wmt(4): Add PNP record so it could be picked by devd/devmatch.

Fix uhid(4) conflict with blacklisting of multitouch HID-usages
in uhid(4) probe handler.

Reviewed by:                imp
No objections from:        hps
MFC after:                1 month
Differential Revision:        https://reviews.freebsd.org/D17689

HardenedBSD — Bindings vendor-prefixes.txt xilinx.txt, Bindings/arm coresight.txt xilinx.txt

dts: Update our copy to Linux 4.19
Delta File
+2,444 -0 src/arm/omap4-l4.dtsi
+880 -0 src/arm/imx6sll-pinfunc.h
+32 -780 src/arm/omap4.dtsi
+780 -0 src/arm64/qcom/sdm845.dtsi
+780 -0 src/arm/imx6sll.dtsi
+599 -0 src/arm64/rockchip/rk3399-ficus.dts
+24,371 -7,713 1200 files not shown
+29,886 -8,493 1206 files

HardenedBSD — lib/libbe be.c

libbe(3): Set canmount properly when activating a new BE

The previously activated BE should have canmount=noauto set on it upon
activation of the new BE, but we previously did not touch canmount on either
old or new BE.

PR:                233113
MFC after:        3 days
Delta File
+18 -0 lib/libbe/be.c
+18 -0 1 file

HardenedBSD — sys/vm swap_pager.c

MFC r340241:
Fix a use-after-free in swp_pager_meta_free().

Approved by:        re (gjb)
Delta File
+1 -1 sys/vm/swap_pager.c
+1 -1 1 file

HardenedBSD — bin/setfacl setfacl.c setfacl.1

MFC r339793:
Don't set NFSv4 ACL inheritance flags on non-directories.

PR:                155163
Approved by:        re (gjb)
Delta File
+68 -13 bin/setfacl/setfacl.c
+3 -1 bin/setfacl/setfacl.1
+71 -14 2 files

HardenedBSD — . UPDATING

Add UPDATING entry for newsyslog.conf changes introduced by r340318

Approved by:        cem
Differential Revision:        https://reviews.freebsd.org/D17936
Delta File
+10 -0 UPDATING
+10 -0 1 file

HardenedBSD — tools/tools/netmap pkt-gen.c pkt-gen.8

netmap: pkt-gen: several updates from upstream

Various improvements to the netmap pkt-gen program:

 - indentation fixes
 - support for IPV6
 - fixes to checksum computation
 - support for NS_MOREFRAG
 - rate limiting in ping mode

Reviewed by:        bcr, 0mp
Approved by:        gnn (mentor)
MFC after:        3 days
Differential Revision:        https://reviews.freebsd.org/D17698
Delta File
+1,114 -533 tools/tools/netmap/pkt-gen.c
+182 -62 tools/tools/netmap/pkt-gen.8
+1,296 -595 2 files

HardenedBSD — usr.sbin/periodic/etc/weekly 340.noid

Sigh... Fix another breakage after r340322: spell "sysrc" correctly.

MFC after:        1 month

HardenedBSD — usr.sbin/periodic/etc/weekly 340.noid

Fix breakage after r340322: add missing "-n" to invocation of sysrc.

MFH:                1 month

HardenedBSD — usr.sbin/periodic/etc/weekly 340.noid

Prevent periodic/etc/weekly/340.noid from descending into root directories
of jails. Jails have their own user/group databases and this script
can produce multiple false warnings, not to mention significant extra
load in case of large jailed subtrees. Leave this check for jailed
invocations of the same script.

MFC after:        1 month

HardenedBSD — libexec/rc rc.conf, libexec/rc/rc.d jail

Move definition of $jail_conf variable to /etc/defaults/rc.conf
from jail startup script so it can be successfully queried
with the command "sysrc jail_conf".

MFC after:        1 month
Delta File
+1 -0 libexec/rc/rc.conf
+0 -1 libexec/rc/rc.d/jail
+1 -1 2 files

HardenedBSD — lib/libelf Makefile

MFC r338485 (jhb): libelf: Add gelf_mips64el.c to file list
Delta File
+1 -0 lib/libelf/Makefile
+1 -0 1 file

HardenedBSD — usr.sbin/newsyslog newsyslog.8 newsyslog.conf

newsyslog.conf: Restrict included files in default config to [!.]*.conf

The new default config will only include files from the following
directories which end with '.conf' and do not beginning with a '.'
character:
- /etc/newsyslog.conf.d/
- /usr/local/etc/newsyslog.conf.d/

This matches the syslog.conf(5) functionality, and also prevents '.sample' or
'.pkgnew' files being included. This is important for ports which install files
in /usr/local/etc/newsyslog.conf.d/ and also for pkgbase.

Approved by:        eadler
Approved by:        bapt
Relnotes:        yes
Differential Revision:        https://reviews.freebsd.org/D17086

HardenedBSD — sys/dev/usb/controller dwc_otg.c

MFC r340212:
Sometimes the complete split packet may be queued too early and the
transaction translator will return a NAK. Ignore this message and
retry the complete split instead.

Approved by:                re (kib)
Sponsored by:                Mellanox Technologies
Delta File
+13 -0 sys/dev/usb/controller/dwc_otg.c
+13 -0 1 file

HardenedBSD — lib/libjail jail.c

libjail: fix handling of allow.mount.fusefs in jailparam_init

fusefs is inconsistently named. The kernel module is named "fuse", but the
mount helper is named "mount_fusefs" and the jail(8) parameter is named
"allow.mount.fusefs". Special case it in libjail.

Reviewed by:        jamie
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D17929
Delta File
+11 -3 lib/libjail/jail.c
+11 -3 1 file

HardenedBSD — sys/netinet ip_reass.c

Ensure that IP fragments do not extend beyond IP_MAXPACKET.

Such fragments are obviously invalid, and when processed may end up
violating the sort order (by offset) of fragments of a given packet.
This doesn't appear to be exploitable, however.

Reviewed by:        emaste
Discussed with:        jtl
MFC after:        3 days
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D17914
Delta File
+10 -0 sys/netinet/ip_reass.c
+10 -0 1 file

HardenedBSD — sys/powerpc/aim mmu_oea64.c

powerpc: Use MAX() macro instead of max() inline function to calculate Maxmem

Maxmem is the highest address for physical memory in the system.  It's
measured in pages which, since max() returns a u_int, should allow for up to
2^44 bytes of memory addressable by the system.  However, on POWER9 systems
at least, memory addressed by additional socketed CPUs begins at addresses
far above the 2^44 mark, causing issues with memory accesses and DMA, when
memory is addressed on the auxiliary CPUs.  Use the MAX() macro instead,
which doesn't convert arguments, so retains Maxmem and all calculations as
its defined long type (64-bit on powerpc64), keeping the maximum address
correct.

Submitted by:        mmacy
Delta File
+1 -1 sys/powerpc/aim/mmu_oea64.c
+1 -1 1 file

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

Do not ignore arc_adjust() return value.

This covers scenario when ARC may not shrink as fast as it could:
1. arc_size < arc_c and arc_adjust() does not evict anything, returning
   zero to arc_reclaim_thread();
2. arc_available_memory() reports memory pressure, which can not be
   satisfied by arc_kmem_reap_now();
3. arc_shrink() reduces arc_c and calls arc_adjust(), return of which is
   ignored;
4. even if the last arc_adjust() could not satisfy arc_size < arc_c,
   arc_reclaim_thread() will still go to sleep, since the first one
   returned zero.

Reviewed by:        allanjude, markj, sef
MFC after:        2 weeks
Sponsored by:        iXsystems, Inc.
Differential Revision:        https://reviews.freebsd.org/D17927

HardenedBSD — sys/dev/e1000 em_txrx.c igb_txrx.c

Fix first-packet completion

The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.

PR:                233022
Reported by:        lev
Reviewed by:        lev
MFC after:        3 days
Sponsored by:        Limelight Networks
Differential Revision:        https://reviews.freebsd.org/D17931

HardenedBSD — contrib/elftoolchain/elfcopy main.c, contrib/elftoolchain/libelf gelf_mips64el.c gelf_rela.c

Fix objcopy for little-endian MIPS64 objects.

MFC r338478 (jhb): Fix objcopy for little-endian MIPS64 objects.

MIPS64 does not store the 'r_info' field of a relocation table entry as
a 64-bit value consisting of a 32-bit symbol index in the high 32 bits
and a 32-bit type in the low 32 bits as on other architectures.  Instead,
the 64-bit 'r_info' field is really a 32-bit symbol index followed by four
individual byte type fields.  For big-endian MIPS64, treating this as a
64-bit integer happens to be compatible with the layout expected by other
architectures (symbol index in upper 32-bits of resulting "native" 64-bit
integer).  However, for little-endian MIPS64 the parsed 64-bit integer
contains the symbol index in the low 32 bits and the 4 individual byte
type fields in the upper 32-bits (but as if the upper 32-bits were
byte-swapped).

To cope, add two helper routines in gelf_getrel.c to translate between the
correct native 'r_info' value and the value obtained after the normal
byte-swap translation.  Use these routines in gelf_getrel(), gelf_getrela(),
gelf_update_rel(), and gelf_update_rela().  This fixes 'readelf -r' on
little-endian MIPS64 objects which was previously decoding incorrect
relocations as well as 'objcopy: invalid symbox index' warnings from
objcopy when extracting debug symbols from kernel modules.

Even with this fixed, objcopy was still crashing when trying to extract

    [27 lines not shown]

HardenedBSD — contrib/elftoolchain/readelf readelf.c

MFC r323632 (jhb): readelf: Add missing newline

after unknown MIPS-specific dynamic entries.

HardenedBSD — contrib/elftoolchain/readelf readelf.c

MFC r327219: readelf: report byte size for DT_PREINIT_ARRAYSZ

HardenedBSD — contrib/elftoolchain/nm nm.c

MFC r331078 (cem): nm: 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.
Delta File
+6 -3 contrib/elftoolchain/nm/nm.c
+6 -3 1 file

HardenedBSD — sys/dev/usb/input wmt.c

MFC r337287:

wmt(4): Read 'Contact count maximum' usage value from feature report

rather than from HID descriptor to match Microsoft documentation.
Fall back to HID descriptor provided value if 'Get Report' request failed.

MFC r337288:

wmt(4): Read Microsoft's "Touch Hardware Quality Assurance" certificate blob

if present to enable some devices like WaveShare touchscreens. Unlike
Windows we discard content of the blob. We try mimic Windows driver
behaviour from the USB device point of view.

Submitted by:        glebius (initial version)

MFC r337289:

wmt(4): Use internal function to calculate input report size

Usbhid's hid_report_size() calculates integral size of all reports of given
kind found in the HID descriptor rather then exact size of report with given
ID as its userland counterpart does. As all input data processed by the
driver is located within the same report, calculate required driver's buffer

    [17 lines not shown]
Delta File
+134 -16 sys/dev/usb/input/wmt.c
+134 -16 1 file