ichsmb: Add Intel Raptor Lake SMBus controller support
Add PCI device ID 0x7a23 for Intel 700 Series (Raptor Lake) chipset SMBus controller.
This enables hardware monitoring functionality on 13th and 14th generation Intel Core platforms.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54957
runat: Add -h to manipulate a symlink's named attribute dir
Lionel Cons <lionelcons1972 at gmail.com> requested
that a new option be added to runat(1) so that it could
be used to manipulate named attributes associated with
a symbolic link and not the file the symbolic link refers to).
This patch adds the option -h/--nofollow to do this.
(cherry picked from commit 4bfb7cfb70e62bc316de9e73cfd63a5c85541154)
t_access.c: remove unnecessary local modification
FreeBSD 11.x is no longer supported; there's no reason why the
`FreeBSD_version__` check is still required (now).
MFC after: 1 week
libnetbsd: import the `__nothing` macro
This macro is widely used in new NetBSD tests. Please see the comment
next to the imported macro for more details on its use.
Obtained from: NetBSD (c26cc77b3a0b2)
MFC after: 1 week
t_create.sh: use `ATF_TESTS_SH_SED` & remove local mods
This particular change replaces all local modifications to the test
script like so:
- Use `ATF_TESTS_SH_SED_test` with a sed(1) statement in the Makefile,
instead of the equivalent local modifications.
- Remove the need for expecting the output of newfs_msdos to be empty.
There isn't much to gain from deviating from the upstream NetBSD test--it's
just another local modification that would need to be carried forward. If
it's worth testing this FreeBSD-specific behavior, it should be in a
FreeBSD-specific test.
This makes moving new modifications to the script easier moving forward.
MFC after: 1 week
Revert "stand: compile ia32 EFI loader with -malign-double"
The loader shares types with various libraries that don't compile with
this flag. Revert for now.
Reported by: jrtc27
stand: compile ia32 EFI loader with -malign-double
The UEFI spec says:
> Structures are aligned on boundaries equal to the largest internal
> datum of the structure and internal data are implicitly padded to
> achieve natural alignment.
By default, structs containing members of type "long long" have 4 byte
alignment on i386. This caused some EFI structures to be subtly wrong.
Fix this by compiling the ia32 EFI loader with -malign-double, which
bumps the alignment up to 8 if such members are present.
MFC after: 3 days
daemon: Add option for output file mode
The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.
Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.
Reviewed by: kevans
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D54930
(cherry picked from commit a3b90a1f008365d9f62773998f89f9c872e2bed5)
daemon: Add option for output file mode
The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.
Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.
Reviewed by: kevans
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D54930
(cherry picked from commit a3b90a1f008365d9f62773998f89f9c872e2bed5)
daemon: Add option for output file mode
The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.
Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.
Reviewed by: kevans
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D54930
(cherry picked from commit a3b90a1f008365d9f62773998f89f9c872e2bed5)
diff: Improve directory loop detection
When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.
MFC after: 1 week
Reported by: Bakul Shah <bakul at iitbombay.org>
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55248
(cherry picked from commit 71569594d860a59d8362770a56d806e1d31fb946)
install: Expect EINTR while copying
Both copy_file_range() and read() / write() in our fallback loop can be
interrupted before copying anything at all, in which case it returns -1
and sets errno to EINTR. If that happens, we should retry, not fail.
While here, drop the size argument from copy() (we always want to copy
the entire file anyway) and add test cases which exercise the metalog
and digest functionality.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55168
(cherry picked from commit 0fb940fd63dd9b6d6b848421c53b1e9ac8387265)
cp: Expect EINTR while copying
Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR. If that happens, we should retry, not fail.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55167
(cherry picked from commit 7aa30669d6e04444b8ad1e4863a6e674fcac4afc)
install: Expect EINTR while copying
Both copy_file_range() and read() / write() in our fallback loop can be
interrupted before copying anything at all, in which case it returns -1
and sets errno to EINTR. If that happens, we should retry, not fail.
While here, drop the size argument from copy() (we always want to copy
the entire file anyway) and add test cases which exercise the metalog
and digest functionality.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55168
(cherry picked from commit 0fb940fd63dd9b6d6b848421c53b1e9ac8387265)
diff: Improve directory loop detection
When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.
MFC after: 1 week
Reported by: Bakul Shah <bakul at iitbombay.org>
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55248
(cherry picked from commit 71569594d860a59d8362770a56d806e1d31fb946)
pwd: Error out if writing to stdout failed
POSIX requires us to print a diagnostic and return a non-zero exit
code if writing to stdout failed.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55227
(cherry picked from commit 5b398611607b0dab2f2550ef73f62d41dab6fac5)
cp: Expect EINTR while copying
Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR. If that happens, we should retry, not fail.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55167
(cherry picked from commit 7aa30669d6e04444b8ad1e4863a6e674fcac4afc)
m4: Change defn processing order
Currently, defn pushes its arguments on the stack in order, which means
they are then processed in reverse order. POSIX does not specify what
order they are processed in, which arguably suggests that they should be
processed in the order they are listed. Push them in reverse order so
they will be processed in their original order. This matches GNU m4.
PR: 292937
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: obiwac, imp
Differential Revision: https://reviews.freebsd.org/D55116
(cherry picked from commit 25a8168f86a1222388475ce858da405e4d06c1c3)
pwd: Clean up and adopt POSIX semantics
According to POSIX, the default should be -L. Based on code history,
whoever first wrote BSD pwd(1) could not figure out how to implement
-L and therefore made -P the default (and only) option. Support for -L
was later added, but the default was never changed.
Clean up the code, make -L the default, and rewrite getcwd_logical() to
reject paths that contain dot or dot-dot, as required by POSIX.
MFC after: 1 week
Reviewed by: olce
Differential Revision: https://reviews.freebsd.org/D55146
(cherry picked from commit 2df923c5d2d02350abc29f61b603c5b9615b225c)
cp: Expect EINTR while copying
Both copy_file_range() and copy_fallback() can be interrupted before
they have read anything at all, in which case they return -1 and set
errno to EINTR. If that happens, we should retry, not fail.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55167
(cherry picked from commit 7aa30669d6e04444b8ad1e4863a6e674fcac4afc)
pwd: Error out if writing to stdout failed
POSIX requires us to print a diagnostic and return a non-zero exit
code if writing to stdout failed.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55227
(cherry picked from commit 5b398611607b0dab2f2550ef73f62d41dab6fac5)
m4: Change defn processing order
Currently, defn pushes its arguments on the stack in order, which means
they are then processed in reverse order. POSIX does not specify what
order they are processed in, which arguably suggests that they should be
processed in the order they are listed. Push them in reverse order so
they will be processed in their original order. This matches GNU m4.
PR: 292937
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: obiwac, imp
Differential Revision: https://reviews.freebsd.org/D55116
(cherry picked from commit 25a8168f86a1222388475ce858da405e4d06c1c3)
diff: Improve directory loop detection
When we're done processing a directory, remove its entry from the tree
of visited inodes, ensuring that we only report a loop when we encounter
a descendant-to-ancestor link, not when we encounter a cousin-to-cousin
or sibling-to-sibling link.
MFC after: 1 week
Reported by: Bakul Shah <bakul at iitbombay.org>
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55248
(cherry picked from commit 71569594d860a59d8362770a56d806e1d31fb946)
install: Expect EINTR while copying
Both copy_file_range() and read() / write() in our fallback loop can be
interrupted before copying anything at all, in which case it returns -1
and sets errno to EINTR. If that happens, we should retry, not fail.
While here, drop the size argument from copy() (we always want to copy
the entire file anyway) and add test cases which exercise the metalog
and digest functionality.
PR: 293028
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55168
(cherry picked from commit 0fb940fd63dd9b6d6b848421c53b1e9ac8387265)