Page MenuHomeFreeBSD

jrtc27 (Jessica Clarke)
User

Projects

User Details

User Since
Jul 4 2018, 7:23 PM (361 w, 3 d)

Recent Activity

Yesterday

jrtc27 added a comment to D50716: sys/mount.h: Add missing headers so it's standalone for _WANT_MOUNT.
In D50716#1158047, @kib wrote:

You need at least sys/types.h there as well.

Sat, Jun 7, 6:27 PM

Fri, Jun 6

jrtc27 updated the diff for D50720: openzfs: Add a _WANT_ZNODE that defines struct znode / znode_t for userspace.

Move endif

Fri, Jun 6, 5:18 PM
jrtc27 added inline comments to D50718: msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers.
Fri, Jun 6, 5:08 PM
jrtc27 added inline comments to D50720: openzfs: Add a _WANT_ZNODE that defines struct znode / znode_t for userspace.
Fri, Jun 6, 5:03 PM
jrtc27 added inline comments to D50721: libprocstat: Drop zfs_defs.c hack, including its _KERNEL define.
Fri, Jun 6, 3:08 PM
jrtc27 updated the summary of D50721: libprocstat: Drop zfs_defs.c hack, including its _KERNEL define.
Fri, Jun 6, 2:33 PM
jrtc27 updated the diff for D50721: libprocstat: Drop zfs_defs.c hack, including its _KERNEL define.

Trim and sort CFLAGS

Fri, Jun 6, 2:32 PM
jrtc27 requested review of D50721: libprocstat: Drop zfs_defs.c hack, including its _KERNEL define.
Fri, Jun 6, 2:15 PM
jrtc27 requested review of D50720: openzfs: Add a _WANT_ZNODE that defines struct znode / znode_t for userspace.
Fri, Jun 6, 2:15 PM
jrtc27 requested review of D50719: libprocstat: Drop all _KERNEL defines outside of zfs_defs.c.
Fri, Jun 6, 2:14 PM
jrtc27 requested review of D50718: msdosfs: Add _WANT_MSDOSFS_INTERNALS to replace MAKEFS in headers.
Fri, Jun 6, 2:14 PM
jrtc27 requested review of D50717: cd9660: Add _WANT_ISO_MNT.
Fri, Jun 6, 2:13 PM
jrtc27 requested review of D50716: sys/mount.h: Add missing headers so it's standalone for _WANT_MOUNT.
Fri, Jun 6, 2:13 PM

Wed, Jun 4

jrtc27 added a comment to D50683: linker: Improve handling of ifuncs when fetching symbol metadata.

What if there is no symbol (which presumably shows up as off != 0, using whatever symbol happens to be before it)? Or it's in another file? Those are legitimate cases (the former in particular, that's for when the implementation is static, and the latter is weird but there's no reason you can't do it).

If there's no symbol, what should we do? I don't think it's really correct to keep passing the resolver symbol's size, so should we just set it to 0 instead? In practice this case currently doesn't arise AFAICT, and so I'm rather inclined to signal the failure to the consumer.

Wed, Jun 4, 9:20 PM
jrtc27 added a comment to D50683: linker: Improve handling of ifuncs when fetching symbol metadata.

What if there is no symbol (which presumably shows up as off != 0, using whatever symbol happens to be before it)? Or it's in another file? Those are legitimate cases (the former in particular, that's for when the implementation is static, and the latter is weird but there's no reason you can't do it).

Wed, Jun 4, 4:33 PM

Tue, Jun 3

jrtc27 added a comment to D50668: pkg.conf: add valid configurations for kmods for all branches.

As mentioned on IRC but summarised here for reference: do we want to support PKGCONFBRANCH=latest being set in a user's src.conf on release branches? 0b18e008ccf74ee87d38ca16c9c4d9bb0b174bec deliberately made this an overridable variable, and so it we want to preserve that we probably should have a latest-release file too.

Tue, Jun 3, 2:33 PM
jrtc27 committed rG680f1a39ee4b: libc: Allow more complex expressions for CALL_BLOCK first argument (authored by jrtc27).
libc: Allow more complex expressions for CALL_BLOCK first argument
Tue, Jun 3, 2:21 PM
jrtc27 committed rG786ced56a434: libc: Fix glob.c build with GCC (authored by jrtc27).
libc: Fix glob.c build with GCC
Tue, Jun 3, 2:21 PM
jrtc27 added inline comments to D50636: packages: fix ownership of /tmp and /dev.
Tue, Jun 3, 1:55 AM
jrtc27 committed rG207f3b2b25ea: libmd: Fix amd64 AVX2 SHA-1 transcription errors (authored by jrtc27).
libmd: Fix amd64 AVX2 SHA-1 transcription errors
Tue, Jun 3, 1:52 AM

Sat, May 31

jrtc27 requested review of D50630: vmbus: Avoid gratuitous ifdef and use more generic implementation instead.
Sat, May 31, 7:04 PM
jrtc27 committed rG7944a87dce93: drm2/ttm: Add missing includes to fix arm TEGRA124 build (authored by jrtc27).
drm2/ttm: Add missing includes to fix arm TEGRA124 build
Sat, May 31, 7:02 PM

Fri, May 30

jrtc27 added inline comments to D40816: bsdinstall: protect disk label and zfsboot on Auto ZFS+MBR.
Fri, May 30, 10:09 PM

Thu, May 29

jrtc27 closed D50594: rtld-elf: Pass TCB to allocate_module_tls to avoid re-getting.
Thu, May 29, 4:08 PM
jrtc27 committed rG48fd084579af: rtld-elf: Pass TCB to allocate_module_tls to avoid re-getting (authored by jrtc27).
rtld-elf: Pass TCB to allocate_module_tls to avoid re-getting
Thu, May 29, 4:08 PM
jrtc27 closed D50592: libc, libthr: Ditch MD __pthread_distribute_static_tls helpers.
Thu, May 29, 4:08 PM
jrtc27 committed rG250b2eda0acc: libc, libthr: Ditch MD __pthread_distribute_static_tls helpers (authored by jrtc27).
libc, libthr: Ditch MD __pthread_distribute_static_tls helpers
Thu, May 29, 4:08 PM
jrtc27 closed D50591: rtld-elf: Pass struct tcb * around rather than struct dtv **.
Thu, May 29, 4:08 PM
jrtc27 committed rG960f40b892cf: rtld-elf: Pass struct tcb * around rather than struct dtv ** (authored by jrtc27).
rtld-elf: Pass struct tcb * around rather than struct dtv **
Thu, May 29, 4:07 PM
jrtc27 added inline comments to D50591: rtld-elf: Pass struct tcb * around rather than struct dtv **.
Thu, May 29, 1:21 AM

Wed, May 28

jrtc27 requested review of D50594: rtld-elf: Pass TCB to allocate_module_tls to avoid re-getting.
Wed, May 28, 11:03 PM
jrtc27 requested review of D50592: libc, libthr: Ditch MD __pthread_distribute_static_tls helpers.
Wed, May 28, 10:42 PM
jrtc27 requested review of D50591: rtld-elf: Pass struct tcb * around rather than struct dtv **.
Wed, May 28, 10:42 PM
jrtc27 added inline comments to D50546: hwpmc: Support an older application running the old ABI.
Wed, May 28, 9:03 PM
jrtc27 added a reverting change for rGe9a38ed2fa61: rtld: fix allocate_module_tls() variant I fallback to static allocation: rGccfb1c50e45d: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".
Wed, May 28, 8:29 PM
jrtc27 committed rGccfb1c50e45d: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation" (authored by jrtc27).
Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation"
Wed, May 28, 8:29 PM
jrtc27 committed rG0e3dbc64d9f6: libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects (authored by jrtc27).
libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects
Wed, May 28, 8:29 PM
jrtc27 closed D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".
Wed, May 28, 8:29 PM
jrtc27 closed D50564: libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects.
Wed, May 28, 8:29 PM
jrtc27 closed D50563: rtld-elf/riscv: Don't allocate static TLS for dynamic TLS.
Wed, May 28, 8:29 PM
jrtc27 committed rG03801d449a37: rtld-elf/riscv: Don't allocate static TLS for dynamic TLS relocations (authored by jrtc27).
rtld-elf/riscv: Don't allocate static TLS for dynamic TLS relocations
Wed, May 28, 8:28 PM
jrtc27 added inline comments to D50498: atkbd: fix first keystroke force reset.
Wed, May 28, 7:44 PM
jrtc27 updated the summary of D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".
Wed, May 28, 4:31 PM
jrtc27 updated the diff for D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".

Extend existing comment to note different implementation to NetBSD

Wed, May 28, 4:31 PM
jrtc27 added a comment to D50563: rtld-elf/riscv: Don't allocate static TLS for dynamic TLS.
In D50563#1154663, @kib wrote:

Indeed this is not how things are supposed to work. At least on x86, this is how things are. There are vendor libs linked with static TLS model, which happens to be dynamically loaded, and people really want that to work. The libs cannot be recompiled (they come from nvidia).

If you want to keep risc-v "pure", it is up to you.

Wed, May 28, 4:19 PM
jrtc27 added a comment to D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".

I've gone digging and this looks like confusion importing NetBSD's code. This was applying https://github.com/NetBSD/src/commit/cc08a85a2529815b95799c6500b40a2c596c0c93 to our tree, just as 91880e07f605edb90339685bc934699a4344de3b was https://github.com/NetBSD/src/commit/3caa8dc7351c8383b2c3832b2610624b347e9065. The key point is that FreeBSD's tlsoffset is always relative to the TCB, whereas for Variant I TLS on NetBSD it's relative to the end of the TCB. So the original code was wrong for NetBSD but right for FreeBSD, and the updated code fixed it for NetBSD but broke FreeBSD by importing it. Will update the commit message with a properly-written summary tomorrow.

Wed, May 28, 5:06 AM
jrtc27 added a comment to D50564: libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects.

NB: I do intend to do that cleanup, just not tonight

Wed, May 28, 1:23 AM
jrtc27 added a reverting change for rGe9a38ed2fa61: rtld: fix allocate_module_tls() variant I fallback to static allocation: D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".
Wed, May 28, 1:22 AM
jrtc27 requested review of D50565: Revert "rtld: fix allocate_module_tls() variant I fallback to static allocation".
Wed, May 28, 1:21 AM
jrtc27 requested review of D50564: libc/riscv: Fix initial exec TLS mode for dynamically loaded shared objects.
Wed, May 28, 1:21 AM
jrtc27 requested review of D50563: rtld-elf/riscv: Don't allocate static TLS for dynamic TLS.
Wed, May 28, 1:21 AM

Thu, May 22

jrtc27 accepted D50475: rtld: get syscall implementations from libsys.
Thu, May 22, 9:22 PM
jrtc27 added inline comments to D50475: rtld: get syscall implementations from libsys.
Thu, May 22, 7:09 PM
jrtc27 added a comment to D50459: release: Avoid pipe in tarball creation.

would it not be even faster, and sidestep the issue entirely, if we just used bsdtar's -J flag

Good point, although that might be GNU tar on other systems? If so -J should be fine but is --options xz:threads=0 handled?

Thu, May 22, 6:44 PM
jrtc27 added a comment to D50459: release: Avoid pipe in tarball creation.

macOS's /bin/sh is governed by /private/var/select/sh. On my system it's /bin/bash and supposedly new macOS installs will default it to /bin/sh (at least according to tools/build/Makefile, which links /bin/bash into the tmp path as sh). Is there a reason to use the pipe though; would it not be even faster, and sidestep the issue entirely, if we just used bsdtar's -J flag? (You can set xz:compression-level and xz:threads on the command line)

Thu, May 22, 6:19 PM
jrtc27 updated the diff for D50468: share: Delete bitrotted make_*_driver.sh scripts.

Unhook from build and clean up

Thu, May 22, 5:09 PM
jrtc27 added a comment to D50468: share: Delete bitrotted make_*_driver.sh scripts.

Oh right yes these are actually-installed files (even more ugh), not something in tools/, so need to be unhooked from the build too. One moment...

Thu, May 22, 5:07 PM
jrtc27 requested review of D50468: share: Delete bitrotted make_*_driver.sh scripts.
Thu, May 22, 4:53 PM
jrtc27 added a comment to D50465: libsys: Use PICO_CFLAGS to disable syscall stubs.

Hm, is this because of rtld using the nossppico files from libc? I see several problems:

  1. The nossppico files really shouldn't have the syscall bodies either
  2. On CheriBSD we don't have nossppico for CHERI, since we don't have/need SSP, so rtld pulls from the regular pico files
Thu, May 22, 3:34 PM
jrtc27 added a comment to D50370: ufshci: Introduce the ufshci(4) driver.

Obligatory style review:

  • I see commented out code; either delete it or use #if(def) to gate it with an internal debug define
  • FreeBSD uses /* C-style comments */ not // C++-style comments but I see a few instances of the latter
  • Continuation lines aren't being consistently indented (I'm struggling to figure out what rule you've followed, even); they should be indented by four spaces relative to the block-level indent
  • For combinations of bitwise operations etc where the operator precedence can be unintuitive we generally include redundant parentheses to avoid the need to think about whether it's correct without them (both for reading and writing)
Thu, May 22, 3:24 PM

Wed, May 21

jrtc27 added a comment to D50459: release: Avoid pipe in tarball creation.

What shell are we using here, the default system sh? dash doesn't support pipefail, so I'm concerned this will break on Linux.

Wed, May 21, 4:15 PM

Sat, May 17

jrtc27 added a comment to D50388: src.opts.mk: Default LLVM_ASSERTIONS off.

Or, like WITNESS or MALLOC_PRODUCTION, on in HEAD and off in stable branches?

Sat, May 17, 2:15 AM

Sun, May 11

jrtc27 accepted D50297: bsdinstall: Use a login shell for final configuration..

Seems sensible to me

Sun, May 11, 4:13 PM

Sat, May 10

jrtc27 added inline comments to D44280: bsdinstall: implement rootpass with bsddialog.
Sat, May 10, 5:05 AM
jrtc27 added a member for Installer: jrtc27.
Sat, May 10, 4:16 AM

May 8 2025

jrtc27 added a comment to D50252: loader: i386: use -z nostart-stop-gc for bfd as well.

Hm, binutils should still be defaulting to -znostart-stop-gc even today in their master branch. So this really should be a no-op, this shouldn't be the cause of any issues. (Unless sjg is building with some modified environment that overrides that default, I suppose, but that's shooting oneself in the foot...)

May 8 2025, 10:49 PM

May 7 2025

jrtc27 committed rGb640600834e7: rtld-elf: Use size_t rather than uintptr_t for an index (authored by jrtc27).
rtld-elf: Use size_t rather than uintptr_t for an index
May 7 2025, 9:21 PM
jrtc27 committed rG0d12f495d8d9: rtld-elf: Use clear pointer provenance when updating DTV pointer (authored by jrtc27).
rtld-elf: Use clear pointer provenance when updating DTV pointer
May 7 2025, 7:23 PM
jrtc27 committed rG48cce2a2982f: tls: Introduce struct dtv and struct dtv_slot (authored by jrtc27).
tls: Introduce struct dtv and struct dtv_slot
May 7 2025, 7:23 PM
jrtc27 committed rGb209947fc27c: rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb (authored by jrtc27).
rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb
May 7 2025, 7:23 PM
jrtc27 committed rG3703f95c6fca: libc: Use struct tcb * rather than uintptr_t ** for the tcb (authored by jrtc27).
libc: Use struct tcb * rather than uintptr_t ** for the tcb
May 7 2025, 7:22 PM
jrtc27 committed rG14c534eaef41: rtld-elf: Use variables more consistent with Variant I for Variant II TLS (authored by jrtc27).
rtld-elf: Use variables more consistent with Variant I for Variant II TLS
May 7 2025, 7:22 PM
jrtc27 closed D50230: rtld-elf: Use clear pointer provenance when updating DTV pointer.
May 7 2025, 7:22 PM
jrtc27 committed rG62dfddd083da: libc: Use variables more consistent with Variant I for Variant II TLS (authored by jrtc27).
libc: Use variables more consistent with Variant I for Variant II TLS
May 7 2025, 7:22 PM
jrtc27 closed D50231: tls: Introduce struct dtv and struct dtv_slot.
May 7 2025, 7:22 PM
jrtc27 committed rG4642b638a522: rtld-elf: Consistently use uintptr_t for TLS implementation (authored by jrtc27).
rtld-elf: Consistently use uintptr_t for TLS implementation
May 7 2025, 7:22 PM
jrtc27 closed D50229: rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb.
May 7 2025, 7:22 PM
jrtc27 committed rG1ef9f0371e2d: libc: Consistently use uintptr_t for TLS implementation (authored by jrtc27).
libc: Consistently use uintptr_t for TLS implementation
May 7 2025, 7:22 PM
jrtc27 committed rG7953cbaabe7c: libc: Reassociate pointer arithmetic in __libc_tls_get_addr (authored by jrtc27).
libc: Reassociate pointer arithmetic in __libc_tls_get_addr
May 7 2025, 7:22 PM
jrtc27 closed D50228: libc: Use struct tcb * rather than uintptr_t ** for the tcb.
May 7 2025, 7:22 PM
jrtc27 closed D50232: rtld-elf: Use variables more consistent with Variant I for Variant II TLS.
May 7 2025, 7:22 PM
jrtc27 closed D50227: libc: Use variables more consistent with Variant I for Variant II TLS.
May 7 2025, 7:22 PM
jrtc27 closed D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
May 7 2025, 7:22 PM
jrtc27 closed D50225: libc: Consistently use uintptr_t for TLS implementation.
May 7 2025, 7:22 PM
jrtc27 closed D50224: libc: Reassociate pointer arithmetic in __libc_tls_get_addr.
May 7 2025, 7:22 PM
jrtc27 updated the summary of D50225: libc: Consistently use uintptr_t for TLS implementation.
May 7 2025, 6:24 PM
jrtc27 updated the summary of D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
May 7 2025, 6:23 PM
jrtc27 added a comment to D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
In D50226#1145897, @kib wrote:
In D50226#1145838, @kib wrote:
In D50226#1145753, @kib wrote:

For me, Elf_Addr is more natural type synonym to use in the rtld code. Also, it gives us the luxury of Elf32/64_Addr typedefs, so if needed, multilib-like rtld has an easier way to express itself.

Well, Elf_Addr is about the format of addresses within the ELF file, matching the default ELF class for the current ABI. Technically that does not have to match the format of addresses at run time (LP64 IA-64 used both ELFCLASS32 and ELFCLASS64; LP46 vs ILP32 was an orthogonal EF_IA_64_ABI64), though you probably shouldn't build a system that does that these days, and of course it definitely doesn't match the format of pointers for CHERI. The values here are not addresses in ELF files, they are pointers at run time, so they should use pointer types, and using anything other than (u)intptr_t or T * does not work on CHERI. We've already had to change this code downstream and whilst refactoring things upstream I'd like to take the time to use CHERI-compatible types rather than write new(ish) code that I know does not work for CHERI.

I think this opinion should be stated in the change' summary.

Thanks. Are you happy with the updated description?

Is it LP46 or LP64?
Yes, I think that the updated text provides better motivation for the change. Thank you.

May 7 2025, 6:23 PM
jrtc27 added inline comments to D50231: tls: Introduce struct dtv and struct dtv_slot.
May 7 2025, 6:07 PM
jrtc27 added a comment to D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
In D50226#1145838, @kib wrote:
In D50226#1145753, @kib wrote:

For me, Elf_Addr is more natural type synonym to use in the rtld code. Also, it gives us the luxury of Elf32/64_Addr typedefs, so if needed, multilib-like rtld has an easier way to express itself.

Well, Elf_Addr is about the format of addresses within the ELF file, matching the default ELF class for the current ABI. Technically that does not have to match the format of addresses at run time (LP64 IA-64 used both ELFCLASS32 and ELFCLASS64; LP46 vs ILP32 was an orthogonal EF_IA_64_ABI64), though you probably shouldn't build a system that does that these days, and of course it definitely doesn't match the format of pointers for CHERI. The values here are not addresses in ELF files, they are pointers at run time, so they should use pointer types, and using anything other than (u)intptr_t or T * does not work on CHERI. We've already had to change this code downstream and whilst refactoring things upstream I'd like to take the time to use CHERI-compatible types rather than write new(ish) code that I know does not work for CHERI.

I think this opinion should be stated in the change' summary.

May 7 2025, 5:56 PM
jrtc27 updated the summary of D50225: libc: Consistently use uintptr_t for TLS implementation.
May 7 2025, 5:56 PM
jrtc27 updated the summary of D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
May 7 2025, 5:55 PM
jrtc27 added a comment to D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
In D50226#1145753, @kib wrote:

For me, Elf_Addr is more natural type synonym to use in the rtld code. Also, it gives us the luxury of Elf32/64_Addr typedefs, so if needed, multilib-like rtld has an easier way to express itself.

May 7 2025, 5:31 PM
jrtc27 added inline comments to D50231: tls: Introduce struct dtv and struct dtv_slot.
May 7 2025, 5:23 PM
jrtc27 requested review of D50232: rtld-elf: Use variables more consistent with Variant I for Variant II TLS.
May 7 2025, 3:06 AM
jrtc27 updated the diff for D50227: libc: Use variables more consistent with Variant I for Variant II TLS.

Only include libc changes

May 7 2025, 3:04 AM
jrtc27 requested review of D50231: tls: Introduce struct dtv and struct dtv_slot.
May 7 2025, 3:01 AM
jrtc27 requested review of D50230: rtld-elf: Use clear pointer provenance when updating DTV pointer.
May 7 2025, 3:00 AM
jrtc27 requested review of D50229: rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb.
May 7 2025, 3:00 AM
jrtc27 requested review of D50228: libc: Use struct tcb * rather than uintptr_t ** for the tcb.
May 7 2025, 3:00 AM