Page MenuHomeFreeBSD

jhb (John Baldwin)
User

Projects (10)

User Details

User Since
Mar 11 2014, 8:46 PM (652 w, 4 d)

Recent Activity

Tue, Sep 1

jhb accepted D59254: various: Fix nlist invocations.

Thanks. I suspect we are fine just merging this to stable branches and leaving the libc change alone. Ideally we would perhaps have done this the other way around (updated all the callers first then made the API change a bit later to give a graceful compat but), but it's not worth the hassle now. I also didn't notice this when the commit went by either, so the behavior change was certainly subtle.

Tue, Sep 1, 9:44 AM

Sat, Aug 29

jhb accepted D59255: vmstat: Drop vm_cnt compat hack.
Sat, Aug 29, 3:57 PM
jhb added a comment to D59254: various: Fix nlist invocations.

This is still missing usr.bin/ktrdump/ktrdump.c, tools/tools/ifpifa/ifpifa.c, and tools/tools/umastat/umastat.c from my initial list. I haven't checked for any others (and you've found a few I had missed).

Sat, Aug 29, 3:56 PM

Thu, Aug 27

jhb accepted D59063: acpi_pci: Honor device proximity for DMA tags.
Thu, Aug 27, 1:58 PM
jhb accepted D59206: acpi_pci: Preserve CPU locality queries for descendants.
Thu, Aug 27, 1:56 PM
jhb accepted D59207: acpi_pci: Cache PCI proximity domains.
Thu, Aug 27, 1:56 PM

Wed, Aug 26

jhb closed D58894: bhyve: Tidy lobits handling in pci_passthru.
Wed, Aug 26, 7:32 PM
jhb committed rG0ffad4ce5655: bhyve: Tidy lobits handling in pci_passthru (authored by jhb).
bhyve: Tidy lobits handling in pci_passthru
Wed, Aug 26, 7:32 PM
jhb committed rGb00bb87a6142: bhyve: Refactor initial PCI BAR setup (authored by jhb).
bhyve: Refactor initial PCI BAR setup
Wed, Aug 26, 7:32 PM
jhb committed rG3807c8be4645: bhyve: Don't set the prefetch flag for large 64-bit memory BARs (authored by jhb).
bhyve: Don't set the prefetch flag for large 64-bit memory BARs
Wed, Aug 26, 7:32 PM
jhb committed rGb29dc5a30cce: bhyve: Return void from pci_emul_alloc_bar (authored by jhb).
bhyve: Return void from pci_emul_alloc_bar
Wed, Aug 26, 7:32 PM
jhb closed D58893: bhyve: Refactor initial PCI BAR setup.
Wed, Aug 26, 7:32 PM
jhb closed D58579: bhyve: Return void from pci_emul_alloc_bar.
Wed, Aug 26, 7:32 PM
jhb committed rG22293f8c547e: release: Use "debug info" for lib32 set description (authored by jhb).
release: Use "debug info" for lib32 set description
Wed, Aug 26, 7:02 PM
jhb closed D59058: release: Use "debug info" for lib32 set description.
Wed, Aug 26, 7:02 PM
jhb added inline comments to D58741: cxgbe: Report SR-IOV VF status.
Wed, Aug 26, 6:42 PM
jhb added inline comments to D58893: bhyve: Refactor initial PCI BAR setup.
Wed, Aug 26, 6:15 PM
jhb added a comment to D59063: acpi_pci: Honor device proximity for DMA tags.

I would maybe split out the caching of the domain into a separate commit.

Wed, Aug 26, 6:06 PM
jhb accepted D59062: acpi_pci: Inherit PF locality for SR-IOV VFs.
Wed, Aug 26, 6:02 PM
jhb accepted D59061: acpi_pci: Do not match SR-IOV VFs to ACPI devices.

Kind of weird that they would match an _ADR value, but this is correct.

Wed, Aug 26, 6:01 PM
jhb added a comment to D58624: pci: Reserve bus numbers required by SR-IOV VFs.

I'm somewhat surprised you are doing this when enumerating the PCI bus vs doing it in pcib_attach() FWIW. If the bus numbers are available for growing, that should be just as doable in pcib_attach() time before you attach drivers to child devices, and then you don't need the manual PCI config read/write code as you will have the normal device_t objects around to use with pci_read_config/pci_write_config.

Wed, Aug 26, 5:58 PM
jhb accepted D58862: authors.adoc: fix entry (mchoo).
Wed, Aug 26, 5:32 PM
jhb added a comment to D58834: LinuxKPI: rework struct timer_list (*function[_415]).

I'm also working on merging changes to iw_cxgbe that should update it btw. For mthca we can find an upstream Linux commit to pull across. I think we should probably just move consumers to the newer KPI.

Wed, Aug 26, 5:32 PM · linuxkpi
jhb added inline comments to D58824: ossl: fix OPENSSL_ia32cap_P size mismatch on i386/amd64.
Wed, Aug 26, 5:27 PM

Tue, Aug 25

jhb added a comment to D59148: arm64: Use sysinsn.h to generate tlbi instructions.

It's not quite true that binutils doesn't "understand the instructions", it's more that different toolchains use different ways to enable access to optional instructions. According to the bug I posted earlier, older versions of LLVM matched binutils in that they required -march= for this particular case before the .arch_extension was added. I'm not a huge fan of hand-assembling vs trusting the assembler to do that job, but it does work, and the pattern does seem to match up quite well with how opcodes are described in the ARM ARM at least.

Tue, Aug 25, 1:37 PM

Fri, Aug 21

jhb added a comment to D58829: random: don't collect entropy when scheduling software interrupt handlers.

Please do correct the commit log to be something more like "random: Don't collect entropy when scheduling software interrupt handlers" and then maybe a summary of Conrad's comment in the body saying that it doesn't provide very much entropy in practice.

Fri, Aug 21, 9:48 PM
jhb added a comment to D59105: arm64: Use .arch armv8-4.a with GNU as for extensions to tlbi.

Using .arch here is not entirely future proof, but does work. The Linux kernel doesn't use .arch_extension. It figures out the highest configured -march= value, and for binutils it passes that to GNU as via -Wa,-march=<mumble> but for clang it uses .arch <mumble> via a special wrapper macro. That approach though spans the entire kernel build for GNU as, whereas this approach only affects pmap.c so will hopefully be easier to update if needed in the future.

Fri, Aug 21, 9:46 PM
jhb requested review of D59105: arm64: Use .arch armv8-4.a with GNU as for extensions to tlbi.
Fri, Aug 21, 9:42 PM
jhb requested review of D59103: lib/clang: Use -fPIC with GCC when building for aarch64.
Fri, Aug 21, 9:42 PM
jhb committed rG82a3337952b9: pmc: Use isascii(3) to check if a character is ASCII (authored by jhb).
pmc: Use isascii(3) to check if a character is ASCII
Fri, Aug 21, 9:42 PM
jhb added inline comments to D58893: bhyve: Refactor initial PCI BAR setup.
Fri, Aug 21, 6:57 PM
jhb created P716 Command-Line Input.
Fri, Aug 21, 6:26 PM
jhb accepted D59082: bhyve: Do not panic on invalid input in HDA emulation.

Thanks for fixing these.

Fri, Aug 21, 4:19 PM

Thu, Aug 20

jhb requested review of D59058: release: Use "debug info" for lib32 set description.
Thu, Aug 20, 8:51 PM
jhb committed rG850203655b7d: thunderbolt: Fix v2.0 reset to reliably wait for the reset to finish (authored by jhb).
thunderbolt: Fix v2.0 reset to reliably wait for the reset to finish
Thu, Aug 20, 8:45 PM
jhb committed rG01c0ddf44a77: exterr: Fix build with GCC on 32-bit architectures (authored by jhb).
exterr: Fix build with GCC on 32-bit architectures
Thu, Aug 20, 8:45 PM
jhb committed rG78bbe9fc3e35: pmc: Use distinct names for arguments to the pmc_config constructor (authored by jhb).
pmc: Use distinct names for arguments to the pmc_config constructor
Thu, Aug 20, 8:45 PM

Wed, Aug 19

jhb added a reviewer for D58829: random: don't collect entropy when scheduling software interrupt handlers: csprng.
Wed, Aug 19, 6:55 PM
jhb added a comment to D58829: random: don't collect entropy when scheduling software interrupt handlers.

The actual commit that added this was

Wed, Aug 19, 6:55 PM
jhb accepted D58771: userboot: bump the interface to v6, add an accept_interpreter callback.
Wed, Aug 19, 6:27 PM
jhb added a comment to D58624: pci: Reserve bus numbers required by SR-IOV VFs.

This does seem a bit of a large hammer that is probably hard to use safely, and not something you'd want to enable by default as I'd expect it would break various systems. It's probably ok as a hack for specific use cases, though it might be nicer to make the knob a bit more fine-grained. For example, to mav@'s point, a more useful knob for HotPlug might be a HotPlug specific knob that we use instead of '1' if the bridge is HotPlug-capable. For the SRIOV case, it would get a bit messy as you'd have to manually go scan the bus to see if it has any children that support SRIOV, but in order to do that, you first need at least one valid bus number. If you wanted an SRIOV-specific knob, I would perhaps implement this differently by still passing 1 to pcib_setup_secbus() here, then later in attach doing an explicit scan of the child bus to check for any direct children that support SRIOV and growing the bus range (if needed) to the value of a new SRIOV-specific knob.

Wed, Aug 19, 6:00 PM
jhb accepted D58828: lib9p: Make it a private library.

I presume the QEMU 9pfs support doesn't depend on this?

Wed, Aug 19, 5:46 PM
jhb added a comment to D54641: bhyve/pci_emul: Use vmem to track BAR allocations.
In D54641#1344263, @jhb wrote:

When a new PCI device shows up in hotplug both for native PCI-e hotplug and other systems like the ACPI approach you are using, the new device just shows up with all decoding disabled and the BARs set to their reset values (address of 0). It is the guest OS's job to allocate address space for the BARs and manage the address space.

Thank you, this clears up a lot and I think I'll be able to simplify the whole patch series greatly since we can completely ditch vmem.
Before I start purging the vmem-related parts from this patch stack, do you think that there's a future use for this application of vmem that would justify keeping it?

Wed, Aug 19, 5:42 PM

Mon, Aug 17

jhb added inline comments to D58893: bhyve: Refactor initial PCI BAR setup.
Mon, Aug 17, 5:58 PM
jhb requested review of D58894: bhyve: Tidy lobits handling in pci_passthru.
Mon, Aug 17, 5:56 PM
jhb requested review of D58893: bhyve: Refactor initial PCI BAR setup.
Mon, Aug 17, 5:55 PM

Aug 13 2026

jhb closed D58575: libcxgb4: Use t4fw_interface.h from the cxgbe driver sources.
Aug 13 2026, 5:42 PM
jhb committed rG6c41d1e26614: libcxgb4: Use t4fw_interface.h from the cxgbe driver sources (authored by jhb).
libcxgb4: Use t4fw_interface.h from the cxgbe driver sources
Aug 13 2026, 5:42 PM
jhb closed D58623: rtld: Remove a stale #ifdef PIC.
Aug 13 2026, 5:42 PM
jhb committed rGec8985a10033: rtld: Remove a stale #ifdef PIC (authored by jhb).
rtld: Remove a stale #ifdef PIC
Aug 13 2026, 5:42 PM

Aug 3 2026

jhb requested review of D58623: rtld: Remove a stale #ifdef PIC.
Aug 3 2026, 2:34 PM

Aug 1 2026

jhb abandoned D57785: link_elf: Guard against subtraction underflow.
Aug 1 2026, 8:23 PM
jhb commandeered D57785: link_elf: Guard against subtraction underflow.
Aug 1 2026, 8:23 PM
jhb added inline comments to D58579: bhyve: Return void from pci_emul_alloc_bar.
Aug 1 2026, 8:22 PM

Jul 31 2026

jhb committed rGf7e7fab7bab1: linuxkpi: Add xa_insert_irq wrapper (authored by jhb).
linuxkpi: Add xa_insert_irq wrapper
Jul 31 2026, 6:01 PM
jhb closed D58576: linuxkpi: Add xa_insert_irq wrapper.
Jul 31 2026, 6:01 PM
jhb committed rGc7400fe1df4e: stand: Reject ELF files with PT_LOAD segments where filesz > memsz (authored by jhb).
stand: Reject ELF files with PT_LOAD segments where filesz > memsz
Jul 31 2026, 5:58 PM
jhb committed rG486dfbb67e09: kld: Reject kernel modules with PT_LOAD segments where filesz > memsz (authored by jhb).
kld: Reject kernel modules with PT_LOAD segments where filesz > memsz
Jul 31 2026, 5:58 PM
jhb committed rGb9eaf9b7cef2: libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz (authored by jhb).
libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz
Jul 31 2026, 5:58 PM
jhb committed rG535eb24d8451: rtld: Reject ELF files with PT_LOAD or PT_TLS segments where filesz > memsz (authored by jhb).
rtld: Reject ELF files with PT_LOAD or PT_TLS segments where filesz > memsz
Jul 31 2026, 5:58 PM
jhb closed D58543: stand: Reject ELF files with PT_LOAD segments where filesz > memsz.
Jul 31 2026, 5:58 PM
jhb committed rG80ee17c0285e: stand: Improve error handling when loading ELF files (authored by jhb).
stand: Improve error handling when loading ELF files
Jul 31 2026, 5:58 PM
jhb closed D58542: kld: Reject kernel modules with PT_LOAD segments where filesz > memsz.
Jul 31 2026, 5:58 PM
jhb committed rG8aec309852b5: stand: Remove a pointless goto (authored by jhb).
stand: Remove a pointless goto
Jul 31 2026, 5:58 PM
jhb closed D58558: libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz.
Jul 31 2026, 5:58 PM
jhb closed D58541: rtld: Reject ELF files with PT_LOAD or PT_TLS segments where filesz > memsz.
Jul 31 2026, 5:58 PM
jhb closed D58540: stand: Improve error handling when loading ELF files.
Jul 31 2026, 5:58 PM
jhb closed D58539: stand: Remove a pointless goto.
Jul 31 2026, 5:58 PM
jhb added inline comments to D58579: bhyve: Return void from pci_emul_alloc_bar.
Jul 31 2026, 5:49 PM
jhb requested review of D58579: bhyve: Return void from pci_emul_alloc_bar.
Jul 31 2026, 5:47 PM
jhb added a comment to D54641: bhyve/pci_emul: Use vmem to track BAR allocations.

I have an (untested) little patch series to cleanup BAR registration a bit, and I Think all you will have to do for hotplug is add an early return from pci_emul_alloc_bar() to avoid trying to allocate initial addresses similar to the boot ROM case for hot plugging.

Jul 31 2026, 5:31 PM
jhb added a comment to D54641: bhyve/pci_emul: Use vmem to track BAR allocations.

A general comment from a discussion with @bnovkov today: The complicated state machine for 64-bit BARs is fairly fragile and also not really consistent with how PCI BARs work in hardware. The right protocol for updating BARs for an OS/firmware is to first disable decoding of the relevant resource type (MEM or IO) in the Command Register, then size the BAR by writing all 1's and reading back to see which bits are hardwired at zero, then writing to the BAR to assign the real address (either the original address or a new address determined by the OS/firmware), then re-enable decoding in the command register.

Jul 31 2026, 4:13 PM
jhb requested review of D58576: linuxkpi: Add xa_insert_irq wrapper.
Jul 31 2026, 3:07 PM
jhb requested review of D58575: libcxgb4: Use t4fw_interface.h from the cxgbe driver sources.
Jul 31 2026, 3:07 PM
jhb updated the diff for D58558: libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz.

Switch to invalid

Jul 31 2026, 2:53 PM
jhb added inline comments to D58558: libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz.
Jul 31 2026, 2:52 PM

Jul 30 2026

jhb requested review of D58558: libc: Reject static ELF exectables with PT_TLS segments were filesz > memsz.
Jul 30 2026, 6:19 PM
jhb added a comment to D58539: stand: Remove a pointless goto.

While here, you could apply the same treatment to the preceding if, except the call to parse_modmetadata() needs to be preserved. The fact that the return process is the same irrespective of whether that latter call returns 0 or not looks suspect. After a very quick glance, this function does not seem to have proper error reporting anyway.

Jul 30 2026, 1:59 PM
jhb committed rG25165e4499e1: mbuf: Make m_unshare() fail on KTLS mbufs (authored by takahiro.kurosawa_gmail.com).
mbuf: Make m_unshare() fail on KTLS mbufs
Jul 30 2026, 12:51 PM
jhb closed D58466: mbuf: make m_unshare() to fail on KTLS mbufs.
Jul 30 2026, 12:51 PM
jhb accepted D58510: ofed: don't stop removing stale RoCE GIDs at the first hole.
Jul 30 2026, 12:48 PM
jhb accepted D58550: amd64: try to fix the build with old clang that does not know about FRED.

Thanks for fixing this so quickly!

Jul 30 2026, 12:43 PM
jhb added a comment to D58542: kld: Reject kernel modules with PT_LOAD segments where filesz > memsz.

I just used their email address for Reported by because given (a) the lack of history with the project (b) no trace of them existing anywhere else online (c) the low-quality suspicious nature of the patches (d) the name being one of *the* quintessential placeholders, I am suspicious as to whether it's their real name.

Jul 30 2026, 12:42 PM
jhb added a comment to D58541: rtld: Reject ELF files with PT_LOAD or PT_TLS segments where filesz > memsz.

There's also lib/libc/gen/tls.c for PT_TLS

Jul 30 2026, 12:36 PM
jhb accepted D58511: ofed: fix GID table reference leak in roce_gid_update_addr_callback().

Good catch.

Jul 30 2026, 12:35 PM
jhb accepted D58548: amd64: do not allow to set reserved bits in MXCSR for ptrace(PT_SETFPREGS).

Have you had a chance to test this under GDB and/or LLDB? I can't imagine they'd be setting any reserved bits so this should be fine.

Jul 30 2026, 12:34 PM
jhb accepted D58507: Add new src committer: Minsoo Choo (mchoo).
Jul 30 2026, 12:32 PM

Jul 29 2026

jhb added a comment to D57785: link_elf: Guard against subtraction underflow.

See D58542 (and related commits in that stack)

Jul 29 2026, 8:45 PM
jhb added a comment to D58540: stand: Improve error handling when loading ELF files.

My testing was to boot a kernel with a ccr_load="YES" in /boot/loader.conf (ccr.ko depends on if_cxgbe.ko) and verify it still parsed the metadata correctly and auto-loaded the dependency in the loader. That and it also didn't choke on a valid kernel but still booted ok. I don't have any degenerate kernel modules lying around to test further (e.g. a kernel module with only a sysinit).

Jul 29 2026, 8:31 PM
jhb updated the diff for D58540: stand: Improve error handling when loading ELF files.

Better align with kernel linker

Jul 29 2026, 8:27 PM
jhb retitled D58540: stand: Improve error handling when loading ELF files from stand: Improve error handling when parsing ELF module metadata to stand: Improve error handling when loading ELF files.
Jul 29 2026, 8:26 PM
jhb added inline comments to D58540: stand: Improve error handling when loading ELF files.
Jul 29 2026, 8:01 PM
jhb accepted D58047: acpi: parse resources of not-present devices that are kept enabled.
Jul 29 2026, 7:49 PM · drivers
jhb accepted D54586: mdoc: Standardize SYNOPISIS section for drivers.

This still seems a bit verbose to me, but it's less verbose than the old one, so definitely in the right direction.

Jul 29 2026, 7:39 PM
jhb accepted D58508: Add new src committer: Minsoo Choo (mchoo).

We don't really MFC things in doc/ (there are no branches, only release tags).

Jul 29 2026, 7:26 PM
jhb requested review of D58543: stand: Reject ELF files with PT_LOAD segments where filesz > memsz.
Jul 29 2026, 7:23 PM
jhb requested review of D58542: kld: Reject kernel modules with PT_LOAD segments where filesz > memsz.
Jul 29 2026, 7:23 PM
jhb requested review of D58541: rtld: Reject ELF files with PT_LOAD or PT_TLS segments where filesz > memsz.
Jul 29 2026, 7:23 PM
jhb requested review of D58539: stand: Remove a pointless goto.
Jul 29 2026, 7:23 PM
jhb requested review of D58540: stand: Improve error handling when loading ELF files.
Jul 29 2026, 7:23 PM