nfscl: Fix a crash when a readdir entry has nul in it
Commit 026cdaa3b3a9 added a check for a nul or "/" in a file
name in a readdir reply. Unfortunately, the minimal testing
done on it did not detect a bug that can cause the client
to crash.
This patch fixes the code so that it does not crash.
Note that a NFS server will not normally return a file
name in a readdir reply that has a nul or "/" in it,
so the crash is unlikely.
PR: 283965
(cherry picked from commit f9f0a1d61c7b97c705246c747baec385e0592966)
nfscl: Fix a crash when a readdir entry has nul in it
Commit 026cdaa3b3a9 added a check for a nul or "/" in a file
name in a readdir reply. Unfortunately, the minimal testing
done on it did not detect a bug that can cause the client
to crash.
This patch fixes the code so that it does not crash.
Note that a NFS server will not normally return a file
name in a readdir reply that has a nul or "/" in it,
so the crash is unlikely.
PR: 283965
(cherry picked from commit f9f0a1d61c7b97c705246c747baec385e0592966)
Use ffs_sbget() to replace open-coded superblock reload.
No functional change intended.
Tested-by: Peter Holm
(cherry picked from commit c18a6c15f4152029b6d1d0f64aa1ff36faceb9b2)
riscv nexus: Remove support for I/O port resources
RISC-V doesn't natively support I/O port resources. PCI I/O port BARs
are remapped to memory resources by PCI bridge drivers before the
request is passed up to the nexus layer.
Reviewed by: jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D48582
arm64 nexus: Remove support for I/O port resources
arm64 doesn't natively support I/O port resources. PCI I/O port BARs
are remapped to memory resources by PCI bridge drivers before the
request is passed up to the nexus layer.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D48581
EARLY_DRIVER_MODULE: use designated initializers
It helps the reader to parse the macro definition, with respect to how
the arguments are mapped to the structure members. No functional change
intended.
Reviewed by: imp, jhb
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48489
machine/param.h: drop __HAVE_ACPI define
It is no longer used anywhere (since 62508c531e0f), and not defined for
arm64 which also supports ACPI.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48486
pci: cleanup __PCI_REROUTE_INTERRUPTS
This flag was used as a transition for differing pcib implementations.
Today it is defined for all supported architectures, and can be removed.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D48485
dtrace: Use size_t instead of uintptr_t to represent buffer offsets
This eases porting of DTrace to CHERI, where uintptr_t and size_t aren't
interchangeable.
No functional change intended.
Reviewed by: Domagoj Stolfa <domagoj.stolfa at gmail.com>
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D48625
icmp6: Fix ICMP6 message type counters
Previously this macro would always increment the first counter in the
histogram array.
PR: 279975
Fixes: 60d8dbbef075 ("netinet: add a probe point for IP, IP6, ICMP, ICMP6, UDP and TCP stats counters")
Sponsored by: Klara, Inc.
firewire: Add deprecation notice
This was originally discussed as part of FreeBSD 15 planning, but did
not happen in time. Add the deprecation notice now, with an expectation
that it will be removed before FreeBSD 16.
Reviewed by: brooks, imp
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48598
scmi: Add sysctl transport properties
Expose as read-only the configured transport properties.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47428
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add optional asynchronous handling of replies
Add the core logic to handle the replies to pending command in an
asynchronous manner.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47426
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Refactor scmi_request internal logic
Split scmi_request internals into a TX and an RX phase, which will be
called, anyway, in sequence as before when a normal transmission is
requested.
No functional change.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47425
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add scmi_token_reserve helper
During normal operation, the SCMI stack, upon each transmission attempt,
takes care to automatically pick an appropriate, monotonically increasing,
sequence number to fill-in the token field in the egressing message.
This does not cope well with the alternative scenario in which, instead,
a complete and fully formed message is provided upfront: in such a case the
SCMI stack will have to use the already provided sequence number, embedded
in the message, to track such transaction.
Add a method to attempt to reserve a specific sequence number to be used
when a fully firmed (raw) message is handled.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Pull Request: https://reviews.freebsd.org/D47424
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Add SDT traces to the core stack
Add a few basic traces to track SCMI messages lifecycle.
Tested on: Arm Morello Board
Reviewed by: Andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47427
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Fix race on timed out transmissions
When a waited-for outstanding request is determined to have timed out,
mark such request immediately as such, so as to avoid any possible race on
the IRQ path with code path evaluating that same timed out condition.
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47419
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>
scmi: Fix token bitmask
By the SCMI specification the message sequence number field is 10-bit long.
Fix accordingly the used bitmask.
Fixes: d220b1cf02ce ("scmi: Extend and refactor SCMI shmem support")
Tested on: Arm Morello Board
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D47418
Signed-off-by: Cristian Marussi <cristian.marussi at arm.com>