FreeBSD/src c6ad7dcusr.sbin/mfiutil mfi_evt.c

mfiutil: Fix incorrect accesses of an union member in 'struct mfi_evt_detail'

PR: 281156
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
DeltaFile
+5-5usr.sbin/mfiutil/mfi_evt.c
+5-51 files

FreeBSD/src 66efdefsys/dev/mfi mfireg.h

mfi: Correct a struct member name

This 'struct mfi_evt_pd' typed member should be named 'pd' instead of 'ld'.

PR: 281155
Reviewed by: imp, delphij
Pull Request: https://github.com/freebsd/freebsd-src/pull/1402
DeltaFile
+1-1sys/dev/mfi/mfireg.h
+1-11 files

FreeBSD/src c84d8dbsys/fs/procfs procfs_rlimit.c

procfs: ensure that RLIMIT_IDENT is properly updated when a limit is added

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-0sys/fs/procfs/procfs_rlimit.c
+3-01 files

FreeBSD/src af96cccsys/kern kern_resource.c

uifree(9): report non-zero values for all shared resources

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+12-0sys/kern/kern_resource.c
+12-01 files

FreeBSD/src 2c1963dsys/sys resource.h

procfs rlimit: handle pipebuf

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-1sys/sys/resource.h
+2-11 files

FreeBSD/src a52b30fsys/kern sys_pipe.c

sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf

Tested by:      yasu
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/kern/sys_pipe.c
+1-11 files

FreeBSD/src 401516dlibexec/rc rc.subr

rc.subr: Consistently use an absolute path for sysrc

MFC after:      2 weeks
Approved by:    christos
DeltaFile
+2-2libexec/rc/rc.subr
+2-21 files

FreeBSD/src 9dc67a7share/man/man8 rc.8

rc.8: Remove false information about rc.d/local

It does not handle scripts in /usr/local/etc/rc.d/. Instead, it takes
care of /etc/rc.local and /etc/rc.shutdown.local.

MFC after:      2 weeks
DeltaFile
+1-13share/man/man8/rc.8
+1-131 files

FreeBSD/src 9046ecfsys/netgraph/bluetooth/socket ng_btsocket_l2cap.c

bluetooth(3): Fix two typos in source code comments

- s/conficts/conflicts/

MFC after:      3 days
DeltaFile
+2-2sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+2-21 files

FreeBSD/src cc49979sys/arm64/arm64 machdep.c

arm64: Fix a typo in a source code comment

- s/parametes/parameters/

MFC after:      3 days
DeltaFile
+1-1sys/arm64/arm64/machdep.c
+1-11 files

FreeBSD/src 74f1007lib/libc/stdio vfprintf.c snprintf.c

printf(): Save errno earlier.

The manual page says %m is replaced with “the string representation of
the error code stored in the errno variable at the beginning of the
call”.  However, we don't actually save `errno` until fairly late in
`__vfprintf()`.  Make sure it is saved before we do anything that
might perturb `errno`.

MFC after:      1 week
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D46718
DeltaFile
+10-10lib/libc/stdio/vfprintf.c
+10-8lib/libc/stdio/snprintf.c
+6-4lib/libc/stdio/vsprintf.c
+4-3lib/libc/stdio/vsnprintf.c
+3-2lib/libc/stdio/vasprintf.c
+2-1lib/libc/stdio/vdprintf.c
+35-281 files not shown
+36-297 files

FreeBSD/src 14980d6usr.sbin/i2c i2c.c

i2c: Don't print uninitialized data when verbose

i2c -sv or i2c -rv prints an uninitialized field i2c_opt.addr.
Suppress the verbose message entirely for scan and reset,
where it provides no information, and zero initialize the field.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279261

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1345
DeltaFile
+6-6usr.sbin/i2c/i2c.c
+6-61 files

FreeBSD/src 313bd4dsys/mips/mips machdep.c

mips: Allow sysctl hw.machine in capability mode

This is a direct commit to stable/13.

Reviewed by:    emaste, manu
Differential Revision:  https://reviews.freebsd.org/D28703
DeltaFile
+2-1sys/mips/mips/machdep.c
+2-11 files

FreeBSD/src 6e45b50sys/security/mac_veriexec_parser mac_veriexec_parser.c

mac_veriexec_parser: Fix open_file error handling

NDFREE_PNBUF should be called after checking the return value of
vn_open(), and should only be called once.

Reviewed by: imp, zlei, Kornel Dulęba <mindal at semihalf.com>, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1338
DeltaFile
+1-2sys/security/mac_veriexec_parser/mac_veriexec_parser.c
+1-21 files

FreeBSD/src 674b96fusr.bin/netstat if.c sctp.c

netstat: Add missing "shutdown-ack-timer" key to libxo output

The key "shutdown-timer" was present twice in the libxo output. The second
occurence of "shutdown-time" has been renamed to "shutdown-ack-timer".

PR: 254672
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
DeltaFile
+2-2usr.bin/netstat/if.c
+1-1usr.bin/netstat/sctp.c
+3-32 files

FreeBSD/src 94567c8usr.bin/netstat if.c

netstat: Resolve duplicate "dropped-packets" key from libxo output

The current libxo output uses the "dropped-packets" key for both incoming and
outgoing packets. This commit distinguishes between the two by adding an "in"
and "out" suffix. The original "dropped-packets" key is kept for backwards
compatibility for now.

PR: 244589
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/1331
DeltaFile
+8-2usr.bin/netstat/if.c
+8-21 files

FreeBSD/src 599273frelease/amd64 make-memstick.sh mkisoimages.sh, tools/boot install-boot.sh

Copy the new ia32 loader

This handles copying in install-boot.sh and bsdinstall's bootconfig.

install-boot.sh:
make_esp_file now optionally takes extra arguments so it can copy
multiple files. This is used by the amd64 release scripts.
make_esp_device also takes an extra optional argument for efibootname.
This is currently unused, but it can be used in the future to do
something like:
make_esp_device loader.efi bootx64
make_esp_device loader_ia32.efi bootia32

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+38-14tools/boot/install-boot.sh
+22-14usr.sbin/bsdinstall/scripts/bootconfig
+6-1release/amd64/make-memstick.sh
+6-1release/amd64/mkisoimages.sh
+72-304 files

FreeBSD/src b538d49stand/efi/loader bootinfo.c, sys/amd64/amd64 machdep.c

Add a new sysctl in order to diffrentiate UEFI architectures

With the new 32-bit UEFI loader, it's convenient to have a sysctl to
figure out how we booted. Can be accessed at machdep.efi_arch

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+21-0sys/amd64/amd64/machdep.c
+7-1stand/efi/loader/bootinfo.c
+1-0sys/x86/include/metadata.h
+29-13 files

FreeBSD/src f8ca5d4stand/efi/loader Makefile, stand/efi/loader/arch/i386 elf64_freebsd.c amd64_tramp.S

stand: Add support for 64-bit machines with 32-bit UEFI implementations

Some machines have 64-bit capable cpus but are stuck on 32-bit uefi
firmware.

Add support for them by building a new "loader_ia32" with
LOADER_DEFAULT_INTERP along with the 64-bit one. The loader
can be disabled using MK_LOADER_IA32.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+274-0stand/efi/loader/arch/i386/elf64_freebsd.c
+100-0stand/efi/loader/arch/i386/amd64_tramp.S
+75-0stand/efi/loader/arch/i386/start.S
+55-0stand/efi/loader/arch/i386/i386.ldscript
+51-0stand/efi/loader/arch/i386/setup.c
+18-6stand/efi/loader/Makefile
+573-611 files not shown
+621-2317 files

FreeBSD/src 6818ff7stand/efi/loader framebuffer.c main.c

loader: Fix 32-bit compatibility

main.c - Fix rsdp cast.
framebuffer.c -
        - Use temp variable instead of directly passing pointer when
          EFI_PHYSICAL_ADDRESS is expected.
          Also fix FreePages cast.
        - Mask framebuffer address given to us by UEFI.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+15-6stand/efi/loader/framebuffer.c
+2-1stand/efi/loader/main.c
+17-72 files

FreeBSD/src 95f75b0stand/efi/loader framebuffer.c

loader: Fix shadow_fb allocation

Using AllocateMaxAddress here means that gfx_state->tg_shadow_fb is
treated as the highest address we can receive. Since
gfx_state->tg_shadow_fb is NULL, we never receive anything. Use
AllocateAnyPages instead.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+1-1stand/efi/loader/framebuffer.c
+1-11 files

FreeBSD/src f0d5b1bstand defs.mk Makefile, stand/efi Makefile

stand/efi: Add a 32-bit variant of libefi

In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a 32-bit variant of libefi since we need to compile both the 64-bit
version and the 32-bit version at the same time.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+7-3stand/defs.mk
+4-0stand/efi/libefi32/Makefile
+1-0stand/Makefile
+1-0stand/efi/Makefile
+13-34 files

FreeBSD/src fe3f792share/mk src.opts.mk, tools/build/options WITHOUT_LOADER_IA32 WITH_LOADER_IA32

Add build option for the ia32 loader

In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a build option for compiling the ia32 loader. Currently unused.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
DeltaFile
+5-0share/mk/src.opts.mk
+1-0tools/build/options/WITHOUT_LOADER_IA32
+1-0tools/build/options/WITH_LOADER_IA32
+7-03 files

FreeBSD/src 6500563lib/libsys swapon.2 fhreadlink.2

manuals: Fix errors in .2 pages

These were reported by `mandoc -T lint ...` as errors.

fhlink.2, fhreadlink.2: remove unneeded block closing.

getfh.2, procctl.2: add necessary block closing.

ptrace.2: -width only takes one argument.

swapon.2: <sys/vmparam.h> and <vm/swap_pager.h> weren't being displayed,
    because .It is for a list item whereas .In is for included files.
    Also, we want a blank line between <sys/ > headers and the other
    one.

Signed-off-by:  Graham Percival <gperciva at tarsnap.com>
PR:             281597
Reviewed by:    mhorne
Sponsored by:   Tarsnap Backup Inc.
DeltaFile
+3-2lib/libsys/swapon.2
+0-2lib/libsys/fhreadlink.2
+1-1lib/libsys/ptrace.2
+0-1lib/libsys/fhlink.2
+1-0lib/libsys/getfh.2
+1-0lib/libsys/procctl.2
+6-66 files

FreeBSD/src d6074f7sys/kern sys_pipe.c

pipe: use pipe subsystem KVA counter instead of pipe_map size

to calculate the superuser-reserved amount of the pipe space

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-3sys/kern/sys_pipe.c
+2-31 files

FreeBSD/src 4076916sys/kern sys_pipe.c

pipespace_new(): decrease uidinfo pipebuf usage if reservation check failed

Submitted by:   markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-0sys/kern/sys_pipe.c
+1-01 files

FreeBSD/src 0abe2d3share/man/man4 agp.4

agp.4: Add a deprecation notice to the man page

The driver is giant-locked and thus already prints a deprecation warning
when attaching.  The device file interface was broken in 14.0 and 14.1,
see commit 12500c14281d, but it took a very long time for anyone to
notice, and in that case it was only because of some code which probes
all device files.

Relnotes:       yes
Reviewed by:    imp, jhb, emaste
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D46542
DeltaFile
+5-0share/man/man4/agp.4
+5-01 files

FreeBSD/src 283bf3bsys/kern uipc_socket.c

socket: Only log splice structs to ktrace if KTR_STRUCT is configured

Fixes:  a1da7dc1cdad ("socket: Implement SO_SPLICE")
DeltaFile
+2-1sys/kern/uipc_socket.c
+2-11 files

FreeBSD/src f47e5a9sbin/ifconfig ifconfig.8 ifconfig.c

ifconfig: Add an allmulti verb

Similar to "promisc", this allows the IFF_ALLMULTI flag to be toggled
from userspace if it happens to be useful to disable multicast packet
filtering.  One use-case is when implementing IPv6 neighbour discovery
over netmap.

Reviewed by:    zlei, glebius
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D46525

(cherry picked from commit 00c9a6806c9cf3357b62f6708e5acd1ffd166613)
DeltaFile
+4-0sbin/ifconfig/ifconfig.8
+2-0sbin/ifconfig/ifconfig.c
+1-1sbin/ifconfig/ifconfig_netlink.c
+7-13 files

FreeBSD/src 59f3eb3sys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

netinet: Explicitly disallow connections to the unspecified address

If the V_connect_ifaddr_wild sysctl says that we shouldn't infer a
destination address, return an error.  Otherwise it's possible for use
of an unspecified foreign address to trigger a subsequent assertion
failure, for example in in_pcblookup_hash_locked().

Similarly, if no interface addresses are assigned, fail quickly upon an
attempt to connect to the unspecified address.

Reported by:    Shawn Webb <shawn.webb at hardenedbsd.org>
MFC after:      2 weeks
Reviewed by:    zlei, allanjude, emaste
Differential Revision:  https://reviews.freebsd.org/D46454

(cherry picked from commit 0c605af3f9d9e66be6af0a3bbc36dbedc5dfe516)
DeltaFile
+3-0sys/netinet6/in6_pcb.c
+2-0sys/netinet/in_pcb.c
+5-02 files