| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define _ALIGNBYTES using sizeof(void *) (no functional change on any
existing architecture) which will allow it to work with CHERI were we
must align things up to capability alignment.
In _ALIGN, replace integer manipulation which does not preserve pointer
provenance with a type and provenance preserving builtin. This requires
modest changes in code which assumes _ALIGN returns an integer, but
those are relatively rare.
Reviewed by: kib, markj
Effort: CHERI upstreaming
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D53947
|
| |
|
|
|
|
|
|
|
|
|
| |
Without the void * casts, the compiler complains about an alignment
requirement increase.
Reviewed by: kib, markj
Obtained from: CheriBSD
Effort: CHERI upstreaming
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D53946
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add an nscache specific inline function to calculate the misalignment
rather than adding and subtracting _ALIGN(p) and p which can take the
buffer far out of bound (undefined behavior in C and unsupported on
CHERI).
Reviewed by: kib
Effort: CHERI upstreaming
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D53945
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to the latest makefiles etc from bmake.
Mostly this just replaces sjg license with an SPDX tag.
There are also some improvements to meta2deps* and optimizations
to leverage POSIX shell features in some target scripts.
Default isPOSIX_SHELL to ':' in sys.mk to enable these.
Use :sh1 in M_type if possible.
bsd.progs.mk has diverged too much to touch beyond making the
SPDX tag update.
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D54150
|
| |
|
|
|
|
|
|
|
|
|
|
| |
ipfilter options are erased and reset to default when ipfilter is
disabled. This results in nullifying options from rc.conf that were
previously set.
8d6feaaaa26f, which added this code, was incorrect as it was for a bug in
ipfilter 4.2.28 and no longer applies to ipfilter 5.1.2.
Fixes: 8d6feaaaa26f
MFC after: 1 day
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- change the state to SPLICE_EXCEPTION to allow so_unsplice() to work
to cleanup failed splices (fixes socket reference leak)
- NULL out sp->dst when unsplicing from so_splice() before so2 has been
been referenced.
- Deal with a null sp->dst / so2 in so_unsplice
- Fix asserts that talked about sp->state == SPLICE_INIT; that state
is not possible here.
Differential Revision: https://reviews.freebsd.org/D54157
Reviewed by: markj
Sponsored by: Netflix
Fixes: c0c5d01e5374 ("so_splice: Synchronize so_unsplice() with so_splice()")
MFC after: 3 days
|
| |
|
|
| |
MFC after: 1 day
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove type and rid arguments from
bhnd_bus_(activate|deactivate|release)_resource. This should have
been done earlier to match the changes made to bus_release_resource,
etc.
While fixing up the callers, remove rid members from softc structures
since the only time a value is needed is as a constant input to
bhnd_bus_alloc_resource*.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53410
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53409
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53408
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53407
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53406
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53405
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53404
|
| |
|
|
|
| |
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53403
|
| |
|
|
|
|
|
|
|
| |
The wrapper functions such as bus_alloc_resource_any() still support
passing the rid by value or pointer, but the underlying implementation
now passes by value.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D53402
|
| |
|
|
|
|
|
|
|
| |
This patch was based on an incorrect assumption that the linear buffer
chain for an snl_writer only contained the netlink message body.
This reverts commit 828df4d36d9d5a6ca0dcc294d65572b4a0474142.
Sponsored by: AFRL, DARPA
|
| |
|
|
|
|
|
|
| |
This is a preparation step for a future addition to this file. This is
also closer to what Linux does.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
|
| |
|
|
| |
Fixes: fbf05d2147b1add8b760be166c4b1fd4499ebce8
|
| |
|
|
|
| |
Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D54147
|
| |
|
|
|
|
|
|
|
| |
This used a separate allocation when rman was first imported (back
when the lock was a pre-SMPng "simplelock" instead of a mutex).
Reported by: des
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D54143
|
| |
|
|
|
|
|
|
| |
Use TAILQ_HEAD_INITIALIZER and MTX_SYSINIT to remove the 'once' code
from rman_init.
Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D54142
|
| |
|
|
|
| |
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D53764
|
| |
|
|
| |
Reported by: ziaee
|
| |
|
|
|
|
| |
Reviewed by: np, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D53030
|
| |
|
|
|
|
|
| |
Grammar fix after previous commit.
MFC after: 1 week
X-MFC-with: dbc4a1c69191909a7210cad6da46b755557d0d34
|
| |
|
|
|
|
|
| |
Further explain that trim(8) is not for trimming free blocks
in populated file systems/ZFS pools, as people still take it wrong sometimes.
MFc after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Avoid a possible use-after-free in the rx path.
ovpn_decrypt_rx_cb() calls ovpn_finish_rx() which releases the lock,
but continues to use the peer.
Ensure that the peer cannot be freed until we're sure all potential
users have stopped using it (i.e. have left net_epoch).
Reported by: Kevin Day <kevin@your.org>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Unlike in C23 where it's a typedef, char8_t is a built in type in
C++20. Recognise it as such.
PR: 291449
Reported by: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Approved by: markj (mentor)
Reviewed by: imp
Fixes: f0e541118c374869a8226eaa1320bb6eda248a20
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54124
|
| | |
|
| |
|
|
| |
MFC after: 1 week
|
| |
|
|
|
| |
Sponsored by: NVidia networking
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
It is now provided by regular string.h. While there, remove stale
$FreeBSD$ svn tag, and add include guards.
Sponsored by: NVidia networking
MFC after: 1 week
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54066
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54066
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If the fs->m page was found invalid on the object queue, PG_ZERO flag is
stale. Track the source of the page in the new fault state variable
m_needs_zero, and ignore PG_ZERO if the page did not came from the
allocator.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53963
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53963
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally after partitions are created by the installer, the 'mount'
script is used to mount the target disk partitions under /mnt. The
tail end of this script also mounts a couple of additional filesystems
under /mnt so that chrooted programs can work such as devfs and
/packages.
When the "Shell" option is used to permit the user to manually mount
the destination filesystem, the "mount" script is not used as the user
is instructed to mount the target filesystems and construct
/mnt/etc/fstab, etc. However, this means that the user is responsible
for mounting devfs (which is not included in /etc/fstab) and /packages
as well. The help message for the "Shell" option doesn't mention
these requirements, so users may not know to do so. This can lead to
confusing errors as chrooted commands can fail to find needed /dev
entries. For example, running fwget to fetch wireless firmware fails
because /dev/pci doesn't exist.
To make this less painful for users using this option, split out the
bottom half of the 'mount' script that mounts these non-fstab-related
filesystems into a separate 'mount_aux' script. Invoke 'mount_aux'
after using "Shell" to create the filesystem to ensure that these
filesystems are always present.
PR: 290901
Reported by: Peter <freebsd@peterk.org>
Tested by: Peter <freebsd@peterk.org>
Differential Revision: https://reviews.freebsd.org/D53770
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Unicode 17.0 adds 4803 characters, for a total of 159,801 characters.
The new additions include 4 new scripts:
- Sidetic
- Tolong Siki
- Beria Erfe
- Tai Yo
https://www.unicode.org/versions/Unicode17.0.0/
|
| |
|
|
|
|
| |
MFC after: 3 days
Signed-off-by: Seth Hoffert <seth.hoffert@gmail.com>
Closes: https://github.com/freebsd/freebsd-src/pull/1919
|
| |
|
|
|
|
| |
MFC after: 1 week
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D54038
|
| |
|
|
|
|
|
|
|
| |
Add struct mtx to struct lltable and stop using IF_AFDATA_LOCK, that
was created for a completely different purpose. No functional change
intended.
Reviewed by: zlei, melifaro
Differential Revision: https://reviews.freebsd.org/D54086
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old approach where we go through the list of interfaces and count them
has bugs. One obvious bug with this dynamic translation is that once an
Ethernet interface in the middle of the list goes away, all interfaces
following it would change their Linux names.
A bigger problem is the ifnet arrival and departure times. For example
linsysfs has event handler for ifnet_arrival_event, and of course it wants
to resolve the name. This accidentially works, due to a bug in
if_attach() where we call if_link_ifnet() before invoking all the event
handlers. Once the bug is fixed linsysfs won't be able to resolve the old
way. The other side is ifnet_departure_event, where there is no bug, the
eventhandlers are called after the if_unlink_ifnet(). This means old
translation won't work for departure event handlers. One example is
netlink. This change gives the Netlink a chance to emit a proper Linux
interface departure message.
However, there is another problem in Netlink, that the ifnet pointer is
lost in the Netlink translation layer. Plug this with a cookie in netlink
writer structure that can be set by the route layer and used by the Netlink
Linux translation layer. This part of the diff seems unrelated, but it is
hard to make it a separate change, as the old KPI goes away and to use the
new one we need the pointer.
Differential Revision: https://reviews.freebsd.org/D54077
|
| |
|
|
|
|
|
|
| |
Remove linux_use_real_ifname(). It is no longer used outside of the
file since 3ab3c9c29cf0. There is no functional change.
Reviewed by: melifaro, dchagin
Differential Revision: https://reviews.freebsd.org/D54076
|
| |
|
|
|
|
|
|
|
| |
rufetch() has several other effects besides clearing these per-thread
stats most of which are explicitly discarded by the subsequent calls
to ruxreset(). Just clear the relevant stats directly instead.
Reviewed by: olce, kib, markj
Differential Revision: https://reviews.freebsd.org/D54050
|
| |
|
|
|
|
|
|
|
|
|
| |
proc0_post aims to reset the CPU usage accounting for all threads and
processes in the system to zero once the time of day is verified.
However, not all of the per-thread stats were not being cleared,
resulting in over-reported time for thread0 post-boot.
Reviewed by: olce, kib, markj
Fixes: bed4c5241663 ("Implement RUSAGE_THREAD. Add td_rux...")
Differential Revision: https://reviews.freebsd.org/D54040
|
| |
|
|
|
|
|
|
| |
Use it in proc0_post to reset per-process CPU usage.
Suggested by: olce
Reviewed by: olce, kib
Differential Revision: https://reviews.freebsd.org/D54049
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment ipfs(8) is a tool that can be easily abused. Though the
concept is sound the implementation needs some work.
ipfs(8) should be considered experimental at the moment.
This commit also makes ipfs support in the kernel optional.
Reviewed by: emaste, glebius
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53787
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a
jail can manage its own ipfilter rules, pools, and settings. A jail's
control over its own ipfilter rules and settings may not be desireable.
The default is jail access to ipfilter is denied.
The host system can stil manage a jail's rules by attaching the rules,
using the on keyword, limiting the rule to the jail's interface. Or
the sysctl/tunable can be enabled to allow a jail control over its own
ipfilter rules and settings.
Implementation note: Rather than store the jail_allowed variable,
referenced by sysctl(9), in a global area, storing the variable in the
ipfilter softc is consistent with ipfilter's use of its softc.
Discussed with: emaste, jrm
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53623
|
| |
|
|
|
|
|
|
|
|
|
| |
- pfr_table_count() can return an error.
- We must check for failure from mallocarray(M_NOWAIT).
Fixes: 9e8d2962aad3 ("pf: convert DIOCRGETTSTATS to netlink")
Reported by: Kevin Day <kevin@your.org>
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54094
|