XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

src, branch main

FreeBSD source tree

Makefile.inc1: Make bootstrap mandoc's bootstrap libz dependency conditional

We bootstrap libz unconditionally on macOS and Linux, and conditionally on FreeBSD if pre-1600029 or DISK_IMAGE_TOOLS_BOOTSTRAP is enabled, but if building on new enough -CURRENT without DISK_IMAGE_TOOLS_BOOTSTRAP then libz is not bootstrapped and so this libz dependency does not exist. Add the dependency whenever we are bootstrapping libz but not otherwise, and do so without duplicating the condition. Fixes: 1dbcc7ee92c4 ("Makefile.inc1: Make sure mandoc bootstrap tool depends on libz") MFC…

rk_pinctrl: Fix the drive strength of the pins on the older SoCs

rk_pinctrl_parse_drive(), used for every Rockchip SoC but the RK3568, could never succeed and so the drive-strength of the pins was never programmed: - OF_getencprop() returns the size of the property, but the result was tested against 0. A present property made the function return an error. - The register offset of the matching table entry was never returned, so the caller used whatever was left in reg (the pull register or an uninitialized value). Fixing only the first problem would have…

rk_pinctrl: Fix the drive strength of the RK3568 pins

The drive strength of the RK3568 pins was never programmed. The drive-strength property was tested with OF_getencprop() == 0 but that function returns the size of the property on success, so the branch was dead code and the pins kept whatever the previous stage of the boot left in the registers. The register layout was also wrong: each pin has an 8 bits wide drive field and a register holds two pins, but the value was shifted by pin % 2 bits instead of (pin % 2) * 8 and the mask only covered…

rtld: free heap donelists abandoned by the lookup restart

A symbol lookup done under the read-locked rtld_bind_lock is restarted with the write lock when it needs to load filtees. The restart is done by siglongjmp() from lock_restart_for_upgrade(), which skips donelist_free() for the heap donelists of the unwound frames. Only do_dlsym() freed one such donelist, tracked by SymLook.donelist_mem. The donelist of symlook_default() called from _rtld_bind(), the donelist of get_program_var_addr() called for dlopen(RTLD_TRACE), and the donelists of nested…

bind_all_fibs: Disable bind_all_fibs by default

net.inet.{tcp,udp,raw}.bind_all_fibs was set to 1 for backward compatibility. Set to 0 by default to drop them all unless an inpcb bound to the same FIB exists. While here, Add an UPDATING entry for behaviour change. Relnotes: yes Reviewed by: markj Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/73

linux: correct errors from mremap(2)

Linux returns EFAULT when the range to be remapped is not mapped at all, and ENOMEM only when it is mapped but cannot be grown in place. Callers depend on that distinction: musl's pthread_getattr_np() measures the main thread stack by growing a one page mapping and retries while errno is ENOMEM. Returning ENOMEM for every growth request makes that loop spin forever. PR: 299835 MFC after: 1 week

ssh: use defaultkey sentinel for ML-DSA-44 default host key

servconf_add_hostkey() compares its file argument to defaultkey by pointer to skip an unreadable default key; the ML-DSA-44 entry passed the "[default]" literal, so the skip (and the "No host key files found" fallback) never applied to it. MFC after: 1 week Reviewed by: emaste Fixes: bb5c77e9d281 ("OpenSSH: Update to 10.4p1") Differential Revision: https://reviews.freebsd.org/D60922

bhyve: Treat BAR registration failures as non-fatal

Some guest operating systems (at least 9front) will leave device I/O space decoding enabled while probing BAR sizes. In this case, a sufficiently large 32-bit BAR can overlap with the HPET MMIO region fixed at 0xfed00000. This results in an assertion failure in modify_bar_registration(), even though the collision is transient, i.e., the guest will promptly map the BAR elsewhere. Tolerate such overlaps. Keep track of a BAR's registration state and make sure that modify_bar_registration() doesn't…

inetd: use snprintf() in inetd_setproctitle()

inetd_setproctitle() formats se_service (the service name taken verbatim from inetd.conf) and the peer address into an 80-byte buffer with sprintf(). A long service name can overflow it. Bound both calls with snprintf(). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D60879

LinuxKPI: restore several hard coded return values for the CONFIG_PM case

drm-kmod sets CONFIG_PM (unclear if for other parts) but LinuxKPI has no understanding of a dev->power implementation for pm_runtime.h. The return values based on !CONFIG_PM thus cause problems to drm-kmod. Return the previous values under CONFIG_PM but leave the TODO logging as the actual implementation is missing and return values may not be universally correct (beyond the known drm-kmod use cases). The following functions having a return value but none sepcific for CONFIG_PM as (based on…

net*: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in Version 7 Unix, released by AT&T in 1979. It became obsolete in 1989, when ANSI C introduced void *. What's left: * ioctl(9) KPI still uses caddr_t, thus network related ioctl method still use it. * if_clone KPI, to be done separately. * bpf(4), to be done separately. * SCTP, let maintainers decide. * iflib(4), let maintainers decide. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D60738

mbuf: remove remnants of caddr_t

caddr_t is a typedef for a character pointer (char *) that originated in Version 7 Unix, released by AT&T in 1979. It became obsolete in 1989, when ANSI C introduced void *. There is a lot of code that uses m->m_data for arithmetics, thus we can't switch it to void * easily. Let's at least stop proliferation of caddr_t. We have developers that are twice younger than obsoletion of this type. Reviewed by: zlei, tuexen, adrian Differential Revision: https://reviews.freebsd.org/D60736

ipfw: cleanup SYSINIT(9)s

Make them all belong to SI_SUB_PROTO_FIREWALL and explicitly specify order. Prefer SYSINIT() over modevent, for those subsystems that don't have dependencies. All subsystems just depend on the main module and they don't depend on each other, except dummynet which also has submodules. Thus, keep DECLARE_MODULE() only for the main module and dummynet. Differential Revision: https://reviews.freebsd.org/D60685