In-tree Clang is unaware of the N2680 fixed-width modifier `w` and emits
a warning when used.
PR: 299631
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D60939
Testing on a Dell AMD Ryzen AI 5 PRO 435 laptop shows that the same
diagnostic information is valid.
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
These are Single-Pair Ethernet types (SPE) from 802.3cg. smsc sets the
link flag only if mii_media_active is one of a known set of media types.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60745
After reset the driver enables three LED outputs by writing 1s to
the appropriate GPIO/LED configuration bits in the LED & GPIO
configuration register LED_GPIO_CFG.
The LED Select (LED_SEL) bit in LED_GPIO_CFG chooses between two LED
modes:
0: Speed, Link+Activity, Full Duplex
1: Speed, Link, Activity
If an EEPROM is present LED_SEL is initialized from bit 1 in the
EEPROM's configuration flags value. If no EEPROM is present this bit
defaults to zero.
Previously we wrote to all bits in the register, clearing LED_SEL. A
device with LED_SEL set by the EEPROM would thus not have correct LEDs.
Now we read the current value of LED_GPIO_CFG and just set the three
LED configuration bits, as Linux does in commit 52a2f0608366 ("net: usb:
smsc95xx: fix changing LED_SEL bit value updated from EEPROM").
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60828
SMSC_HW_CFG_PSEL indicates that an external PHY is present. Skip the
internal PHY initialization when set and store the ID of the detected
PHY.
Reviewed by: br
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60744
The driver only allowed writes to the expected phy (i.e., sc->sc_phyno),
and reads were never filtered. sc_phyno is already passed to
mii_attach() as phyloc, so nothing tries to issue MDIO writes to other
addresses and the check is not required.
Remove the check in advance of supporting external PHYs at arbitrary
addresses.
Tested on Microchip's EVB-LAN9500A-LC LAN9500A evaluation board.
Sponsored by: The FreeBSD Foundation
Sponsored by: Microchip (Hardware)
Differential Revision: https://reviews.freebsd.org/D60743
External retpoline thunks for amd64 and i386 were added in commit
74d971fe15 ("x86: Add external retpoline thunk"). Use them when
WITH_KERNEL_RETPOLINE is set.
There should not be any material performance impact -- the call sites
are identical, and this just replaces (on amd64) compiler-generated
__llvm_retpoline_r11 functions in each object with our
__x86_indirect_thunk_r11.
After this change we could implement boot-time patching, replacing
__x86_indirect_thunk_r11 with just jmp %r11 when retpoline is not
required.
Note on i386: An i386 build WITH_KERNEL_RETPOLINE was successful, but
has not been extensively tested. Clang may use registers other than
just eax on i386 and so in the future additional thunks beyond the one
added in 74d971fe15 could be required for i386. Patches are welcome
if this is important to you.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
100BASE-T1 (IEEE 802.3bw) and 1000BASE-T1 (IEEE 802.3bp) are Single-Pair
Ethernet (SPE) standards intended for use in automotive and industrial
applications.
Reviewed by: kbowling
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60864
We add -dirty to the uname version string if the tree does not match the
reported hash. Previously, staged but uncommitted changes were ignored.
Noted by naddy@ in D60606.
Reviewed by: cperciva, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60722
The TX interrupt handler checked MGB_INTR_STS_RX(qidx) instead of
MGB_INTR_STS_TX(qidx) -- presumably a copy-paste issue.
Because the driver does not use TX interrupts so there was no actual
issue in practice.
Reviewed by: adrian
Sponsored by: The FreeBSD Foundation
Fixes: 8890ab7758 ("Introduce if_mgb driver for Microchip LAN743x PCIe NIC")
Differential Revision: https://reviews.freebsd.org/D60550
The initial port of the CTF tools had a FreeBSD-specific patch to print
the termination message but exit with a 0 status, with a goal of getting
as much to build as possible and silently ignoring any issues.
We're now past the point where silently ignoring failures makes sense.
Any future issues need to be found and addressed.
PR: 276826
PR: 276930 [exp-run]
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43743
Some of these messages looked at first glance like they were incorrectly
concatenated, e.g. "installing DIRS testsFILESDIR". Add a colon to
clarify.
Reviewed by: brooks, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60525
For rm -f it's not an error if the files do not exist. If there's any
other error it's presumably a real issue, so avoid ignoring all errors.
Reviewed by: brooks, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56714
Build targets should generally be run as an unprivileged user. Even
though building as root is discouraged many users do so, so just start
with a warning.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D50352
The utility targets described by this comment are in fact related to
building (buildworld), not installing (which is included in
`make world`).
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56715
This allows use of -mindirect-branch=thunk-extern, and is only a few
bytes of dead code if not used.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60524
The majority of lines of code currently in fwdownload.c come from ken@'s
rework in commit 0e358df062 ("Revamp camcontrol(8) fwdownload support
and add the opcodes subcommand."). Add the appropriate copyright.
Approved by: ken
I added the text when this driver was merely an import of
https://github.com/Aquantia/aqtion-freebsd with patches from ports applied.
nprice@ resolved issues and added support for newer cards and the note is
no longer applicable.
Reviewed by: adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59909
Fixes: 550db3d6f5 ("sdhci: Initial support for the SpacemiT K1 sdhci controller")
Reviewed by: bnovkov
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59083
If next_callback_id wraps we could end up with two callbacks with the
same ID. I recommitted the original change despite this issue in order
to fix the libusb API as soon as possible after SHLIB_MAJOR was bumped
in commit 527a82474c (libusb: versioning symbols).
It's very unlikely in practice that software will register and
deregister a sufficient number of callbacks to trigger this, but it is
a real issue to be fixed in a subsequent commit.
Sponsored by: The FreeBSD Foundation
Firmware on a test machine applied NX to non-code allocations, which
resulted in a fault when jumping to the trampoline.
Reviewed by: kib
Tested by: Jim Huang Chen <[email protected]>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58383
vt(4) does not (currently) support changing the video mode. Report that
-i mode is not supported rather than printing an empty list.
PR: 207411
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58163
The fallback glyph is stored at index 0, and does not need to be
inserted into a mapping.
Previously there was a dead store of add_glyph's return value for the
fallback case, which upset Clang's static analyzer. Now, cast the
return value to (void) to make it clear this is intentional.
Also change add_glyph's fallback parameter to a c99 bool to make its use
more clear.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57174
RANLIB is not used by our build, so there is no need to set it.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58156
I introduced it in commit 1b49115a40 ("Promote llvm-cov to a
standalone option"). llvm-cov was previously enabled as part of the
CLANG_EXTRAS option. I made it a standalone, default-enabled option for
parity with the tools provided by the GCC-based toolchain.
We no longer provide an in-tree GCC toolchain. Now, just build llvm-cov
along with Clang to simplify build infrastructure.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58155
The new world may use system calls that are not in the currently-running
kernel, so we cannot chroot into the new environment to run `make
installworld`, `etcupdate`, etc. Partially revert commit 16702050ac
("beinstall: perform pre-installworld steps") and switch back to using
DESTDIR for installworld and so on.
Reported by: olivier
Reviewed by: olivier
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50682
Full release notes are available at
https://www.openssh.com/txt/release-10.4
Selected highlights from the release notes:
Potentially-incompatible changes
--------------------------------
* sshd(8): configuration dump mode ("sshd -G") now writes directives
in mixed case (e.g. "PubkeyAuthentication") whereas previously it
emitted only lower-case names.
* ssh(1), sshd(8): make the transport protocol stricter by
disconnecting if the peer sends non-KEX messages during a post-
authentication key re-exchange. Previously a malicious peer could
continue sending non-key exchange messages without penalty. These
would be buffered, causing memory to be wasted up until the
connection terminated or the server/client hit a memory limit.
Implementations that do not restrict messages sent during key
exchange as per RFC4253 section 7.1 may be disconnected.
Reported by Marko Jevtic.
Changes since OpenSSH 10.3
==========================
This release contains a number of security fixes as well as general
bugfixes and a couple of new features.
Security
========
* sftp(1): when downloading files on the command-line using
"sftp host:/path .", a malicious server could cause the file to
be downloaded to an unexpected location. This issue was identified
by the Swival Security Scanner.
* scp(1): when copying files between two remote destinations, do
not allow a malicious server to write files to the parent
directory of the intended target directory. This issue was
identified by the Swival Security Scanner.
* sshd(8): DisableForwarding=yes didn't override PermitTunnel=yes
as it was documented to do. Note that PermitTunnel is not enabled
by default. Reported independently by Huzaifa Sidhpurwala of
Redhat and Marko Jevtic.
* sshd(8): avoid a potential pre-authentication denial of service
when GSSAPIAuthentication was enabled (this feature is off by
default). This was not mitigated by MaxAuthTries, but would be
penalised by PerSourcePenalties. This was reported by Manfred
Kaiser of the milCERT AT (Austrian Ministry of Defence).
* sshd(8): fix a number of cases where the minimum authentication
delay was not being enforced. Reported by the Orange Cyberdefense
Vulnerability Team.
* ssh(1): fix a possible client-side use-after-free if the server
changes its host key during a key reexchange. This was reported by
Zhenpeng (Leo) Lin of Depthfirst.
New features
------------
* All: add experimental support for a composite post-quantum
signature scheme that combines ML-DSA 44 and Ed25519 as specified
in draft-miller-sshm-mldsa44-ed25519-composite-sigs.
This scheme is not enabled by default. To use it, you'll need
to add it to HostKeyAlgorithms, PubkeyAcceptedAlgorithms, etc.
Keys may be generated using "ssh-keygen -t mldsa44-ed25519".
Bugfixes
--------
* sshd(8): avoid sending observably different messages for valid vs
invalid users in GSSAPIAuthentication (disabled by default).
* ssh(1), sshd(8): fix several bugs that incorrectly
classified bulk traffic as interactive. bz3972, bz3958
* ssh-keygen(1), ssh-add(1): skip unsupported key types when
downloading resident keys from a FIDO token. Previously, downloads
would abort when one was encountered. GHPR657
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58083
If git is installed and .git exists but git rev-parse failed to report a
hash we previously produced just "-dirty" as the git revision. Gate the
git commit count and -dirty check on the rev-parse passing.
Reviewed by: jlduran
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57995
In terminate_with_diagnostics the cast_to arguments were swapped, so it
always failed. The diagnostic handler produced output like "Terminating
due to uncaught exception 0x24891e08000 of type std::runtime_error".
Now, e->what() will actually be included in the output, e.g.
"Terminating due to uncaught exception 0x2bba49208000 'Model file
doesn't exist' of type std::runtime_error".
Reviewed by: dim
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57822
Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI
We already have some components (such as mail and tcsh) that build
without TIOCSTI defined. This is (existing portability support in those
projects.
Simplify things for downstreams by extending this approach to this
additional TIOCSTI user.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D50614
On Linux struct ifinfomsg uses ARPHRD_* values, while we used IFT_*
types (which derive from SNMP ifType definitions in RFC 1573).
Update the header to reflect this.
PR: 272144
Reviewed by: pouria
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57334
This is consistent with allow_read_dir and allow_ptrace.
PR: 293485
Fixes: c289291a67 ("tty: Add sysctl knob to globally disable TIOCSTI")
Sponsored by: The FreeBSD Foundation
Discarding m_free's return value will result in an mbuf leak if the mbuf
was in a chain.
In general we should use m_freem if the mbuf may be in a chain, or
assert that the return was NULL. There will not be a chain here due to
m_megapullup, so add an assert.
Reviewed by: ae
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57479
nlmsghdr::nlmsg_len and nl_buf::offset are u_int. Make msglen match.
Reviewed by: pouria, glebius
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57474
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by: markj, bz, kp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57476
Most 32-bit architecture support has been deprecated for FreeBSD 16.
Reviewed by: des
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57472
Most architectures have the same signedness for char and wchar_t, but
powerpc has the unusual combination of unsigned char and signed wchar_t.
Reviewed by: des, jhb, markj
Sponsored by: The FreeBSD Foundation
The five link flags get lost in prose.
Reviewed by: ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57418
Cannot strip the target if creating a link.
Reviewed by: des
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57398
We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux. Return EINVAL for unknown bits,
as Linux does.
This also moves the translation inline into linux_inotify_add_watch.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387
It is akin to nanosleep(2) and does not access global namespaces.
It should be permitted in capability mode.
Reviewed by: vangyzen
Fixes: 3f8455b090 ("Add clock_nanosleep()")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57343
This doesn't really matter, as we trust that the installer tarballs are
not malicious, but it doesn't hurt to set these flags.
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57274
This is copied from the check in kern_kill.
Reviewed by: markj, oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57244
Previously write_fnt_source always returned 0, silently discarding
errors. Return rv so that errors set vtfontcvt's shell exit
appropriately.
Sponsored by: The FreeBSD Foundation
Taking the address of an OOB array element is UB, even if not
dereferenced.
Reviewed by: des, bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57172
Even though it is not dereferenced, it is UB to take the address of an
out of bounds array element.
Reviewed by: pouria, bz, des, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57158
Commit 876a17321c removed the a.out Xref as nlist(3) no longer
supports a.out, but this left nlist(3) without a reference to a page
documenting struct nlist.
struct nlist is documented in both a.out(5) and stab(5), so add an Xref
to the latter.
Reported by: brooks
Fixes: 876a17321c ("nlist.3: Replace a.out(5) Xref with elf(5)")
It is a relic from a.out days and is poorly specified. Although ELF
support was added to nlist, there are better ways to access ELF data.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57078
nlist() requires section headers, and currently fetches symbol names
only from SHT_SYMTAB,
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57065
ELF support was added to nlist() in 1997, and a.out support was removed
in 2020. The man page was not updated for either of these changes.
Fixes: 77909f5978 ("Initial elf nlist support, ...")
Fixes: 86cfa7e70b ("nlist: retire long-obsolete aout support")
Sponsored by: The FreeBSD Foundation
A bug fix was committed locally and submitted upstream. Document it in
our upgrade instructions, as these sometimes take a long time before
getting merged.
Sponsored by: The FreeBSD Foundation
Full release notes are available at
https://www.openssh.com/txt/release-10.3
Selected highlights from the release notes:
* ssh(1), sshd(8): remove bug compatibility for implementations
that don't support rekeying. If such an implementation tries to
interoperate with OpenSSH, it will now eventually fail when the
transport needs rekeying.
* ssh(1), sshd(8): support IANA-assigned codepoints for SSH agent
forwarding, as per draft-ietf-sshm-ssh-agent. Support for the new
names is advertised via the EXT_INFO message. If a server offers
support for the new names, then they are used preferentially.
* ssh(1): add a ~I escape option that shows information about the
current SSH connection.
* sshd(8): add 'invaliduser' penalty to PerSourcePenalties, which is
applied to login attempts for usernames that do not match real
accounts. Defaults to 5s to match 'authfail' but allows
administrators to block such attempts for longer if desired.
* Support the ed25519 signature scheme via libcrypto.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56999
This device is not yet supported.
Unfortunately some recently purchased UB400 dongles also contain this
Realtek IC.
Sponsored by: The FreeBSD Foundation