ping: use CLOCK_REALTIME for ICMP Originate Timestamp
RFC 792 defines the ICMP Originate Timestamp field as milliseconds
since midnight UTC. However, ping(8) currently derives this value
from CLOCK_MONOTONIC, which represents time since an unspecified
starting point and is not related to UTC.
The issue was introduced by commit 1ad76f1b6047, which replaced
gettimeofday(2) with clock_gettime(CLOCK_MONOTONIC) for timekeeping
in ping(8).
Fix this by using CLOCK_REALTIME when generating the ICMP originate
timestamp.
Before:
$ ping -Mt -c1 127.0.0.1
ICMP_TSTAMP
PING 127.0.0.1 (127.0.0.1): 56 data bytes
[15 lines not shown]
llvm-*: Move all LLVM_BINUTILS symlinks to toolchain package
Some of the LLVM binary utilities were included in the Clang package
(because they did not set an explicit PACKAGE).
Add a new Makefile under clang/toolchain to create the symlinks and man
links for ar, c++filt, nm, and so on (without the llvm-* prefix) when
LLVM_BINUTILS is enabled (as it is by default).
PR: 293610
Reviewed by: bapt, ivy, brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55692
powerpc: refactor dmamap setup; free dmamap in error paths
* refactor the dmamap allocation / setup path for future code changes
to align with arm64 busdma code;
* free the dmamap allocation if the dma segment list can't be allocated;
* free the dmamap allocation during the busdma dmamem allocation path
if the actual memory allocation itself fails.
Locally tested:
* POWER9 ppc64le native boot, Raptor Engineering Blackbird
* POWER8 ppc6le, IBM POWER S822LC
https://reviews.freebsd.org/D56244
powerpc: busdma declaration shuffling
Shuffle some of the declarations around to match other implementations.
Expected to be a no-op.
Differential Revision: https://reviews.freebsd.org/D56243
powerpc: use local flags for bounce buffers instead of common flags
Migrate to using local flags for bounce buffers instead of the
common flag field.
Differential Revision: https://reviews.freebsd.org/D56208
powerpc: add in some busdma domain setup
* Implement the basic tag domain set routine
* Set the domain to the parent domain if provided
This is just plumbing for eventual work to re-allocate things into
the currently configured domain.
Differential Revision: https://reviews.freebsd.org/D55315
powerpc: create a tag with the parents implementation if supplied
If a parent tag is supplied then use its implementation.
Differential Revision: https://reviews.freebsd.org/D55314
powerpc: initial straight port of busdma_machdep.c -> busdma_bounce.c
This is a straight port of the code and doesn't yet handle
different implementations (which will be in a subsequent commit.)
Locally tested:
* G5 SMP (2x PPC970mp)
* power8 / power9 pseries QEMU VM
* power8 powernv
Differential Revision: https://reviews.freebsd.org/D55313
namei: Preserve ABI root for absolute symlinks before fallback
D40479 changed namei() so that an absolute symlink target
encountered during an ABI-root lookup restarts from the native root.
This helps the native fallback case, but it also makes successful
lookups inside an ABI root escape that root while following absolute
symlinks.
Only switch absolute symlink lookup to the native root after namei()
is already in the restarted/native fallback pass.
Do not mark the lookup as restarted merely because an absolute
symlink was encountered while still resolving inside the ABI root.
This preserves the intended native fallback behavior while keeping
absolute symlinks within a successfully resolved ABI-root path in
the ABI namespace.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 289739
[3 lines not shown]
Revert 00bee6fcd77f, which partially reverted libc++ commit aa7f377c965c
After base 966fb94cb357, this revert is no longer necessary: stdint.h
will unconditionally define macros such as `SIZE_MAX`, `UINT64_C`, and
others.
Submitted by: Nikolas Klauser <nikolasklauser at berlin.de>
MFC after: 1 month
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D56746
Define stdint.h macros unconditionally
Similar to glibc, define all the stdint.h macros such as `SIZE_MAX`,
`UINT64_C`, etc unconditionally. I.e. no longer check whether
`__STDC_CONSTANT_MACROS` or `__STDC_LIMIT_MACROS` are defined. See also
<https://sourceware.org/bugzilla/show_bug.cgi?id=15366>.
This is part of reverting base 00bee6fcd77f, which reverted an upstream
libc++ commit that eliminated libc++'s stdint.h wrapper header.
Submitted by: Nikolas Klauser <nikolasklauser at berlin.de>
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D56746
tail(1): Fix -r (reverse) to work on pseudo filesystems
Pseudo filesystems (e.g., procfs) advertise a zero file size.
Fix reverse() to handle such a case similarly as forward() so
that '-r' works on pseudo filesystems.
Signed-off-by: Aaron LI <aly at aaronly.me>
Reviewed by: pouria, Ricardo Branco <rbranco at suse.de>, des
Fixes: 1fb3caee7 ("tail: Do not trust st_size if it equals zero.")
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2080
(cherry picked from commit 4feeca3193c316c18472cd40f215446fda3bd739)
tail(1): Fix -r (reverse) to work on pseudo filesystems
Pseudo filesystems (e.g., procfs) advertise a zero file size.
Fix reverse() to handle such a case similarly as forward() so
that '-r' works on pseudo filesystems.
Signed-off-by: Aaron LI <aly at aaronly.me>
Reviewed by: pouria, Ricardo Branco <rbranco at suse.de>, des
Fixes: 1fb3caee7 ("tail: Do not trust st_size if it equals zero.")
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2080
(cherry picked from commit 4feeca3193c316c18472cd40f215446fda3bd739)
bsdinstall: Improve auto-partition message
Manually tuning ZFS for systems with <8GB ram hasn't been necessary at
least since the switch to OpenZFS. We have users reporting using 1GB RAM
with no manual tuning/issues. Further, the page this links to is a stale
wiki page, which is causing complaints. Remove this misleading note and
replace it with a similar message for UFS. While here, reword that note
to be a bit clearer.
PR: 287719
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D50971
(cherry picked from commit 5ed26c21e4ff1d478d4611abbf3dc14cc1b77244)
groups.7: New manual page of standard group names
Import groups(7) from NetBSD, with tweaks for our system. The group
list is sorted by GID. All the group names from /usr/src/etc/group
are described, except "uucp". The FILES section was added on top of
the original manual page.
PR: 264966
Relnotes: yes
MFC after: 3 days
Obtained from: NetBSD
Reviewed by: des, ziaee
Differential Revision: https://reviews.freebsd.org/D54114
(cherry picked from commit e09104dfb76a36b65a64bd315bd1520941c4beed)
Revert "build: provide a FORTIFY_SOURCE.<src file> override"
This reverts commit c46a0b590716144d772eeba83ca88d96ee12c2f1. It broke
the build and I'm not awake yet.
linux: Implement setfsuid(2) and setfsgid(2) as no-ops
These system calls exist to decouple the Linux filesystem credentials
from the effective credentials, avoiding signal exposure during
privilege transitions.
The signal permission model that motivated this was revised
in Linux 2.0, making these syscalls obsolete for new applications.
Implement both syscalls as no-ops that return the current effective
UID/GID as the previous filesystem UID/GID.
Linux returns the previous filesystem UID/GID for these syscalls
with no error indication.
Same for the equivalent setfsuid16() & setfsgid16() system calls.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 294879
Reviewed by: kib, pouria
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2175
amdsmu: Add Krackan Point support
Reviewed by: obiwac, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56619
Revert "release: Ship firmware from kmods repo on DVD"
As we did in 14.4, this needs to be backed out of 15.1 to fix the
build. We're going to ship kmods built on 15.0 instead of 15.1 on
the DVD but hopefully those will work.
This reverts commit b0fbed20ceb9b899e7e20bf785e9d303608bc7a0.
Approved by: re (cperciva)
fexecve(2): call out a scenario where you want !O_EXEC
We note a reason why you might need it, but there's an equally important
reason you may need to omit it: interpreted programs. Add a note
accordingly, along with the workaround configuration if there's reason
you can't help it.
PR: 294780
Reviewed by: Jan Bramkamp <crest_freebsd_rlwinm.de>, kib
Differential Revision: https://reviews.freebsd.org/D56704
stat: fix use of devname(3)
Besides being a little hard to parse through visually, this had its own
bug of inspecting st->st_mode to determine what to pass to devname(3),
which is only correct for st_rdev.
For st_dev, you're likely to be looking at files or directories and
attempting to assess what device they're located on, so the mode is
meaningless- we just have to assume that our filesystems are on
character devices and attempt to resolve st_dev as such.
Reviewed by: des, kib (previous version)
Differential Revision: https://reviews.freebsd.org/D56565