FreeBSD/src a8fd0a5lib/geom/label glabel.8, sys/conf files

glabel: Remove support for old reiserfs

Reviewed by: imp, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1101
DeltaFile
+0-123sys/geom/label/g_label_reiserfs.c
+1-4lib/geom/label/glabel.8
+0-1sys/geom/label/g_label.c
+0-1sys/geom/label/g_label.h
+0-1sys/conf/files
+0-1sys/modules/geom/geom_label/Makefile
+1-1316 files

FreeBSD/src 67677a6sys/dev/iicbus acpi_iicbus.c

acpi_iicbus: Shift slave address

The address is expected to need shifting.
see https://uefi.org/specs/ACPI/6.5/13_System_Mgmt_Bus_Interface_Specification.html#smbus-slave-addresses

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
DeltaFile
+3-0sys/dev/iicbus/acpi_iicbus.c
+3-01 files

FreeBSD/src d0cc25fsys/dev/acpica acpi_cmbat.c

acpi_cmbat: Use nitems instead of sizeof

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
DeltaFile
+2-2sys/dev/acpica/acpi_cmbat.c
+2-21 files

FreeBSD/src bf2fd47sys/dev/ichiic ig4_reg.h

ig4_reg: Update datasheet link

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
DeltaFile
+1-1sys/dev/ichiic/ig4_reg.h
+1-11 files

FreeBSD/src 493715fsys/dev/ichiic ig4_iic.c

ig4_iic: Warn on NACK

Some DSDTs define non-existent devices, warn the user when an access is attempted on one of these devices.

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: https://github.com/freebsd/freebsd-src/pull/1125
DeltaFile
+4-0sys/dev/ichiic/ig4_iic.c
+4-01 files

FreeBSD/src 54e231bshare/man/man4 i2ctinyusb.4 Makefile, sys/conf files

Add support for i2c-tiny-usb: usb to iic bridge

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1123
DeltaFile
+302-0sys/dev/usb/misc/i2ctinyusb.c
+85-0share/man/man4/i2ctinyusb.4
+35-0sys/modules/usb/i2ctinyusb/Makefile
+1-0share/man/man4/Makefile
+1-0sys/conf/files
+1-0sys/modules/usb/Makefile
+425-06 files

FreeBSD/src 725a9f4usr.bin/bsdiff/bsdiff bsdiff.c, usr.bin/bsdiff/bspatch bspatch.c

bsdiff: Use mmap instead of malloc

Note: This follows the current style of the bsdiff.c and bspatch.c
files, which is rather far from style(9).

Reviewed by: imp, cpervica
Pull Request: https://github.com/freebsd/freebsd-src/pull/1076
DeltaFile
+12-13usr.bin/bsdiff/bsdiff/bsdiff.c
+9-7usr.bin/bsdiff/bspatch/bspatch.c
+21-202 files

FreeBSD/src de525c5lib/libsys intro.2

intro.2: Integrate introduction with state of page

Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
DeltaFile
+6-2lib/libsys/intro.2
+6-21 files

FreeBSD/src d846f33lib/libsys intro.2

intro.2: Section RETURN VALUES is actually ERRORS

Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
DeltaFile
+281-281lib/libsys/intro.2
+281-2811 files

FreeBSD/src 4696ca7lib/libsys intro.2

intro.2: Add FILES mentioning table of syscalls

Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
DeltaFile
+5-0lib/libsys/intro.2
+5-01 files

FreeBSD/src 9e8df79lib/libsys intro.2

intro.2: Tweak grammar and syntax for consistency

Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
DeltaFile
+101-123lib/libsys/intro.2
+101-1231 files

FreeBSD/src bcc57e9lib/libsys intro.2

intro.2: Import HISTORY from OpenBSD but our style

Reviewed by: imp, brooks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1065
DeltaFile
+6-1lib/libsys/intro.2
+6-11 files

FreeBSD/src 961bcbeusr.sbin/mailwrapper mailwrapper.c

mailwrapper(8): change behaviour if mailer.conf cannot be opened

Previously, mailwrapper(8) would default to invoking _PATH_DEFAULTMTA
(i.e., dma) if mailer.conf couldn't be opened for any reason, including
transient errors like ENFILE.  This behaviour is undesirable, because if
the administrator has configured a different MTA in mailer.conf, they
almost certainly don't want mailwrapper to unpredictably fall back to
the compiled-in default; and in any case, the default MTA is probably
not running, meaning the mail may be queued and then never delivered,
which is worse than not accepting it to begin with.

Change this behaviour depending on why mailer.conf can't be opened:

- If it doesn't exist, keep the existing behaviour of falling back to
  the default MTA, on the assumption that this is a reasonable default
  if mailer.conf hasn't been configured at all.

- If it cannot be opened for any other reason, do not invoke an MTA and
  instead return an error to the caller.

    [4 lines not shown]
DeltaFile
+17-6usr.sbin/mailwrapper/mailwrapper.c
+17-61 files

FreeBSD/src 44e8934lib/libgcc_s Symbol.map Versions.def

libgcc_s: expose __divmoddi4 on i386

GCC has used this for some time (since 7.0) and apparently we were
getting away with using the hidden symbol, but when linking with
--no-undefined-version we get an error unless it's properly exported.
(For anyone who wonders at the assymetry, __udivmoddi4 is indeed much
older and was introduced with GCC 3.0.)

MFC after:      3 days
Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D44878
DeltaFile
+6-0lib/libgcc_s/Symbol.map
+3-0lib/libgcc_s/Versions.def
+9-02 files

FreeBSD/src 0b9e358lib/libgcc_eh Makefile.inc

libgcc_{eh,s}: restore __*_frame_info symbols post llvm18

The upstream llvm commit 5eb44df1b64d made the addition of these GCC
compatability symbols dependent on build configuration rather than
hardcoded for amd64, i386, and powerpc.  Reenable them.

Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D44877
DeltaFile
+3-0lib/libgcc_eh/Makefile.inc
+3-01 files

FreeBSD/src f0bd655lib/libc/quad Symbol.map

libc/quad: further narrow list of i386 symbols

It's unclear to me why lld didn't complain about these are they aren't
present and haven't been.  Instead ld.bfd complained.

Reviewed by:    dim
Fixes:          6e6cd03c911c libc/quad: narrow list of symbols exposed on i386
Differential Revision:  https://reviews.freebsd.org/D44879
DeltaFile
+4-4lib/libc/quad/Symbol.map
+4-41 files

FreeBSD/src 2569672usr.bin/patch inp.c pch.c

patch: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+7-12usr.bin/patch/inp.c
+10-7usr.bin/patch/pch.c
+17-192 files

FreeBSD/src d3643c9usr.bin/join join.c

join: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+10-8usr.bin/join/join.c
+10-81 files

FreeBSD/src 3abcc79usr.bin/head head.c

head: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+5-4usr.bin/head/head.c
+5-41 files

FreeBSD/src 5fbdcd6usr.bin/xargs xargs.c

xargs: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+4-4usr.bin/xargs/xargs.c
+4-41 files

FreeBSD/src b057859usr.bin/cut cut.c

cut: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+20-17usr.bin/cut/cut.c
+20-171 files

FreeBSD/src 9744821usr.bin/diff diff.c

diff: use getline() instead of fgetln()

This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba2ec8b), and there's been some previous patches (ee3ca711a898
8c98e6b1a7f3 1a2a4fc8ce1b) for other tools.

Obtained from:  https://github.com/dcantrell/bsdutils and
                https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <martin at arp242.net>

    [2 lines not shown]
DeltaFile
+10-7usr.bin/diff/diff.c
+10-71 files

FreeBSD/src 04e0313sys/contrib/openzfs/cmd ztest.c

ztest: use ASSERT3P to compare pointers

Fixes i386-gcc13 build.  Direct commit while waiting for upstream.

Pull Request: https://github.com/openzfs/zfs/pull/16115
DeltaFile
+1-1sys/contrib/openzfs/cmd/ztest.c
+1-11 files

FreeBSD/src 6e83504lib/libc/sys openat.c setcontext.c, lib/libsys Symbol.sys.map

Revert "lib{c,sys}: normalize export of openat, setcontext, and swapcontext"

I put the symbols in the wrong file (should have been
lib/libc/sys/Symbol.map), added a duplicate pdfork entry due to a botch
rebase, and there seems to be a issue with gcc13/binutils not exposing
the symbols so revert the whole thing while I debug.

This reverts commit ee632fb9eb4a060a4087a7f5425bfe36e65cda61.
DeltaFile
+0-4lib/libsys/Symbol.sys.map
+1-0lib/libc/sys/openat.c
+1-0lib/libc/sys/setcontext.c
+1-0lib/libc/sys/swapcontext.c
+3-44 files

FreeBSD/src 68a3a7fsys/kern kern_fork.c

kasan: fix false-positive kasan_report upon thread reuse

In fork1(), if a thread is reused and thread_alloc_stack() is not
called, mark the reused thread's kstack pages clean in the KASAN shadow
buffer.

Sponsored by:   Juniper Networks, Inc.
MFC after:      3 days
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D44875
DeltaFile
+5-0sys/kern/kern_fork.c
+5-01 files

FreeBSD/src 2cb0fcesys/dev/iicbus if_ic.c, sys/dev/wg if_wg.c

bpf: Make BPF interop consistent with if_loop

The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:             256587
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/876
DeltaFile
+2-2sys/dev/iicbus/if_ic.c
+2-1sys/dev/wg/if_wg.c
+2-1sys/net/if_gif.c
+2-1sys/net/if_gre.c
+2-1sys/net/if_me.c
+1-1sys/net/if_tuntap.c
+11-72 files not shown
+13-98 files

FreeBSD/src 2f44f86usr.bin/xinstall xinstall.c

install: Fix a compiler warning when bootstrapping

Fixes:          4336161cc9c6 ("install: Don't skip syncing in the common case.")
Reviewed by:    imp, des
Differential Revision:  https://reviews.freebsd.org/D44866
DeltaFile
+2-0usr.bin/xinstall/xinstall.c
+2-01 files

FreeBSD/src 87b0195usr.bin/ctags C.c ctags.c

ctags: Use C99 bool instead of defining our own

Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1 at gmail.com>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1107
DeltaFile
+38-38usr.bin/ctags/C.c
+11-11usr.bin/ctags/ctags.c
+6-6usr.bin/ctags/fortran.c
+5-6usr.bin/ctags/ctags.h
+5-5usr.bin/ctags/yacc.c
+4-4usr.bin/ctags/lisp.c
+69-701 files not shown
+70-717 files

FreeBSD/src e1e6361tests/atf_python/sys Makefile, tests/atf_python/sys/net Makefile

tests: move atf_python/sys/ into the tests package

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1174
DeltaFile
+1-0tests/atf_python/sys/net/Makefile
+1-0tests/atf_python/sys/Makefile
+1-0tests/atf_python/sys/netlink/Makefile
+1-0tests/atf_python/sys/netpfil/Makefile
+1-0tests/atf_python/sys/netpfil/ipfw/Makefile
+5-05 files

FreeBSD/src 563c72esys/compat/linuxkpi/common/include/linux utsname.h

LinuxKPI: utsname.h add missing SPDX-License-Identifier

Reported by:    markj (2023-05-24; sorry took me a while)
MFC after:      3 days
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/utsname.h
+2-01 files