Page MenuHomeFreeBSD

jhb (John Baldwin)
User

Projects (9)

User Details

User Since
Mar 11 2014, 8:46 PM (310 w, 6 d)

Recent Activity

Today

jhb added inline comments to D23813: Remove -DMACHINE_ARCH hack from Makefile.riscv.
Tue, Feb 25, 12:11 AM

Yesterday

jhb added a comment to D23822: Mark procfs-based process debugging as deprecated for FreeBSD 13..

Exp-run requested here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244383

Mon, Feb 24, 9:52 PM
jhb created D23822: Mark procfs-based process debugging as deprecated for FreeBSD 13..
Mon, Feb 24, 9:51 PM
jhb accepted D23811: make lacp's use_numa hashing aware of send tags.
Mon, Feb 24, 8:07 PM
jhb added inline comments to D23783: lib/libkvm: add sanity check in kvm_geterr_positive_test_no_error test.
Mon, Feb 24, 8:05 PM · PowerPC
jhb accepted D23748: Define SCTL_MASK32 when COMPAT_FREEBSD32 is defined..

Of course, I'd rather we just kill SCTL_MASK32 entirely and use SV_PROC_FLAG checks to replace it, but that's a separate (and larger) change we've already discussed in person.

Mon, Feb 24, 7:53 PM
jhb added a comment to D23685: Remove long broken procfs-based process tracing..

Hmm, actually, my branch removed more of it I think which I'd rather do if we want to kill it:

Mon, Feb 24, 7:50 PM
jhb added inline comments to D23679: Remove spurious warning about invalid VPD data..
Mon, Feb 24, 7:10 PM
jhb added inline comments to D23759: Add many sysctl descriptions in kern.
Mon, Feb 24, 5:31 PM

Mon, Feb 17

jhb added a comment to D23661: Implement a translation from FreeBSD atomic API to gcc intrinsics.

So in CheriBSD we just replaced all of atomic(9) with the __atomic API supported in both modern GCC and clang for RISC-V:

Mon, Feb 17, 6:54 PM

Fri, Feb 14

jhb updated the diff for D23677: Refactor driver and consumer interfaces for OCF (in-kernel crypto)..
  • Remove OBE workaround from ccr_eta_done.
  • Don't permit DECRYPT | COMPUTE for ETA.
  • accellerate -> accelerate.
  • Let OCF verify HMACs for ETA.
  • Update crp_mbuf instead of leaking q_dst_m.
Fri, Feb 14, 1:35 AM
jhb added inline comments to D23677: Refactor driver and consumer interfaces for OCF (in-kernel crypto)..
Fri, Feb 14, 1:34 AM
jhb added inline comments to D23677: Refactor driver and consumer interfaces for OCF (in-kernel crypto)..
Fri, Feb 14, 12:33 AM

Thu, Feb 13

jhb created D23677: Refactor driver and consumer interfaces for OCF (in-kernel crypto)..
Thu, Feb 13, 11:51 PM
jhb committed rS357891: Don't check the auth algorithm for GCM..
Don't check the auth algorithm for GCM.
Thu, Feb 13, 11:04 PM
jhb closed D23671: Don't check the auth algorithm for GCM..
Thu, Feb 13, 11:04 PM
jhb closed D23670: Remove the per-TXQ tls_wrs stat..
Thu, Feb 13, 10:55 PM
jhb committed rS357890: Remove the per-TXQ tls_wrs stat..
Remove the per-TXQ tls_wrs stat.
Thu, Feb 13, 10:55 PM
jhb created D23671: Don't check the auth algorithm for GCM..
Thu, Feb 13, 8:37 PM
jhb created D23670: Remove the per-TXQ tls_wrs stat..
Thu, Feb 13, 7:56 PM
jhb added a comment to D23625: Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (M of N).

Generally looks fine. Only weirdness is having to mark SYSCTL_NODE()'s with MPSAFE. A SYSCTL_NODE without an explicit handler (so handler set to NULL) is inherently MPSAFE, and it'd be nice to adjust the assertions to special case that to avoid adding churn since eventually once al sysctls are safe we will go through and remove all the CTLFLAG_MPSAFE flags.

Thu, Feb 13, 5:23 PM
jhb accepted D23554: bhyve, bhyvectl: Add Hygon Dhyana support.
Thu, Feb 13, 5:14 PM
jhb accepted D23553: vmm: Add Hygon Dhyana support.
Thu, Feb 13, 5:08 PM
jhb accepted D23591: bhyve: use stream_read() to read 12 bytes of RFB client version.
Thu, Feb 13, 5:07 PM

Wed, Feb 12

jhb accepted D23648: style.9: update C99 commentary.

I vote for using the parenthetical.

Wed, Feb 12, 10:23 PM
jhb added a comment to D23654: Add support for more interrupt types.

I'm not really sure why we need more interrupt types? This seems like it is better named INTR_TYPE_NET_NOEPOCH or something anyway, and if that's the true purpose I think instead we might need to rethink the design of tying the network epoch to the interrupt type? For example, what if instead of teaching ithreads, task queues, etc. about the network epoch directly, we were to have drivers that want to coalesce the epoch do so explicitly in their ISR (this also would let them drop the epoch when doing voluntarily yielding which is one thing np@ asked about on IRC earlier) and either use an alternate if_input or a new if_flags to avoid the recursion in ether_input? I think that approach would be fairly simple while avoiding hardcoding knowledge about the network epoch in various kernel subsystems.

Wed, Feb 12, 8:15 PM

Tue, Feb 11

jhb added inline comments to D23124: 2020-02-29 rm GCC 4.2.1 build infrastructure.
Tue, Feb 11, 9:28 PM
jhb added a comment to D23607: retire `WITH_PORT_BASE_GCC`.

Yes, this is what lets you use base/gcc. WITH_PORTS_BASE_BINUTILS is also still relevant. These knobs are enabled by the base/* packages so that 'make delete-old' doesn't delete files installed by the packages as the commit message that added them explains.

Tue, Feb 11, 5:25 PM

Fri, Feb 7

jhb added a comment to D10335: VirtFS/9p filesystem passthrough support (virtio-9p).
In D10335#516241, @jhb wrote:

So this looks good to me, but the latest upload lost all the lib9p sources. I finally found the lib9p upstream, though the only version I see is in your GitHub space? I would be fine with still using that as an upstream though and putting the sources into contrib/lib9p (despite the last call where I said it could move). I think it would be good to first import lib9p into the vendor/ space and then contrib/, then a commit to hook it up to the build (being able to hook the tests up to run as part of the kyua test suite runs would be a bonus), and finally the commit to add it to bhyve 3rd.

Can you elaborate on what I did wrong with the latest patch update? I generated it using arc diff HEAD^^ -- update D10335 which resulted in a diff only in files changed since last upload (two git commits from my development branch on github).

Fri, Feb 7, 9:58 PM
jhb added a comment to D23349: arm64 N1SDP PCI root complex driver.

I would still rather keep sys/dev/pci for "generic" PCI things such as the PCI-PCI bridge driver or the PCI bus driver, etc. sys/arm64/pci could also be a place (for x86 we use sys/{amd64,i386,x86}/pci to hold MD PCI drivers that don't belong elsewhere)

Fri, Feb 7, 9:53 PM

Thu, Feb 6

jhb committed rS357643: Tidy the _set_tp function for RISC-V..
Tidy the _set_tp function for RISC-V.
Thu, Feb 6, 9:46 PM
jhb closed D23521: Tidy the _set_tp function for RISC-V..
Thu, Feb 6, 9:46 PM
jhb accepted D23523: Restore missing comment.
Thu, Feb 6, 6:06 PM
jhb closed D23513: Use the context created in makectx() for stack traces..
Thu, Feb 6, 6:05 PM
jhb committed rS357632: Use the context created in makectx() for stack traces..
Use the context created in makectx() for stack traces.
Thu, Feb 6, 6:05 PM
jhb committed rS357630: Fix DDB to unwind across exception frames..
Fix DDB to unwind across exception frames.
Thu, Feb 6, 6:02 PM
jhb closed D23508: Fix DDB to unwind across exception frames..
Thu, Feb 6, 6:02 PM
jhb accepted D23540: Update Platform support information.
Thu, Feb 6, 5:55 PM
jhb added a comment to D23349: arm64 N1SDP PCI root complex driver.

Are there other drivers for this chipset? If so, sys/arm64/n1sdp might be a good place for neoverse 1-specific drivers to live. sys/dev/n1sdp could also work (though on arm platforms we've tended to put them in sys/arm/<chipset|soc> rather than sys/dev)

Thu, Feb 6, 5:53 PM

Wed, Feb 5

jhb created D23521: Tidy the _set_tp function for RISC-V..
Wed, Feb 5, 9:58 PM
jhb added a comment to D23513: Use the context created in makectx() for stack traces..

Yes, it was probably copied from arm64 originally. Fixing it on those platforms requires auditing makectx() to make sure it DTRT however.

Wed, Feb 5, 8:35 PM
jhb committed rS357595: Fix EXCP_MASK to include all relevant bits from scause..
Fix EXCP_MASK to include all relevant bits from scause.
Wed, Feb 5, 8:34 PM
jhb closed D23510: Fix EXCP_MASK to include all relevant bits from scause..
Wed, Feb 5, 8:34 PM
jhb closed D23511: Use csr_read() to read sstatus instead of inline assembly..
Wed, Feb 5, 8:32 PM
jhb committed rS357594: Use csr_read() to read sstatus instead of inline assembly..
Use csr_read() to read sstatus instead of inline assembly.
Wed, Feb 5, 8:32 PM
jhb added inline comments to D23124: 2020-02-29 rm GCC 4.2.1 build infrastructure.
Wed, Feb 5, 8:27 PM
jhb added a comment to D10335: VirtFS/9p filesystem passthrough support (virtio-9p).

So this looks good to me, but the latest upload lost all the lib9p sources. I finally found the lib9p upstream, though the only version I see is in your GitHub space? I would be fine with still using that as an upstream though and putting the sources into contrib/lib9p (despite the last call where I said it could move). I think it would be good to first import lib9p into the vendor/ space and then contrib/, then a commit to hook it up to the build (being able to hook the tests up to run as part of the kyua test suite runs would be a bonus), and finally the commit to add it to bhyve 3rd.

Wed, Feb 5, 8:20 PM
jhb committed rS357593: Remove stale workaround for the htif console..
Remove stale workaround for the htif console.
Wed, Feb 5, 8:11 PM
jhb closed D23509: Remove stale workaround for the htif console..
Wed, Feb 5, 8:11 PM
jhb closed D23507: Read the breakpoint instruction to determine its length in BKPT_SKIP..
Wed, Feb 5, 8:06 PM
jhb committed rS357591: Read the breakpoint instruction to determine its length in BKPT_SKIP..
Read the breakpoint instruction to determine its length in BKPT_SKIP.
Wed, Feb 5, 8:06 PM
jhb accepted D23285: Implement kvm_kerndisp.
Wed, Feb 5, 8:01 PM
jhb added inline comments to D23285: Implement kvm_kerndisp.
Wed, Feb 5, 5:40 PM
jhb accepted D23512: Define MAXCPU consistently between the kernel and KLDs..

Hmm, I don't understand the original logic either. Note that at the time we didn't have KLD_TIED, so it would have applied to kernel modules built together with the kernel. Given the author, it must have been dtrace related? I think your change is fine.

Wed, Feb 5, 5:30 PM
jhb added a comment to D23513: Use the context created in makectx() for stack traces..
KDB: enter: sysctl debug.kdb.enter
[ thread pid 690 tid 100049 ]
Stopped at      kdb_trap+0x42a: sd      zero,0(a0)
db> tr
Tracing pid 690 tid 100049 td 0xffffffd001a26560
db_trace_self() at db_trace_self
db_hex2dec() at db_hex2dec+0x1d2
db_command_loop() at db_command_loop+0x2c6
db_command_loop() at db_command_loop+0x6a
db_fetch_ksymtab() at db_fetch_ksymtab+0x2c8
kdb_trap() at kdb_trap+0x156
do_trap_supervisor() at do_trap_supervisor+0xaa
cpu_exception_handler_supervisor() at cpu_exception_handler_supervisor+0x6a
--- exception 3, tval = 0
kdb_trap() at kdb_trap+0x42a
sbuf_new_for_sysctl() at sbuf_new_for_sysctl+0x11a
kernel_sysctl() at kernel_sysctl+0x376
userland_sysctl() at userland_sysctl+0x150
sys___sysctl() at sys___sysctl+0x54
do_trap_user() at do_trap_user+0x3d6
cpu_exception_handler_user() at cpu_exception_handler_user+0x74
--- exception 8, tval = 0
db> c
Wed, Feb 5, 12:43 AM
jhb created D23513: Use the context created in makectx() for stack traces..
Wed, Feb 5, 12:41 AM
jhb added a comment to D23349: arm64 N1SDP PCI root complex driver.

As with the xilinx driver, can we please not put MD and chipset-specific code in sys/dev/pci?

Wed, Feb 5, 12:27 AM
jhb created D23511: Use csr_read() to read sstatus instead of inline assembly..
Wed, Feb 5, 12:15 AM
jhb created D23510: Fix EXCP_MASK to include all relevant bits from scause..
Wed, Feb 5, 12:15 AM
jhb created D23509: Remove stale workaround for the htif console..
Wed, Feb 5, 12:13 AM
jhb added a comment to D23508: Fix DDB to unwind across exception frames..

Existing format for debug.kdb.trap=1:

Wed, Feb 5, 12:12 AM

Tue, Feb 4

jhb created D23508: Fix DDB to unwind across exception frames..
Tue, Feb 4, 11:48 PM
jhb created D23507: Read the breakpoint instruction to determine its length in BKPT_SKIP..
Tue, Feb 4, 11:46 PM
jhb accepted D23284: Add SYSCTL to get KERNBASE and relocated KERNBASE.
Tue, Feb 4, 5:07 PM
jhb accepted D23285: Implement kvm_kerndisp.

Probably should add the new function to the lvm(3) manpage.

Tue, Feb 4, 5:07 PM

Fri, Jan 31

jhb committed rS357344: Add stricter checks on user changes to SSTATUS..
Add stricter checks on user changes to SSTATUS.
Fri, Jan 31, 7:00 PM
jhb closed D23338: Add stricter checks on user changes to SSTATUS..
Fri, Jan 31, 7:00 PM
jhb updated the diff for D23338: Add stricter checks on user changes to SSTATUS..
  • Fixup to use SSTATUS_SD.
Fri, Jan 31, 6:48 PM
jhb closed D23434: Fix 64-bit value of SSTATUS_SD to use an unsigned long..
Fri, Jan 31, 5:49 PM
jhb committed rS357337: Fix 64-bit value of SSTATUS_SD to use an unsigned long..
Fix 64-bit value of SSTATUS_SD to use an unsigned long.
Fri, Jan 31, 5:49 PM

Thu, Jan 30

jhb created D23434: Fix 64-bit value of SSTATUS_SD to use an unsigned long..
Thu, Jan 30, 10:21 PM
jhb committed rS357313: Trim duplicate CSR swaps from user exceptions..
Trim duplicate CSR swaps from user exceptions.
Thu, Jan 30, 10:20 PM
jhb closed D23394: Trim duplicate CSR swaps from user exceptions..
Thu, Jan 30, 10:20 PM
jhb added inline comments to D23394: Trim duplicate CSR swaps from user exceptions..
Thu, Jan 30, 7:18 PM
jhb closed D23395: Remove unused fields from struct pcb..
Thu, Jan 30, 7:15 PM
jhb committed rS357305: Remove unused fields from struct pcb..
Remove unused fields from struct pcb.
Thu, Jan 30, 7:15 PM
jhb committed rS357302: Fix use of an uninitialized variable..
Fix use of an uninitialized variable.
Thu, Jan 30, 6:28 PM
jhb closed D23368: Fix use of an uninitialized variable..
Thu, Jan 30, 6:28 PM
jhb added a comment to D23327: add mergemaster(8) deprecation notice.

I think removing in 13.0 might be a bit aggressive. I've certainly run into several developers who still use this instead of etcupdate. We also haven't updated any of our docs in the handbook to mention etcupdate (wblock@ tried but gave up when he ran into issues I didn't understand when trying to use etcupdate). I do think a runtime warning might also be warranted, though likely to be lost in the noise that mergemaster generates. Making sure the handbook documents etcupdate is probably a prerequisite for deprecating it.

Thu, Jan 30, 6:22 PM
jhb added a comment to D23124: 2020-02-29 rm GCC 4.2.1 build infrastructure.

So one question I have is if 'make xdev' makes sense in a clang world? clang is already a cross-compiler via -target. Probably not for this change, but if 'make xdev' is now obsolete it might be nice to GC those bits as a followup.

Thu, Jan 30, 6:19 PM
jhb added inline comments to D10335: VirtFS/9p filesystem passthrough support (virtio-9p).
Thu, Jan 30, 5:25 PM

Tue, Jan 28

jhb created D23395: Remove unused fields from struct pcb..
Tue, Jan 28, 11:31 AM
jhb created D23394: Trim duplicate CSR swaps from user exceptions..
Tue, Jan 28, 11:18 AM
jhb retitled D23338: Add stricter checks on user changes to SSTATUS. from Only permit user changes to USTATUS bits in SSTATUS. to Add stricter checks on user changes to SSTATUS..
Tue, Jan 28, 11:07 AM

Jan 26 2020

jhb created D23368: Fix use of an uninitialized variable..
Jan 26 2020, 2:27 PM
jhb committed rS357147: Revert accidental change from r357146..
Revert accidental change from r357146.
Jan 26 2020, 2:23 PM
jhb closed D23363: Fix some misleading indentation warnings reported by recent clang..
Jan 26 2020, 2:21 PM
jhb committed rS357146: Fix some misleading indentation warnings reported by recent clang..
Fix some misleading indentation warnings reported by recent clang.
Jan 26 2020, 2:21 PM
jhb committed rS357145: Compile hack.c with normal CFLAGS + -shared -nostdlib..
Compile hack.c with normal CFLAGS + -shared -nostdlib.
Jan 26 2020, 2:19 PM
jhb closed D23362: Compile hack.c with normal CFLAGS + -shared -nostdlib..
Jan 26 2020, 2:19 PM
jhb added a comment to D23362: Compile hack.c with normal CFLAGS + -shared -nostdlib..

It used to be .So but was changed to .pico in https://svnweb.freebsd.org/base?view=revision&revision=306297. In this particular case there isn't a .so that it would collide with, so it could go back to .So perhaps, but I'm not going to bother with that anytime soon.

Jan 26 2020, 2:17 PM

Jan 25 2020

jhb created D23363: Fix some misleading indentation warnings reported by recent clang..
Jan 25 2020, 12:54 PM
jhb created D23362: Compile hack.c with normal CFLAGS + -shared -nostdlib..
Jan 25 2020, 10:23 AM

Jan 23 2020

jhb committed rS357062: Correct the return types of fueword*()..
Correct the return types of fueword*().
Jan 23 2020, 11:37 PM
jhb added a comment to D23338: Add stricter checks on user changes to SSTATUS..

This actually boots. The first version would boot in qemu, but /usr/bin/login would fail. I added printfs to the EINVAL case and found that the values of SD and FS were varying triggering the false failures. On further thinking, restoring the original FS would not be correct anyway. It should either be OFF or CLEAN as I said earlier. I didn't read the description of MSTATUS exhaustively, but I don't think there are any other read-only bits in SSTATUS?

Jan 23 2020, 10:36 PM
jhb updated the diff for D23338: Add stricter checks on user changes to SSTATUS..
  • Ignore read-only bits and FS in sstatus.
Jan 23 2020, 10:32 PM
jhb added a comment to D23338: Add stricter checks on user changes to SSTATUS..

(I found out the SD and FS stuff while testing it in QEMU btw and am testing the changes I mentioned)

Jan 23 2020, 10:26 PM
jhb added a comment to D23338: Add stricter checks on user changes to SSTATUS..

This is actually broken. It flags what look like changes in SD and FS that are bogus (and we should also ignore XS since it is read-only). For FS, the real fix is that set_fpcontext() needs to be setting that field explicitly based on what it does. It either needs to turn FP off if there was no valid state to save, or it needs to set it to clean since it just restored the registers and they are now all match the saved state. I don't think we want to let userland change UXL though? If we supported riscv32 and freebsd32, then you would set UXL during the freebsd32 exec_setregs(), but it would otherwise need to be static until the next exec?

Jan 23 2020, 10:26 PM
jhb created D23338: Add stricter checks on user changes to SSTATUS..
Jan 23 2020, 6:04 PM
jhb added a comment to D23337: Xilinx XDMA PCIe Controller driver.

Putting this in sys/dev/xilinx probably makes more sense than putting this in sys/dev/pci which is generally only for cross-platform PCI standard things. You could then name it xlnx_pcib.[ch] (or xilinx_pcib.[ch]).

Jan 23 2020, 5:19 PM