Page MenuHomeFreeBSD

jhb (John Baldwin)
User

Projects (10)

User Details

User Since
Mar 11 2014, 8:46 PM (620 w, 3 d)

Recent Activity

Yesterday

jhb added a comment to D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC.
In D54964#1256808, @jhb wrote:

I tried using a constraint of "m" and an operand modifier of "a" which I think is more what we want anyway (if you remove the & in the operand), but that gives me ICEs in both GCC 14 and GCC 15. This whole thing seems a bit gross. I realize we want the real symbol here and don't want it to resolve to 'foo@plt' or the like, but this whole thing feels a bit clunky. I guess we can't just do _SDT_ASM_WORD _SDT_PROBE_NAME(...) directly?

Sadly no. This doesn't work for function-scoped static variables, since there the variable name is not equal to that of the emitted symbol. And the DTRACE_PROBE* macros defined in sdt.h (and I think only used by ZFS) need this to work.

(Presumably on CHERI _SDT_WORD here is a .chericap and would really need the symbol name and not some goofy "make the compiler generate a constant address" thing anyway?

It expands to .chericap "%c0" with the operand defined as "i" (__unbounded_addressof(_SDT_PROBE_NAME(...)).

Fri, Jan 30, 7:40 PM
jhb added a reviewer for D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC: markj.
Fri, Jan 30, 4:35 PM
jhb added a comment to D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC.

I tried using a constraint of "m" and an operand modifier of "a" which I think is more what we want anyway (if you remove the & in the operand), but that gives me ICEs in both GCC 14 and GCC 15. This whole thing seems a bit gross. I realize we want the real symbol here and don't want it to resolve to 'foo@plt' or the like, but this whole thing feels a bit clunky. I guess we can't just do _SDT_ASM_WORD _SDT_PROBE_NAME(...) directly? (Presumably on CHERI _SDT_WORD here is a .chericap and would really need the symbol name and not some goofy "make the compiler generate a constant address" thing anyway?

Fri, Jan 30, 4:35 PM
jhb added a comment to D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC.

Oh dear, GCC added "cc" only in GCC 15. GCC 14 is unable to compile SDT probes with GCC 14 on RISC-V. :(

Fri, Jan 30, 4:14 PM
jhb added a comment to D54969: Makefile.inc1: Don't mark GCC broken for riscv64.

With this stack, I'm able to build world and the GENERIC kernel for riscv64 using riscv64-gcc15. I will test some other versions of GCC as well.

Fri, Jan 30, 3:15 PM
jhb added a comment to D54967: libkern: Add libcalls for ffs and __ffsdi2.

I don't know why __builtin_ffs for RISC-V on GCC calls ffs rather than __ffssi2 for its libcall. The latter would seem cleaner to me.

Fri, Jan 30, 3:14 PM
jhb added a comment to D54966: riscv: Don't use the '#' modifier with '%b'.

I have no idea why clang fails to warn about this as I noted in the commit log. OTOH, if we want to make '%#b' a real thing, we need to document it in the manpage and fix both compilers to intentionally (vs accidentally) accept it.

Fri, Jan 30, 3:10 PM
jhb added a comment to D54965: riscv: Enable the zifencei extension explicitly in -march.

Need to verify this also builds with clang. Jess believes that clang 17 and later will accept this.

Fri, Jan 30, 3:09 PM
jhb added a comment to D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC.

GCC documents operand modifiers here: https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Extended-Asm.html#Generic-Operand-Modifiers

Fri, Jan 30, 3:08 PM
jhb added a reverting change for rGf4db342d4419: libkern: remove old ffs/fls routines: D54967: libkern: Add libcalls for ffs and __ffsdi2.
Fri, Jan 30, 3:06 PM
jhb added a comment to D54962: stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V.

Compare with sys/conf/ldscript.riscv.

Fri, Jan 30, 3:06 PM
jhb requested review of D54969: Makefile.inc1: Don't mark GCC broken for riscv64.
Fri, Jan 30, 3:06 PM
jhb requested review of D54968: riscv: Add ffs.c and ffsdi2.c.
Fri, Jan 30, 3:06 PM
jhb requested review of D54967: libkern: Add libcalls for ffs and __ffsdi2.
Fri, Jan 30, 3:06 PM
jhb added a reverting change for D40699: libkern: remove old ffs/fls routines: D54967: libkern: Add libcalls for ffs and __ffsdi2.
Fri, Jan 30, 3:06 PM
jhb requested review of D54966: riscv: Don't use the '#' modifier with '%b'.
Fri, Jan 30, 3:06 PM
jhb requested review of D54965: riscv: Enable the zifencei extension explicitly in -march.
Fri, Jan 30, 3:06 PM
jhb requested review of D54964: sdt: Use the "cc" operand modifier for the address of probes for GCC.
Fri, Jan 30, 3:06 PM
jhb requested review of D54963: stand: Add compiler builtins needed by GCC for RISC-V.
Fri, Jan 30, 3:06 PM
jhb requested review of D54962: stand: Use the correct OUTPUT_ARCH in the linker script for RISC-V.
Fri, Jan 30, 3:05 PM
jhb added a reviewer for D54933: heimdal: Silence a false positive warning from GCC 14: adrian.
Fri, Jan 30, 2:41 PM
jhb added a reviewer for D54932: heimdal: Pass the correct pointer to free in an error case: adrian.
Fri, Jan 30, 2:41 PM
jhb added a reviewer for D54931: heimdal: Add missing function prototypes: adrian.
Fri, Jan 30, 2:41 PM

Thu, Jan 29

jhb committed rG2fc26b2f3fef: cxgbe tom: Send auxiliary TLS work requests as raw WR mbufs (authored by jhb).
cxgbe tom: Send auxiliary TLS work requests as raw WR mbufs
Thu, Jan 29, 3:46 PM
jhb committed rG4b89fb6af98e: freebsd32_setcred: Copy all of the setcred fields individually (authored by jhb).
freebsd32_setcred: Copy all of the setcred fields individually
Thu, Jan 29, 3:43 PM
jhb committed rGf3ab9690c2ff: pci_iov: Support dynamic subordinate bus growth during VF creation (authored by chandrakanth.patil_broadcom.com).
pci_iov: Support dynamic subordinate bus growth during VF creation
Thu, Jan 29, 3:41 PM
jhb committed rGd203bd96bb25: freebsd32_setcred: Copy all of the setcred fields individually (authored by jhb).
freebsd32_setcred: Copy all of the setcred fields individually
Thu, Jan 29, 3:41 PM
jhb committed rG7a1a4f10a64d: MAC: Use the current thread's user ABI to determine the layout of struct mac (authored by jhb).
MAC: Use the current thread's user ABI to determine the layout of struct mac
Thu, Jan 29, 3:41 PM
jhb committed rG52864a411a6f: setcred: Move initial copyin of struct setcred out to per-ABI syscall (authored by jhb).
setcred: Move initial copyin of struct setcred out to per-ABI syscall
Thu, Jan 29, 3:41 PM
jhb committed rG507dc6c1c810: cxgbe tom: Export alloc_raw_mbuf for use in other TOE drivers (authored by jhb).
cxgbe tom: Export alloc_raw_mbuf for use in other TOE drivers
Thu, Jan 29, 3:41 PM
jhb committed rG09d09e2a4b43: kyua: Switch from std::auto_ptr<> to std::unique_ptr<> (authored by jhb).
kyua: Switch from std::auto_ptr<> to std::unique_ptr<>
Thu, Jan 29, 3:41 PM
jhb committed rGbde291c654c2: cxgbe tom: Support sending "raw" WR mbufs on plain TCP and TLS sockets (authored by jhb).
cxgbe tom: Support sending "raw" WR mbufs on plain TCP and TLS sockets
Thu, Jan 29, 3:41 PM
jhb committed rG4df8a30e54b6: cxgbe tom: Halve the size of offload transmit software descriptors (authored by jhb).
cxgbe tom: Halve the size of offload transmit software descriptors
Thu, Jan 29, 3:40 PM
jhb committed rG4af3e6cfd7c4: cross-build make.py: Permit specifying cross toolchains by a package name (authored by jhb).
cross-build make.py: Permit specifying cross toolchains by a package name
Thu, Jan 29, 3:40 PM
jhb committed rG244f79497737: cross-build make.py: Handle lld brew packages on macOS (authored by jhb).
cross-build make.py: Handle lld brew packages on macOS
Thu, Jan 29, 3:40 PM
jhb committed rGfa8f3d3053b6: tools/boot/rootgen: Remove stray zfsboot1 from ZFS + MBR + UEFI function (authored by jhb).
tools/boot/rootgen: Remove stray zfsboot1 from ZFS + MBR + UEFI function
Thu, Jan 29, 3:40 PM
jhb committed rGd0e6d7538189: kyua: Don't pass NULL to std::unique_ptr<>::reset() (authored by jhb).
kyua: Don't pass NULL to std::unique_ptr<>::reset()
Thu, Jan 29, 3:40 PM
jhb committed rG5fce28c2f81d: cxgbe nic TLS: Correct IPv6 payload length (authored by jhb).
cxgbe nic TLS: Correct IPv6 payload length
Thu, Jan 29, 3:40 PM
jhb committed rGaee8d42a37ac: cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding (authored by jhb).
cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding
Thu, Jan 29, 3:40 PM
jhb committed rG7982c36da11c: kyua: Don't pass NULL to unique_ptr constructors (authored by jhb).
kyua: Don't pass NULL to unique_ptr constructors
Thu, Jan 29, 3:40 PM
jhb committed rGf4973f97daab: atf: Switch from std::auto_ptr<> to std::unique_ptr<> (authored by jhb).
atf: Switch from std::auto_ptr<> to std::unique_ptr<>
Thu, Jan 29, 3:40 PM
jhb committed rG82e034370621: lutok: Switch from std::auto_ptr<> to std::unique_ptr<> (authored by jhb).
lutok: Switch from std::auto_ptr<> to std::unique_ptr<>
Thu, Jan 29, 3:40 PM
jhb committed rG3b622bdf474b: ctladm: Use nvlist instead of home-rolled name-value lists (authored by jhb).
ctladm: Use nvlist instead of home-rolled name-value lists
Thu, Jan 29, 3:40 PM
jhb committed rG239fd18c6ce4: ctladm: portlist -i lists target and initiator names rather than addresses (authored by jhb).
ctladm: portlist -i lists target and initiator names rather than addresses
Thu, Jan 29, 3:40 PM
jhb updated the summary of D54159: bus: Document special ranges of IVARs.
Thu, Jan 29, 12:38 AM
jhb requested review of D54934: bus: Change a few bus drivers to use consistent IVAR ranges.
Thu, Jan 29, 12:38 AM
jhb updated the diff for D54159: bus: Document special ranges of IVARs.

Make a no-op so it is MFCable

Thu, Jan 29, 12:37 AM
jhb added a comment to D54159: bus: Document special ranges of IVARs.

For MFC purposes, I think I will change this to use BUS_PRIVATE_IVARS + 1 for the buses that currently start at 1 and insert a commit to renumber those. That would let me MFC this change at least.

Thu, Jan 29, 12:28 AM
jhb added inline comments to D54531: riscv cbo: fix cache underflushing.
Thu, Jan 29, 12:18 AM
jhb added a comment to D52050: 'devctl clear driver' shall not fail if no driver has been found.

This looks good to me modulo one style nit I can fix while merging. Is "Marcin Cieslak <saper@saper.info>" the right way to credit you as the author of the commit?

Thu, Jan 29, 12:08 AM
jhb committed rG48c3a932166f: OptionalObsoleteFiles.inc: Treat compat runtime loaders as libraries (authored by jhb).
OptionalObsoleteFiles.inc: Treat compat runtime loaders as libraries
Thu, Jan 29, 12:08 AM
jhb committed rG18d4fcf53fa2: OptionalObsoleteFiles.inc: Treat compat runtime loaders as libraries (authored by jhb).
OptionalObsoleteFiles.inc: Treat compat runtime loaders as libraries
Thu, Jan 29, 12:08 AM
jhb committed rGc8553cad48cb: smartpqi: Avoid declaring extern inline functions (authored by markj).
smartpqi: Avoid declaring extern inline functions
Thu, Jan 29, 12:05 AM
jhb committed rGdfc0c1cdcfe7: nvme: Add constants for the Fused Operation (FUSE) field in commands (authored by jhb).
nvme: Add constants for the Fused Operation (FUSE) field in commands
Thu, Jan 29, 12:04 AM
jhb committed rG8a2b0aa31bea: ctl: Add CTL_IO_ASSERT wrapper macro (authored by jhb).
ctl: Add CTL_IO_ASSERT wrapper macro
Thu, Jan 29, 12:04 AM
jhb committed rG2d8562860eca: ctl: Avoid an upcast for calling ctl_scsi_path_string (authored by jhb).
ctl: Avoid an upcast for calling ctl_scsi_path_string
Thu, Jan 29, 12:04 AM

Wed, Jan 28

jhb added a comment to D54925: sysctl(9): Booleans: Accept integers to ease knob conversion.

I think changing sysctl_handle_bool directly is fine.

Wed, Jan 28, 11:58 PM
jhb added inline comments to D54925: sysctl(9): Booleans: Accept integers to ease knob conversion.
Wed, Jan 28, 11:58 PM
jhb added inline comments to D54920: STACKALIGN: Reimplement in terms of __align_down.
Wed, Jan 28, 11:52 PM
jhb added a comment to D54895: kdb(1): Introduce kdb(1).

You definitely don't want '-w' by default as it is quite dangerous, but it can be useful on a live system to be able to modify variables in the kernel, and it does mean passing O_RDWR to kvm_open().

Wed, Jan 28, 11:50 PM · Contributor Reviews (src)
jhb added a comment to D54355: stdio: rename short _fileno to _fileno_short for legacy abi compatibility, add new int _fileno in struct __sFILE.

Also, you can't do this this way. You have to bump the symbol versions of all symbols that create a FILE object that uses _fileno, and in the old compat version, still limit to 16-bit descriptors because that old software is using the old fileno() macro that reads the file descriptor from the old location. Only in the "new" versions of functions like fopen(), etc. can you actually use the wider fileno field.

Wed, Jan 28, 11:36 PM
jhb added a comment to D54354: stdio: rename _file to _fileno in struct __sFILE.

I don't think renaming the field does any good here. This isn't the field that existing software accesses directly, and all the software that does is using fileno() which is already part of the API and exposes the ABI.

Wed, Jan 28, 11:34 PM
jhb added a comment to D54355: stdio: rename short _fileno to _fileno_short for legacy abi compatibility, add new int _fileno in struct __sFILE.

Oh, this is the sort of thing I really hoped to avoid, was exposing all of FILE as a new ABI. I was careful in my previous versions to figure out which parts of FILE were actually used (not _fileno which doesn't matter, but all the _other_ fields that things like gnulib abuse) and then tried to make FILE mostly opaque, and added the wider _fileno in a slot that was safe to reuse that was near the front still. I think I also used some #ifdef's to ensure that only the fields in FILE that were part of the public ABI were exposed outside of libc. This doesn't do any of that.

Wed, Jan 28, 11:33 PM
jhb added inline comments to D54514: Porters Handbook: bring Versions section up to date.
Wed, Jan 28, 11:28 PM · Doc Committers
jhb added inline comments to D54514: Porters Handbook: bring Versions section up to date.
Wed, Jan 28, 11:28 PM · Doc Committers
jhb added inline comments to D54531: riscv cbo: fix cache underflushing.
Wed, Jan 28, 11:16 PM
jhb added a comment to D53862: LinuxKPI: pci: fix pcie_get_speed_cap().

This looks good to me btw.

Wed, Jan 28, 10:29 PM
jhb added inline comments to D54641: bhyve/pci_emul: Use vmem to track BAR allocations.
Wed, Jan 28, 10:27 PM
jhb closed D52533: libcuse: silence -Wthread-safety-analysis warnings.
Wed, Jan 28, 10:13 PM
jhb added a comment to D28750: ipmi: on aarch64, load dependancies to increase chance of finding ipmi device.

This really shouldn't be needed as drivers like iicsmb and i4giic should create child smbusX devices, and when those devices invoke bus_identify_children that should call the identify routine and voila.

Wed, Jan 28, 10:07 PM
jhb added inline comments to D43720: LinuxKPI: dev_coredump implementation (NOT FOR COMMIT AS-IS).
Wed, Jan 28, 10:04 PM
jhb added a comment to D43720: LinuxKPI: dev_coredump implementation (NOT FOR COMMIT AS-IS).

The magic of vn_open_cred() is probably not something that will go away.

Wed, Jan 28, 10:03 PM
jhb added inline comments to D43720: LinuxKPI: dev_coredump implementation (NOT FOR COMMIT AS-IS).
Wed, Jan 28, 10:03 PM
jhb added a comment to D52861: thunderbolt: Support generic USB4 NHIs.

Does this mean all TB3 support will be removed? Is there more to cleanup in that case?

Wed, Jan 28, 9:56 PM
jhb added a comment to D54342: Note that __FreeBSD_version 1600005 also includes a ZFS change.

Regardless, adding another note to an existing entry in the description seems fine to me.

Wed, Jan 28, 9:55 PM
jhb added a comment to D54342: Note that __FreeBSD_version 1600005 also includes a ZFS change.

Hmmm, I tend to use the commit that actually bumped the value as the gitref FWIW. You could try building the website locally (need docproj installed and then you can cd documentation ; make run. After several minutes it will then give you a URL on your localhost you can point a browser at to read the updated docs.

Wed, Jan 28, 9:53 PM
jhb added inline comments to D54079: build.7: Improve make delete-old example.
Wed, Jan 28, 9:51 PM
jhb requested review of D54933: heimdal: Silence a false positive warning from GCC 14.
Wed, Jan 28, 9:42 PM
jhb requested review of D54932: heimdal: Pass the correct pointer to free in an error case.
Wed, Jan 28, 9:31 PM
jhb requested review of D54931: heimdal: Add missing function prototypes.
Wed, Jan 28, 9:31 PM

Tue, Jan 27

jhb requested review of D54920: STACKALIGN: Reimplement in terms of __align_down.
Tue, Jan 27, 10:29 PM
jhb committed rGbe8bf6c2beda: depend-cleanup: Handle ctld moving from C to C++ (authored by jhb).
depend-cleanup: Handle ctld moving from C to C++
Tue, Jan 27, 6:51 PM
jhb committed rG7711a8c74d21: ctld: Permit simpler syntax for target LUNs in UCL (authored by jhb).
ctld: Permit simpler syntax for target LUNs in UCL
Tue, Jan 27, 6:51 PM
jhb committed rG90d5638f97b3: ctld: Don't specify the TCP port for default iSCSI portal group sockets (authored by jhb).
ctld: Don't specify the TCP port for default iSCSI portal group sockets
Tue, Jan 27, 6:50 PM
jhb committed rGac930fe19978: ctld: Use strtonum in lun_set_device_type (authored by des).
ctld: Use strtonum in lun_set_device_type
Tue, Jan 27, 6:46 PM
jhb committed rG4ecaa02a8797: ctld: Rename {ctld,isns}.h to {ctld,isns}.hh (authored by jhb).
ctld: Rename {ctld,isns}.h to {ctld,isns}.hh
Tue, Jan 27, 6:46 PM
jhb committed rG0b418dea7182: ctld: Permit valid integer LUN device types (authored by jhb).
ctld: Permit valid integer LUN device types
Tue, Jan 27, 6:46 PM
jhb committed rG4054439b47f2: ctld: Do not remove item from an nvlist while iterating it (authored by jhb).
ctld: Do not remove item from an nvlist while iterating it
Tue, Jan 27, 6:46 PM
jhb committed rG8c211a00d3b4: ctld: Require a mask if / is specified in an initiator portal (authored by jhb).
ctld: Require a mask if / is specified in an initiator portal
Tue, Jan 27, 6:46 PM
jhb committed rGe11dec7e54e2: ctld: Remove dead logging code (authored by jhb).
ctld: Remove dead logging code
Tue, Jan 27, 6:46 PM
jhb committed rG541c6c9d75c1: ctld: Tighten parsing of IPv6 addresses for initiator-portal (authored by jhb).
ctld: Tighten parsing of IPv6 addresses for initiator-portal
Tue, Jan 27, 6:45 PM
jhb committed rG88b3dab8d0ec: ctld: Properly validate mutual user/secret for CHAP-MUTUAL in the UCL parser (authored by jhb).
ctld: Properly validate mutual user/secret for CHAP-MUTUAL in the UCL parser
Tue, Jan 27, 6:45 PM
jhb committed rG8f799d4b1c71: ctld: Drop commented-out code to print the configuration (authored by jhb).
ctld: Drop commented-out code to print the configuration
Tue, Jan 27, 6:45 PM
jhb committed rG6bb9cb02c84b: ctld: Convert to C++ (authored by jhb).
ctld: Convert to C++
Tue, Jan 27, 6:45 PM
jhb committed rGa8ab78a0785f: ctld: Remove dead code in UCL parsing of hex DSCP values (authored by jhb).
ctld: Remove dead code in UCL parsing of hex DSCP values
Tue, Jan 27, 6:45 PM
jhb committed rGe87f835bf13b: ctld: Add a label string to auth_groups (authored by jhb).
ctld: Add a label string to auth_groups
Tue, Jan 27, 6:45 PM
jhb committed rG80888d8610ee: ctld: Reduce code duplication in auth_check_secret_length (authored by jhb).
ctld: Reduce code duplication in auth_check_secret_length
Tue, Jan 27, 6:45 PM
jhb committed rG9cdd58d51d49: ctld: Fix sign bug validating kernel ports when reloading config (authored by jhb).
ctld: Fix sign bug validating kernel ports when reloading config
Tue, Jan 27, 6:45 PM
jhb committed rGbce125030930: ctld: Disable -Wshadow for GCC (authored by jhb).
ctld: Disable -Wshadow for GCC
Tue, Jan 27, 6:45 PM
jhb committed rG8ac917c7ce6c: ctl_ioctl.h: Do not use enums for bit fields of flags (authored by jhb).
ctl_ioctl.h: Do not use enums for bit fields of flags
Tue, Jan 27, 6:45 PM