Page MenuHomeFreeBSD

jrtc27 (Jessica Clarke)
User

Projects

User Details

User Since
Jul 4 2018, 7:23 PM (360 w, 1 d)

Recent Activity

Yesterday

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

Thu, May 8

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...)

Thu, May 8, 10:49 PM

Wed, May 7

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
Wed, May 7, 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
Wed, May 7, 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
Wed, May 7, 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
Wed, May 7, 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
Wed, May 7, 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
Wed, May 7, 7:22 PM
jrtc27 closed D50230: rtld-elf: Use clear pointer provenance when updating DTV pointer.
Wed, May 7, 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
Wed, May 7, 7:22 PM
jrtc27 closed D50231: tls: Introduce struct dtv and struct dtv_slot.
Wed, May 7, 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
Wed, May 7, 7:22 PM
jrtc27 closed D50229: rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb.
Wed, May 7, 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
Wed, May 7, 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
Wed, May 7, 7:22 PM
jrtc27 closed D50228: libc: Use struct tcb * rather than uintptr_t ** for the tcb.
Wed, May 7, 7:22 PM
jrtc27 closed D50232: rtld-elf: Use variables more consistent with Variant I for Variant II TLS.
Wed, May 7, 7:22 PM
jrtc27 closed D50227: libc: Use variables more consistent with Variant I for Variant II TLS.
Wed, May 7, 7:22 PM
jrtc27 closed D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 7:22 PM
jrtc27 closed D50225: libc: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 7:22 PM
jrtc27 closed D50224: libc: Reassociate pointer arithmetic in __libc_tls_get_addr.
Wed, May 7, 7:22 PM
jrtc27 updated the summary of D50225: libc: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 6:24 PM
jrtc27 updated the summary of D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 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.

Wed, May 7, 6:23 PM
jrtc27 added inline comments to D50231: tls: Introduce struct dtv and struct dtv_slot.
Wed, May 7, 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.

Wed, May 7, 5:56 PM
jrtc27 updated the summary of D50225: libc: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 5:56 PM
jrtc27 updated the summary of D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 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.

Wed, May 7, 5:31 PM
jrtc27 added inline comments to D50231: tls: Introduce struct dtv and struct dtv_slot.
Wed, May 7, 5:23 PM
jrtc27 requested review of D50232: rtld-elf: Use variables more consistent with Variant I for Variant II TLS.
Wed, May 7, 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

Wed, May 7, 3:04 AM
jrtc27 requested review of D50231: tls: Introduce struct dtv and struct dtv_slot.
Wed, May 7, 3:01 AM
jrtc27 requested review of D50230: rtld-elf: Use clear pointer provenance when updating DTV pointer.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50229: rtld-elf: Use struct tcb * rather than uintptr_t ** for the tcb.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50228: libc: Use struct tcb * rather than uintptr_t ** for the tcb.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50227: libc: Use variables more consistent with Variant I for Variant II TLS.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50226: rtld-elf: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50225: libc: Consistently use uintptr_t for TLS implementation.
Wed, May 7, 3:00 AM
jrtc27 requested review of D50224: libc: Reassociate pointer arithmetic in __libc_tls_get_addr.
Wed, May 7, 2:59 AM

Tue, May 6

jrtc27 committed rGd71c97026366: rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments (authored by jrtc27).
rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments
Tue, May 6, 10:16 PM
jrtc27 committed rGa08d92def20a: rtld-elf: Fix executable's TLS module index for direct exec (authored by jrtc27).
rtld-elf: Fix executable's TLS module index for direct exec
Tue, May 6, 10:16 PM
jrtc27 committed rG2b04ba6e08b9: rtld-elf: Fix UB for direct exec with no extra rtld arguments (authored by jrtc27).
rtld-elf: Fix UB for direct exec with no extra rtld arguments
Tue, May 6, 10:16 PM
jrtc27 committed rGc02aaba1b454: rtld-elf: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V (authored by jrtc27).
rtld-elf: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V
Tue, May 6, 10:16 PM
jrtc27 committed rG8ad9cec3a2cc: rtld-elf: Fix dlsym(3) for TLS symbols on PowerPC and RISC-V (authored by jrtc27).
rtld-elf: Fix dlsym(3) for TLS symbols on PowerPC and RISC-V
Tue, May 6, 10:16 PM
jrtc27 closed D50185: rtld-elf: Fix UB for direct exec with no extra rtld arguments.
Tue, May 6, 10:16 PM
jrtc27 closed D50187: rtld-elf: Push TLS_DTV_OFFSET into tls_get_addr_common's arguments.
Tue, May 6, 10:16 PM
jrtc27 closed D50186: rtld-elf: Fix executable's TLS module index for direct exec.
Tue, May 6, 10:16 PM
jrtc27 committed rG78b99f369f75: libc: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V (authored by jrtc27).
libc: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V
Tue, May 6, 10:16 PM
jrtc27 closed D50184: rtld-elf: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V.
Tue, May 6, 10:16 PM
jrtc27 committed rGd04c93a2adcc: libc: Don't bias DTV entries by TLS_DTV_OFFSET (authored by jrtc27).
libc: Don't bias DTV entries by TLS_DTV_OFFSET
Tue, May 6, 10:15 PM
jrtc27 closed D50183: rtld-elf: Fix dlsym(3) for TLS symbols on PowerPC and RISC-V.
Tue, May 6, 10:15 PM
jrtc27 closed D50182: libc: Fix dl_iterate_phdr's dlpi_tls_data for PowerPC and RISC-V.
Tue, May 6, 10:15 PM
jrtc27 closed D50181: libc: Don't bias DTV entries by TLS_DTV_OFFSET.
Tue, May 6, 10:15 PM
jrtc27 added inline comments to D50185: rtld-elf: Fix UB for direct exec with no extra rtld arguments.
Tue, May 6, 9:48 PM
jrtc27 committed rG52c8e24cc03b: cross-build: Provide real fflagstostr/strtofflags on Linux (authored by jrtc27).
cross-build: Provide real fflagstostr/strtofflags on Linux
Tue, May 6, 4:59 PM
jrtc27 committed rG54072047da3d: xinstall: Don't use UF_SETTABLE to infer whether st_flags is present (authored by jrtc27).
xinstall: Don't use UF_SETTABLE to infer whether st_flags is present
Tue, May 6, 4:59 PM
jrtc27 committed rGc49043eacb14: makefs: Support st_flags even on Linux (authored by jrtc27).
makefs: Support st_flags even on Linux
Tue, May 6, 4:59 PM
jrtc27 committed rGfb2e96562aeb: makefs: Fix a couple of HAVE_STRUCT_STAT_BIRTHTIME checks (authored by jrtc27).
makefs: Fix a couple of HAVE_STRUCT_STAT_BIRTHTIME checks
Tue, May 6, 4:59 PM