User Details
- User Since
- Jul 1 2014, 6:02 PM (602 w, 4 d)
Yesterday
Thu, Jan 15
In practice, this would be fine with default CHERI C, but broken with subobject bounds.
Wed, Jan 14
I'm not sure if this is the right sorting, but otherwise it's good.
The whole stack of review builds including subdirectories that aren't connected to the build (other then sndio since I didn't have libsndio installed). However, these changes are untested and I've only verified this last change by building and examining the library with nm to verity that they don't include surprising undefined symbols.
Fri, Jan 9
Fix up comment removing errors
Rename CACHE_ZONE_ALIGNMENT to CACHE_ZONE_ALIGN_MASK and use it
consistenly.
Thu, Jan 8
Drop *_zero functions entierly
For additional context, I took a look at the disassembly on amd64 and the memsets are all expanded in place:
; memset(pi, 0, sizeof(*pi));
8461: 48 c7 85 78 ff ff ff 00 00 00 00 movq $0x0, -0x88(%rbp)
846c: 48 c7 85 70 ff ff ff 00 00 00 00 movq $0x0, -0x90(%rbp)
8477: 48 c7 85 68 ff ff ff 00 00 00 00 movq $0x0, -0x98(%rbp)
8482: 48 c7 85 60 ff ff ff 00 00 00 00 movq $0x0, -0xa0(%rbp)
848d: 48 c7 85 58 ff ff ff 00 00 00 00 movq $0x0, -0xa8(%rbp)
8498: 48 c7 85 50 ff ff ff 00 00 00 00 movq $0x0, -0xb0(%rbp)
...
; memset(ri, 0, sizeof(*ri));
8b1d: 48 c7 85 78 ff ff ff 00 00 00 00 movq $0x0, -0x88(%rbp)
8b28: 48 c7 85 70 ff ff ff 00 00 00 00 movq $0x0, -0x90(%rbp)
8b33: 48 c7 85 60 ff ff ff 00 00 00 00 movq $0x0, -0xa0(%rbp)
8b3e: 48 c7 85 58 ff ff ff 00 00 00 00 movq $0x0, -0xa8(%rbp)
8b49: 48 8b 85 48 ff ff ff movq -0xb8(%rbp), %rax
...
; memset(pi, 0, sizeof(*pi));
a9aa: 48 c7 45 a0 00 00 00 00 movq $0x0, -0x60(%rbp)
a9b2: 48 c7 45 98 00 00 00 00 movq $0x0, -0x68(%rbp)
a9ba: 48 c7 45 90 00 00 00 00 movq $0x0, -0x70(%rbp)
a9c2: 48 c7 45 88 00 00 00 00 movq $0x0, -0x78(%rbp)
a9ca: 48 c7 45 80 00 00 00 00 movq $0x0, -0x80(%rbp)
a9d2: 48 c7 85 78 ff ff ff 00 00 00 00 movq $0x0, -0x88(%rbp)
a9dd: 48 c7 85 70 ff ff ff 00 00 00 00 movq $0x0, -0x90(%rbp)
...
; memset(ri, 0, sizeof(*ri));
bc7c: 48 c7 45 b0 00 00 00 00 movq $0x0, -0x50(%rbp)
bc84: 48 c7 45 a8 00 00 00 00 movq $0x0, -0x58(%rbp)
bc8c: 48 c7 45 a0 00 00 00 00 movq $0x0, -0x60(%rbp)
bc94: 48 c7 45 98 00 00 00 00 movq $0x0, -0x68(%rbp)
bc9c: 48 c7 45 90 00 00 00 00 movq $0x0, -0x70(%rbp)
...
; memset(pi, 0, sizeof(*pi));
dc56: 48 c7 45 c8 00 00 00 00 movq $0x0, -0x38(%rbp)
dc5e: 48 c7 45 c0 00 00 00 00 movq $0x0, -0x40(%rbp)
dc66: 48 c7 45 b8 00 00 00 00 movq $0x0, -0x48(%rbp)
dc6e: 48 c7 45 b0 00 00 00 00 movq $0x0, -0x50(%rbp)
dc76: 48 c7 45 a8 00 00 00 00 movq $0x0, -0x58(%rbp)
dc7e: 48 c7 45 a0 00 00 00 00 movq $0x0, -0x60(%rbp)
dc86: 48 c7 45 98 00 00 00 00 movq $0x0, -0x68(%rbp)CHERI adds yet another branch to the ifdefs and makes this worse and harder to maintain so it's time for it to go. The compiler is also free to recognize the pattern here as memset and replace the code with a libcall so this optimization isn't reliable in any way.
Update the CACHE_PATH_CUTOFF comment adding more context and values.
Restore CACHE_ZONE_ALIGNMENT
Tue, Jan 6
Address most of @jhb's feedback. Remvoe CACHE_ZONE_ALIGNMENT entierly
in favor of _Alignof(struct namecache_ts).
Fri, Dec 26
This passes a universe build with:
Mon, Dec 22
Fri, Dec 19
LGTM. Out of paranoia, I verified using compiler explorer that it's reliably const enough to use in a macro even at -O0 with an old clang.
Thu, Dec 18
Dec 18 2025
I don't care how it's fixed, but I will commit this pretty soon if a broader fix isn't added. The linuxkpi fix should never have been committed without a fallback.
Dec 17 2025
Bump compiler version to 19.1.0 since development versions may not
include __builtin_popcountg.
Dec 16 2025
prefix functions with ipf_
Dec 15 2025
Switch to checking for SIZEOF_INTCAP. The compiler will define it
if it implements __intcap_t.
These names aren't generic and I'd like to use them for copy{in,out} variants that explicitly preserve pointer provenance as part of the CHERI import (we currently use copy{in,out}cap in CheriBSD to preserved pointer provenance when pointers are implemented as CHERI capabilities, but think it's better to talk about pointers rather than capabilities which have too many meanings even within the tree.)
