[go: up one dir, main page]

Skip to content
Unstable

Changes

Summary

  1. route: avoid overlapping strcpy (details)
  2. iichid: Soften "Interrupt setup failed" message (details)
  3. ota: Import 9f971fba471b from bsd-feature for 20240623 (details)
  4. ELF auxargs: reserve a slot for CheriABI use (details)
  5. mitigations(7): note that FORTIFY_SOURCE must be set in the env (details)
  6. nvme: Always lock and only avoid processing for recovery state (details)
  7. nvme: Lock when processing an abort completion command. (details)
  8. nvme: Optimize timeout code further (details)
  9. nvme: Warn if there's system interrupt issues. (details)
  10. malloc(9): extend contigmalloc(9) by a "slab cookie" (details)
  11. kern_malloc: remove '.' and '\n' from KASSERT/panic (details)
  12. tarfs: Fix typo. (details)
  13. wpa: Fix gcc build (details)
Commit 158f319428c10143ce2ffe766416207c75578931 by kevans
route: avoid overlapping strcpy

Passing overlapping buffers to strcpy yields an undefined result, so
let's avoid it. The copy doesn't really need to happen anyways, we can
just point to the domain part of the hostname.

This was discovered with _FORTIFY_SOURCE.

Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Reviewed by: allanjude, emaste, imp, melifaro (all previous version)
Differential Revision: https://reviews.freebsd.org/D32615
The file was modifiedsbin/route/route.c (diff)
Commit 0ac6cc3fd7473a7a8596fa73322a67fc1d78df53 by emaste
iichid: Soften "Interrupt setup failed" message

Users may interpret the message as a possible hardware error, but the
issue is in fact unimplemented functionality.  Reword the message to
avoid implying it is an error.

Reviewed by: wulf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46092
The file was modifiedsys/dev/iicbus/iichid.c (diff)
Commit 381c116afc1f4a775483a1b1a864488d37cc4b8a by imp
ota: Import 9f971fba471b from bsd-feature for 20240623

Jun 23, 2024
Fix signal for system-status test. Thanks to Tim van der Molen.
Rewrite if-else chain as switch. Thanks to Andrew Sukach.

May 27, 2024
Spelling fixes and removal of unneeded prototypes and extern.
Thanks to Jonathan Gray.

May 4, 2024
Fixed a use-after-free bug with ARGV for "delete ARGV".
Also ENVtab is no longer global. Thanks to Benjamin Sturz
for spotting the ARGV issue and Todd Miller for the fix.

May 3, 2024:
Remove warnings when compiling with g++. Thanks to Arnold Robbins.
The file was modifiedbugs-fixed/system-status.ok2 (diff)
The file was modifiedTODO (diff)
The file was modifiedproto.h (diff)
The file was modifiedmakefile (diff)
The file was modifiedlib.c (diff)
The file was modifiedrun.c (diff)
The file was modifiedmain.c (diff)
The file was modifiedtestdir/T.argv (diff)
The file was modifiedFIXES (diff)
The file was modifiedFIXES.1e (diff)
The file was modifiedREADME.md (diff)
The file was modifiedawk.h (diff)
The file was modifiedbugs-fixed/system-status.ok (diff)
The file was modifiedbugs-fixed/system-status.awk (diff)
The file was modifiedlex.c (diff)
The file was modifiedb.c (diff)
The file was modifiedtran.c (diff)
The file was modifiedbugs-fixed/ofs-rebuild.awk (diff)
The file was modifiedtestdir/T.csconcat (diff)
Commit cade8f6c118f304eb7c91a1d423b4a97ee466284 by brooks
ELF auxargs: reserve a slot for CheriABI use

Reserve slot 37 to avoid flag days downstream.

We currently use this slot in CheriBSD to maintain counters in userspace
while providing access to them vis sysctl.  CHERI support isn't landing
in FreeBSD quite yet (probably for 16 unless hardware access accelerates
radically), but it seems highly likely at this point so reserving slots
will limit future diffs in both directions.

Reviewed by: jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D46060
The file was modifiedsys/sys/elf_common.h (diff)
Commit 8f77be22904a91014bb14af30c7d88a5d31f2c51 by kevans
mitigations(7): note that FORTIFY_SOURCE must be set in the env

Some parts of the build will need to be able to override it, so it must
be set either in the environment or src-env.conf -- NOT src.conf.

Reviewed by: imp, markj
Sponsored by: Klara, Inc.
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D46070
The file was modifiedshare/man/man7/mitigations.7 (diff)
Commit 86909f7aeb68a5689e84829b0d7488f77b539846 by imp
nvme: Always lock and only avoid processing for recovery state

When we lose a race with the timeout code, shift towards waiting for
that timeout code to complete so we can acquire the lock. This way we
can make sure we're in 'normal' mode before processing I/O
completions. If we're not in 'normal' mode, then we're resetting and we
should avoid completions.

Sponsored by: Netflix
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D46024
The file was modifiedsys/dev/nvme/nvme_qpair.c (diff)
Commit e6d3ba4be27d86c0ade250b52cf9af380f7b4c34 by imp
nvme: Lock when processing an abort completion command.

When processing an abort completion command, we have to lock. But we
have to lock the qpair of the original transaction (not the abort we're
completing). We do this to avoid races with checking the completion id
to tr mapping array, as well as to manually complete it.

Note: we don't handle the completion status of 'Asked to abort too many
transactions at once.' That will be fixed on subsequent commits. Add a
note to that effect for now since it's a harder problem to solve.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D46025
The file was modifiedsys/dev/nvme/nvme_qpair.c (diff)
Commit aa41354349c16ea7220893010df78b47d67d0f74 by imp
nvme: Optimize timeout code further

Optimize timeout code based on three observations.

(1) The tr queues are sorted in order of submission, so the first one
    that could time out is the first "real" one on the list.
(2) Timeouts for a given queue are all the same length (well, except
    at startup, where timeout doesn't matter, and when you change it
    at runtime, where timeouts will still happen eventually and the
    difference isn't worth optimizing for).
(3) Calling the ISR races the real ISR and we should avoid that better.

So now, after checking to see if the card is there and working, the
timeout routine scans the pending tracker list until it finds a non-AER
tracker. If the deadline hasn't passed, we return, doing nothing
further.  Otherwise, we call poll completions and then process the list
looking for timed out items.

This should move the timeout routine to touching hardware only when it's
really necessary. It thus avoids racing the normal ISR, while still
timig out stuck transactions quickly enough.

There was also some minor code motion to make all of the above flow more
nicely for the reader.

When interrupts aren't working at all, then this will increase latency
somewhat. But when interrupts aren't working at all, there's bigger
problems and we should poll quite often in that case. That will be
handled in future commits.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D46026
The file was modifiedsys/dev/nvme/nvme_qpair.c (diff)
Commit bb7f7d5b5201cfe569fce79b0f325bec2cf38ad2 by imp
nvme: Warn if there's system interrupt issues.

Issue a warning if we have system interrupt issues. If you get this
warning, then we submitted a request, it timed out without an interrupt
being posted, but when we polled the card's completion, we found
completion events. This indicates that we're missing interrupts, and to
date all the times I've helped people track issues like this down it has
been a system issue, not an NVMe driver isseue.

Sponsored by: Netflix
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D46031
The file was modifiedshare/man/man4/nvme.4 (diff)
The file was modifiedsys/dev/nvme/nvme_private.h (diff)
The file was modifiedsys/dev/nvme/nvme_qpair.c (diff)
Commit 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b by bz
malloc(9): extend contigmalloc(9) by a "slab cookie"

Extend kern_malloc.c internals to also cover contigmalloc(9) by a
"slab cookie" and not just malloc/malloc_large.  This allows us to
call free(9) even on contigmalloc(9) addresses and deprecate
contigfree(9).  Update the contigmalloc(9) man page accordingly.

The way this is done (free(9) working for contigmalloc) will hide the
UMA/VM bits from a consumer which may otherwise need to know whether
the original allocation was by malloc or contigmalloc by looking at
the cookie (likely via an accessor function).  This simplifies
the implementation of consumers of mixed environments a lot.

This is preliminary work to allow LinuxKPI to be adjusted to better
play by the rules Linux puts out for various allocations.
Most of this was described/explained to me by jhb.

One may observe that realloc(9) is currently unchanged (and contrary
to [contig]malloc/[contig]free an implementation may need access
the "slab cookie" information given it will likely be implementation
dependent which allocation type to use if size changes beyond the
usable size of the initial allocation).

Described by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D45812
The file was modifiedsys/kern/kern_malloc.c (diff)
The file was modifiedshare/man/man9/contigmalloc.9 (diff)
Commit c0df224ba5b1fe6257dd197f8298bf59fb6e520f by bz
kern_malloc: remove '.' and '\n' from KASSERT/panic

KASSERT and panic calls should not have a '.' at the end of the message
and do not need '\n'.  Remove these.

No functional changes.

Reported by: markj (during review of D45812)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: markj, kib
Differential Revision: https://reviews.freebsd.org/D46093
The file was modifiedsys/kern/kern_malloc.c (diff)
Commit 124ae0e8af8fbc8384a660583f47f112f392395e by des
tarfs: Fix typo.

MFC after: 3 days
PR: 280354
The file was modifiedshare/man/man4/tarfs.4 (diff)
Commit 8880825df1f805fc02dbb8476df8183d4ec3781c by cy
wpa: Fix gcc build

Order of libraries still matters with GCC toolchains. Moving the
wpapasn library before the wpacommon specification resolves the link
problem.

This issue was not detected by make universe.

Fixes: a90b9d015907
MFC after: 2 months
X-MFC with: a90b9d015907
The file was modifiedusr.sbin/wpa/wpa_supplicant/Makefile (diff)