libarchive: Staticize some variables
This code was not being built due to errors in our libarchive
configuration. Now that those have been addressed, staticize some
variables that trip a “no previous extern declaration” error. This
is a subset of upstream PR 2962.
MFC after: 1 week
Reviewed by: mm
Differential Revision: https://reviews.freebsd.org/D56471
(cherry picked from commit 7e9d974bc023755161742f66c8c77546bab88586)
libarchive: merge from vendor branch
libarchive 3.8.7
Important bugfixes:
#2871 libarchive: fix handling of option failures
#2897 iso9660: fix undefined behavior
#2898 RAR: fix LZSS window size mismatch after PPMd block
#2900 CAB: fix NULL pointer dereference during skip
#2911 libarchive: do not continue with truncated numbers
#2919 CAB: Fix Heap OOB Write in CAB LZX decoder
#2934 iso9660: fix posibble heap buffer overflow on 32-bit systems
#2939 cpio: Fix -R memory leak
#2947 libarchive: lzop and grzip filter support
Important bugfixes between 3.8.5 and 3.8.6:
#2860 bsdunzip: fix ISO week year and Gregorian year confusion
#2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
#2875 7zip: fix out-of-bounds access on ELF 64-bit header
[14 lines not shown]
libarchive: Staticize some variables
This code was not being built due to errors in our libarchive
configuration. Now that those have been addressed, staticize some
variables that trip a “no previous extern declaration” error. This
is a subset of upstream PR 2962.
MFC after: 1 week
Reviewed by: mm
Differential Revision: https://reviews.freebsd.org/D56471
(cherry picked from commit 7e9d974bc023755161742f66c8c77546bab88586)
libarchive: merge from vendor branch
libarchive 3.8.7
Important bugfixes:
#2871 libarchive: fix handling of option failures
#2897 iso9660: fix undefined behavior
#2898 RAR: fix LZSS window size mismatch after PPMd block
#2900 CAB: fix NULL pointer dereference during skip
#2911 libarchive: do not continue with truncated numbers
#2919 CAB: Fix Heap OOB Write in CAB LZX decoder
#2934 iso9660: fix posibble heap buffer overflow on 32-bit systems
#2939 cpio: Fix -R memory leak
#2947 libarchive: lzop and grzip filter support
Important bugfixes between 3.8.5 and 3.8.6:
#2860 bsdunzip: fix ISO week year and Gregorian year confusion
#2864 7zip: ix SEGV in check_7zip_header_in_sfx via ELF offset validation
#2875 7zip: fix out-of-bounds access on ELF 64-bit header
[14 lines not shown]
virtual_oss: Introduce virtual_oss_default_control_device rc variable
The -t option gives the user the ability to create a control device for
a given virtual_oss(8) instance, so that the instance's configuration
can be manipulated during runtime with virtual_oss_cmd(8). As is
expected, the control device's name is not known, since it is specified
by the user.
This patch introduces a virtual_oss_default_control_device rc variable,
which defaults to "vdsp.ctl". The goal of this is that third-party
programs and scripts can access the control device of the default
virtual_oss(8) configuration without guessing. This is especially useful
for sbin/devd/snd.conf which deals with hot-swapping sound devices using
virtual_oss(8).
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55670
[2 lines not shown]
netlink: fix LINT-NOVIMAGE build
Include the required header for securelevel_ge()
Fixes: 9933bdcb1264 ("pf: only allow a subset of netlink calls when securelevel is set")
Sponsored by: Rubicon Communications, LLC ("Netgate")
hkbd/ukbd: sysctls to swap macbook kbd modifiers
Many applications, desktop environments, window managers & text editors
favor the usage of Alt or Ctrl over Super (Cmd). On a Macbook it is
quite annoying that the Super (Cmd) key gets pride of place by the spacebar.
The standard MacBook Cmd key location only really makes sense for macOS
or maybe in some tiling wm if Mod4/Super is your main modifier.
For most mainstream desktops and window managers, having Alt or Ctrl
in that location makes much much more sense.
This patch adds two sysctls for swapping either Opt(Alt) or Ctrl with Cmd(Super).
Linux has similar sysctls to this; allowing a user to make an Apple
keyboard more "orthodox"/useful at a level that takes effect independent
of typing context - ie) tty, Xorg and/or wayland.
Having a sysctl to do these swaps means that a user doesn't have to faff
about with both creating a custom vt keymap AND figure out which magic
[8 lines not shown]
jls: add a -c mode to check for a jail's existence
This is intended to be primarily used in scripts that want to check if
a jail exists before taking some action -- for instance, the jail(8)
test cleanup functions that want to remove the jail if it still exists.
Having a mode that limits its output for their usage is useful both
for cleaner scripts and also to avoid masking real problems.
Reviewed by: jamie
(cherry picked from commit 1d8590371049bb14a6410fa83cd03d9eca32f764)
jls: minor simplification to arg handling
It's easier to reason about the state of argc/argv if we just augment
them by optind after our getopt() loop.
No functional change, but this sets the stage for another change to add
a `-c` mode to (c)heck for the existence of a jail quietly without
the caller having to worry about spurious output.
Reviewed by: jamie
(cherry picked from commit dbaaadd4373a725950ad11e578dab61537b7c4f2)
jail: fix backfilling the "name" for jid-named jails
Using the cfparam variant of add_param() will actually copy the name and
flags from the passed-in param, which I hadn't considered. We actually
want the name/flags from the "name" param so that we can do variable
expansion against it right after that -- otherwise it cannot be found,
since variable expansion actually searches by name.
While we're here, `jls -e` was the intermediate name for `jls -c` that
never saw the light of the day. Fix our existence test.
Reviewed by: jamie
Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]")
(cherry picked from commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7)
jail: consistently populate the KP_JID and KP_NAME parameters
The gaps here, specifically, were:
- When we have to discover a running jail's jid from name, we should
populate the missing jid param
- When we populate jid/name from the config, if the name is a jid we
wouldn't populate the name; now we do both.
- When we create a jail, we should populate jid and name with whatever
details we have now that we didn't both.
As a consequence, we can cleanup a few things:
- vnet.interface and zfs.dataset can just always use the jid
- Trying to populate JNAME should always work now, where it would be
a little crashy before if you create a jail that didn't have a name
or jid on the command line
- We can simplify the just-prior JID population now that we'll keep a
stringified jid in our intparams.
This primarily fixes the below, but the issues with vnet.interface and
[6 lines not shown]
jail: tests: cleanup the commands test a bit
We shouldn't be doing setup in a head() function, as this can cause
various problems. For instance, in this case, it caused test listing
to fail in some cases if we didn't get to execute the cleanup properly
by complaining to stderr if the directory could not be created.
Switch to using atf_check for sanity checking stdout; most of these
expressions are self-explanatory and will make it clear what the problem
is.
commands.jail.conf contains a hard-coded path that we can avoid, which
is probably good to avoid weird conflicts if other tests try to copy it
and do the same. Just make a copy of our jail.conf and add the test's
$PWD to it to get a generally unique jail root.
Finally, simplify the cleanup handler a bit.
Reviewed by: jamie
[2 lines not shown]
jail: add JID, JNAME and JPATH to environment for exec.* commands
Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.
In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.
These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.
Reviewed by: imp
(cherry picked from commit d8f021add40c321c4578da55dae52fb93c7ccb5f)
jail: tests: cosmetic-ish improvements
The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.
These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.
Co-authored-by: ngie
makeman: switch over to the .lua implementation
Nobody will test it as long as it's not tied into the top-level target,
and we don't really have a good reason not to cut over to it since it
does produce identical results. Switch over but do not remove the old
sh implementation yet, just in case.
Note that this replacement is driven by a significant speedup from how
the new version is designed: tha lua version actually tries to
parallelize its data collection efforts to speed up generation.
Reviewed by: imp (previous version), emaste
Differential Revision: https://reviews.freebsd.org/D56558
linuxkpi: Implement __GFP_THISNODE in alloc_pages()
It indicates to `alloc_pages()` to allocate the pages from the current
NUMA domain. If it couldn't, it should not retry elsewhere and return
failure.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56590
dpaa2: ni: add more stats and link information
In addition to the locally generated statistics counters, dpaa2 ni
provides a larger set of counters than we currently export via
sysctl. Add (most of) the missing counters and descriptions.
Around Page 3/4 there are some things left to do if we want.
Also the manual was not clear on the descriptions of 3/0 and 3/1.
The second half of the change adds another sysctl note which exports
the link-state, speed, and capabilities set as a text-blob. This is
especially interesting in case the "ni" stops passing packets.
From what I have found in that case the (internal) link state of the
ni goes DOWN but we do not see an interrupt for a link-state change.
Being able to diagnose the state helps to (manually) fix it for now
by changing the media status to 10BaseT or none and then back to auto.
That usually brings the internal link state back UP.
PR: 279352
[4 lines not shown]
lib/msun: Replace manual checks with isnan() calls
The maximum and minimum functions, as well as nextafter and nexttoward,
were using manual NaN checks instead of the isnan() macro.
PR: 294692
Reviewed by: fuz, kargl
MFC after: 1 month
linuxkpi: Define `GFP_KERNEL_ACCOUNT` flag
This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also
defined in this commit. It is defined as a no-op flag as it is not
implemented.
The DRM generic code started to use it in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56587
Remove all of /usr/tests/share/examples/... when MK_EXAMPLES == no
- Remove the generated files (`file1`).
- Remove the top-level example `Kyuafile`.
MFC after: 1 week
UPDATING: Bump __FreeBSD_version to 1500508
Bump __FreeBSD_version to 1500508 for LinuxKPI to be able to track
changes to eventfd, changes for DRM 6.11, changes of LinuxKPI 802.11
based on Linux v7.0.
Sponsored by: The FreeBSD Foundation
Preen/update list for share/examples/sound under `MK_EXAMPLES`
- Update sources to match current installed files list. This involved
adding and removing some example files.
- Sort the list alphabetically so it'll be easier to spot future updates.
MFC after: 1 week