pam_xdg.8: Mechanical polish
+ convert license to SPDX only
+ belatedly bump date for last content change
+ rewrite in semantic line breaks to fix one sentence per line
Reviewed by: manu
Fixes: ecd6631b19d9 ("pam_xdg: Add linger option")
Differential Revision: https://reviews.freebsd.org/D61703
www/immichframe: Update to 1.0.40.0
Switch to .NET 10 and build with the runtime identifier of the host
major version, which is the only one the SDK ships packs for.
Changelog: https://github.com/immichFrame/ImmichFrame/releases/tag/v1.0.40.0
Sponsored by: Netzkommune GmbH
[libc] Implement timegm (#243668)
This function is mktime but always in UTC. It's a BSD extension, but
it's also supported on linux. This PR adds the function as well as a
bunch of tests.
Assisted-by: Automated tooling, human reviewed.
linuxkpi: Release the "from" device in pci_get_class() and pci_get_base_class()
On Linux the pci_get_*() iterators drop the reference of the device passed
as "from" once the next one has been looked up, so a loop like
while ((pch = pci_get_class(class, pch)))
does not leak anything. LinuxKPI allocates a new pci_dev for every device
it returns but never released "from", so each device but the last one was
leaked together with its kobject, its name and its path name. i915 does
exactly this in intel_detect_pch() and leaked a device at every load.
Drop the reference, but only for the devices created by lkpinew_pci_dev();
the pci_dev of a device attached to a driver belongs to the bus.
Differential Revision: https://reviews.freebsd.org/D61222
lindebugfs: Free the kcov symlink when the module is unloaded
lindebugfs_init() creates the "kcov" symlink with debugfs_create_symlink(),
which allocates a node and a copy of the destination, but passed no destroy
callback to pfs_create_link(). pseudofs therefore never released them and
the "debugfsint" malloc type was reported as leaking memory each time the
module was unloaded.
Use debugfs_destroy(), as done for the other nodes.
Differential Revision: https://reviews.freebsd.org/D61221
linuxkpi: Release devres when the probe of a PCI driver fails
When the probe method of a driver fails, linux_pci_attach_device() only
dropped its reference on the device. Like on detach (see the previous
change), the devres actions are then not run if one of them holds a
reference on the device, which is what devm_drm_dev_alloc() does through the
drm_device. The device is never released, the drm_device is leaked with its
minor, its managed memory and its debugfs entries: unloading the driver
after a failed load (e.g. a missing firmware) printed
"WARNING !xa_empty(&drm_minors_xa)" and leaked memory.
Linux releases the devres resources of a device whose probe failed, so do the
same.
Differential Reivision: https://reviews.freebsd.org/D61223
[Clang][CFI] Check same-layout classes against their base in checked loads (#241644)
Without `-fsanitize=cfi-cast-strict`, CFI allows deleting a `Base`
object
through `Derived *` when `Derived` adds nothing to `Base`
(`struct Derived : Base {};`), and the regular `cfi-vcall` check uses
`Base` for such calls. The `llvm.type.checked.load` path, used by
trapping CFI with `-fwhole-program-vtables` and by VFE, used `Derived`,
so these deletes trapped only with `-fwhole-program-vtables`. That path
also applied the ignorelist and the hidden LTO visibility check to
`Derived` instead of `Base`.
Only virtual destructor calls are affected: a same-layout `Derived`
declares no other virtual functions, so other calls already check the
class that declares the function.
Pick the checked class the same way on both paths:
```text
[30 lines not shown]
pam_xdg: Add linger option
The pam_xdg module deletes a user's XDG_RUNTIME_DIR when the last
interactive session logs out. If the user leaves background processes
running on the system, like a terminal multiplexer, that puts state or
domain sockets in XDG_RUNTIME_DIR, then that state gets destroyed and
the processes become effectively orphaned.
On Linux, systemd-logind not only unlinks XDG_RUNTIME_DIR but also kills
all user processes on logout. To allow long-lived background processes,
it implements a per-user "linger" mode to disable the unlink and kill.
Because FreeBSD's pam_xdg does not implement process killing, this
"linger" option implementation skips only XDG_RUNTIME_DIR unlinking
when the user still has running processes after the last session logs
out.
Differential Revision: https://reviews.freebsd.org/D61332