Page MenuHomeFreeBSD

brooks (Brooks Davis)
User

Projects

User Details

User Since
Jul 1 2014, 6:02 PM (602 w, 4 d)

Recent Activity

Yesterday

brooks added a comment to D54663: sys/abi_compat.h: fix UB.
In D54663#1250782, @kib wrote:
In D54663#1250766, @kib wrote:

After we agree on the approach and this change lands, I plan to do the pass over uses of val1/val2 in compat32, where int64_t val is used by the host ABI, converting them to freebsd32_uint64_t.

Please consider limiting this sweep to cases where the value will be mis-aligned relative to the struct.

Can you elaborate please, why? I understand that it formally changes nothing.

Fri, Jan 16, 3:03 PM
brooks added a comment to D54663: sys/abi_compat.h: fix UB.
In D54663#1250766, @kib wrote:

After we agree on the approach and this change lands, I plan to do the pass over uses of val1/val2 in compat32, where int64_t val is used by the host ABI, converting them to freebsd32_uint64_t.

Fri, Jan 16, 2:46 PM
brooks committed rGa01a4c0730c5: CODEOWNERS: register interest in some infrastructure (authored by brooks).
CODEOWNERS: register interest in some infrastructure
Fri, Jan 16, 9:45 AM
brooks committed rGd78291b0e973: lib/virtual_oss: don't (over)link to libsamplerate (authored by brooks).
lib/virtual_oss: don't (over)link to libsamplerate
Fri, Jan 16, 9:45 AM
brooks committed rG373c72ad5044: virtual_oss: build system tidying (authored by brooks).
virtual_oss: build system tidying
Fri, Jan 16, 9:45 AM
brooks committed rGadab1dd6a70e: virtual_oss: build commands/libs in parallel (authored by brooks).
virtual_oss: build commands/libs in parallel
Fri, Jan 16, 9:45 AM
brooks committed rG497a13601fb7: virtual_oss: remove needless .include in intermediate Makefile (authored by brooks).
virtual_oss: remove needless .include in intermediate Makefile
Fri, Jan 16, 9:45 AM
brooks closed D54705: lib/virtual_oss: don't (over)link to libsamplerate.
Fri, Jan 16, 9:45 AM
brooks closed D54704: vitual_oss: build system tidying.
Fri, Jan 16, 9:45 AM
brooks closed D54703: virtual_oss: build commands/libs in parallel.
Fri, Jan 16, 9:45 AM
brooks closed D54702: virtual_oss: remove needless .include in intermediate Makefile.
Fri, Jan 16, 9:45 AM
brooks committed rG296ebf7b8a50: iflib: remove convoluted custom zeroing code (authored by brooks).
iflib: remove convoluted custom zeroing code
Fri, Jan 16, 9:31 AM
brooks committed rG484edabb9455: iflib: remove convoluted custom zeroing code (authored by brooks).
iflib: remove convoluted custom zeroing code
Fri, Jan 16, 9:30 AM

Thu, Jan 15

brooks added a comment to D54704: vitual_oss: build system tidying.

Neither lib/virtual_oss nor usr.sbin/virtual_oss build with this patch:

root@freebsd:/mnt/src/lib/virtual_oss # make
Building /usr/obj/mnt/src/amd64.amd64/lib/virtual_oss/null/null.pico
In file included from /mnt/src/lib/virtual_oss/null/null.c:39:
/mnt/src/usr.sbin/virtual_oss/virtual_oss/int.h:33:10: fatal error: 'samplerate.h' file not found
   33 | #include <samplerate.h>
Thu, Jan 15, 11:55 AM
brooks accepted D54673: linuxkpi: Clean up linux_shmem_file_setup() a bit.

In practice, this would be fine with default CHERI C, but broken with subobject bounds.

Thu, Jan 15, 11:38 AM
brooks committed R11:241a2e105297: devel/llvm1[4567]: keep backport patches local (authored by brooks).
devel/llvm1[4567]: keep backport patches local
Thu, Jan 15, 10:23 AM
brooks added inline comments to D54591: devstat: Provide 32-bit compatibility.
Thu, Jan 15, 9:48 AM

Wed, Jan 14

brooks committed R11:846c560f3722: devel/llvm-devel: update to the LLVM 22 branch point (authored by brooks).
devel/llvm-devel: update to the LLVM 22 branch point
Wed, Jan 14, 3:10 PM
brooks committed R11:d5c827648ead: devel/llvm1[4567]: keep backport patches local (authored by brooks).
devel/llvm1[4567]: keep backport patches local
Wed, Jan 14, 3:09 PM
brooks added a comment to D54702: virtual_oss: remove needless .include in intermediate Makefile.

@ivy Makefile.inc defines:

PACKAGE?=	sound

Is it a problem if the inclusion is removed from here?

Wed, Jan 14, 3:01 PM
brooks accepted D54708: virtual_oss: Take MK_CUSE into account.

I'm not sure if this is the right sorting, but otherwise it's good.

Wed, Jan 14, 2:59 PM
brooks added a comment to D54705: lib/virtual_oss: don't (over)link to libsamplerate.

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.

Wed, Jan 14, 12:53 PM
brooks requested review of D54705: lib/virtual_oss: don't (over)link to libsamplerate.
Wed, Jan 14, 12:50 PM
brooks requested review of D54704: vitual_oss: build system tidying.
Wed, Jan 14, 12:50 PM
brooks requested review of D54703: virtual_oss: build commands/libs in parallel.
Wed, Jan 14, 12:50 PM
brooks requested review of D54702: virtual_oss: remove needless .include in intermediate Makefile.
Wed, Jan 14, 12:49 PM

Fri, Jan 9

brooks added a comment to D54605: iflib: remove convoluted custom zeroing code.
In D54605#1248134, @erj wrote:

If this really matters we should find a more maintainable solution.

I'm assuming it probably doesn't matter, at least until someone profiles it. Thanks for looking at it!

Fri, Jan 9, 10:01 PM
brooks added a reverting change for rG19728f31ae42: sys/_types.h: Unbreak gcc build: rG0a64d16cef17: sys/_types.h: avoid use of __has_feature().
Fri, Jan 9, 2:43 PM
brooks added a reverting change for rG029a09f18032: sys/_types.h: Actually unbreak gcc build: rG0a64d16cef17: sys/_types.h: avoid use of __has_feature().
Fri, Jan 9, 2:43 PM
brooks committed rG0a64d16cef17: sys/_types.h: avoid use of __has_feature() (authored by brooks).
sys/_types.h: avoid use of __has_feature()
Fri, Jan 9, 2:43 PM
brooks committed rG31e7dc6b9a00: iflib: remove convoluted custom zeroing code (authored by brooks).
iflib: remove convoluted custom zeroing code
Fri, Jan 9, 2:43 PM
brooks closed D54009: sys/_types.h: avoid use of __has_feature().
Fri, Jan 9, 2:43 PM
brooks added a reverting change for D53986: sys/_types.h: Actually unbreak gcc build: rG0a64d16cef17: sys/_types.h: avoid use of __has_feature().
Fri, Jan 9, 2:43 PM
brooks added a reverting change for D53980: sys/_types.h: Unbreak gcc build: rG0a64d16cef17: sys/_types.h: avoid use of __has_feature().
Fri, Jan 9, 2:43 PM
brooks closed D54605: iflib: remove convoluted custom zeroing code.
Fri, Jan 9, 2:43 PM
brooks closed D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.
Fri, Jan 9, 2:17 PM
brooks committed rG1b425afa8d5f: cache: avoid hardcoded CACHE_PATH_CUTOFF (authored by brooks).
cache: avoid hardcoded CACHE_PATH_CUTOFF
Fri, Jan 9, 2:17 PM
brooks closed D54553: cache: avoid hardcoded cache padding.
Fri, Jan 9, 2:17 PM
brooks committed rG258ad800929b: cache: avoid hardcoded cache padding (authored by brooks).
cache: avoid hardcoded cache padding
Fri, Jan 9, 2:17 PM
brooks closed D54376: cache: avoid hardcoded zone alignment.
Fri, Jan 9, 2:17 PM
brooks committed rGfb0bdbea2ed4: cache: avoid hardcoded zone alignment (authored by brooks).
cache: avoid hardcoded zone alignment
Fri, Jan 9, 2:16 PM
brooks added a comment to D54605: iflib: remove convoluted custom zeroing code.
In D54605#1247657, @erj wrote:

For additional context, I took a look at the disassembly on amd64 and the memsets are all expanded in place:

Did you look at the assembly from before the change and did it look like the post-memset change contents? I'm curious about what that custom zeroing code looked like and what it achieved.

Fri, Jan 9, 11:24 AM
brooks added a comment to D54553: cache: avoid hardcoded cache padding.

I fail to see any usefulness of CACHE_LARGE_PAD when it was introduced, which corresponds to aligning CACHE_ZONE_LARGE_SIZE to struct namecache_ts. So I'd just drop the corresponding roundup2(), with the benefit of not requiring a struct namecache_ts alignment for CACHE_ZONE_LARGE_SIZE (but then you have to change the corresponding static assertion).

Fri, Jan 9, 9:45 AM
brooks updated the diff for D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.

Fix up comment removing errors

Fri, Jan 9, 9:39 AM
brooks updated the summary of D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.
Fri, Jan 9, 9:38 AM
brooks updated the diff for D54376: cache: avoid hardcoded zone alignment.

Rename CACHE_ZONE_ALIGNMENT to CACHE_ZONE_ALIGN_MASK and use it
consistenly.

Fri, Jan 9, 9:15 AM

Thu, Jan 8

brooks updated the diff for D54605: iflib: remove convoluted custom zeroing code.

Drop *_zero functions entierly

Thu, Jan 8, 6:36 PM
brooks added a comment to D54605: iflib: remove convoluted custom zeroing code.

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)
Thu, Jan 8, 6:31 PM
brooks added a comment to D54605: iflib: remove convoluted custom zeroing code.

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.

Thu, Jan 8, 6:11 PM
brooks requested review of D54605: iflib: remove convoluted custom zeroing code.
Thu, Jan 8, 6:09 PM
brooks updated the diff for D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.

Update the CACHE_PATH_CUTOFF comment adding more context and values.

Thu, Jan 8, 1:59 PM
brooks updated the diff for D54376: cache: avoid hardcoded zone alignment.

Restore CACHE_ZONE_ALIGNMENT

Thu, Jan 8, 12:45 PM

Tue, Jan 6

brooks updated the diff for D54376: cache: avoid hardcoded zone alignment.

Address most of @jhb's feedback. Remvoe CACHE_ZONE_ALIGNMENT entierly
in favor of _Alignof(struct namecache_ts).

Tue, Jan 6, 9:35 AM
brooks requested review of D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.
Tue, Jan 6, 9:32 AM
brooks requested review of D54553: cache: avoid hardcoded cache padding.
Tue, Jan 6, 9:32 AM

Fri, Dec 26

brooks added a comment to D54376: cache: avoid hardcoded zone alignment.

This passes a universe build with:

Fri, Dec 26, 7:38 PM
brooks requested review of D54376: cache: avoid hardcoded zone alignment.
Fri, Dec 26, 7:35 PM

Mon, Dec 22

brooks accepted D54290: telnet: Remove usage of ALIGN.
Mon, Dec 22, 10:10 AM

Fri, Dec 19

brooks committed rGa79e2278c58e: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect (authored by brooks).
ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect
Fri, Dec 19, 4:00 PM
brooks closed D54232: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect.
Fri, Dec 19, 3:59 PM
brooks abandoned D54266: iwlwifi: Don't compile for clang before 19.

D54301 and D54297 will resolve this issue

Fri, Dec 19, 9:56 AM
brooks accepted D54297: LinuxKPI: bitcount fix gcc and older llvm builds.
Fri, Dec 19, 9:55 AM
brooks accepted D54301: sys/bitcount.h: add __const_bitcount<n>.

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.

Fri, Dec 19, 9:55 AM

Thu, Dec 18

brooks committed R11:1d3dab2c20c0: devel/llvm21: 21.1.8 release (authored by brooks).
devel/llvm21: 21.1.8 release
Thu, Dec 18, 10:53 PM

Dec 18 2025

brooks added a comment to D54266: iwlwifi: Don't compile for clang before 19.

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 18 2025, 3:40 PM

Dec 17 2025

brooks updated the diff for D54266: iwlwifi: Don't compile for clang before 19.

Bump compiler version to 19.1.0 since development versions may not
include __builtin_popcountg.

Dec 17 2025, 11:56 AM
brooks requested review of D54266: iwlwifi: Don't compile for clang before 19.
Dec 17 2025, 11:53 AM

Dec 16 2025

brooks updated the diff for D54232: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect.

prefix functions with ipf_

Dec 16 2025, 4:15 PM
brooks retitled D54232: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect from ipf: copy{in,out}ptr -> copy{in,out}_indirect to ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect.
Dec 16 2025, 4:15 PM

Dec 15 2025

brooks updated the diff for D54009: sys/_types.h: avoid use of __has_feature().

Switch to checking for SIZEOF_INTCAP. The compiler will define it
if it implements __intcap_t.

Dec 15 2025, 5:20 PM
brooks added a comment to D54232: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect.

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

Dec 15 2025, 2:11 PM
brooks committed rGc112ad75605c: options: describe WITH_IPFILTER_IPFS (authored by brooks).
options: describe WITH_IPFILTER_IPFS
Dec 15 2025, 1:54 PM
brooks committed rGb9b1262a8ef9: src.conf.5: regen documenting WITH_IPFILTER_IPFS (authored by brooks).
src.conf.5: regen documenting WITH_IPFILTER_IPFS
Dec 15 2025, 1:54 PM
brooks requested review of D54232: ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect.
Dec 15 2025, 1:50 PM

Dec 10 2025

brooks committed R11:83c3eed85f56: devel/llvm-{cheri,morello}: new snapshots (authored by brooks).
devel/llvm-{cheri,morello}: new snapshots
Dec 10 2025, 12:47 PM
brooks committed rG80203a27e964: Add sys/_align.h replacing machine/_align.h (authored by brooks).
Add sys/_align.h replacing machine/_align.h
Dec 10 2025, 10:58 AM
brooks committed rGcfae62eac076: libcasper: fix warnings when _ALIGN preserves types (authored by brooks).
libcasper: fix warnings when _ALIGN preserves types
Dec 10 2025, 10:58 AM
brooks committed rGac79e2e025e0: get*ent: be consistant about _ALIGN(p) - p (authored by brooks).
get*ent: be consistant about _ALIGN(p) - p
Dec 10 2025, 10:58 AM
brooks closed D53947: Add sys/_align.h replacing machine/_align.h.
Dec 10 2025, 10:58 AM
brooks closed D53946: libcasper: fix warnings when _ALIGN preserves types.
Dec 10 2025, 10:58 AM
brooks closed D53945: get*ent: be consistant about _ALIGN(p) - p.
Dec 10 2025, 10:58 AM

Dec 9 2025

brooks committed R11:128f72b23891: devel/llvm11: don't build gold plugin when disabled (authored by brooks).
devel/llvm11: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:8bdb01cdf3ff: devel/llvm19: don't build gold plugin when disabled (authored by brooks).
devel/llvm19: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:f1de64facbac: devel/llvm11: disable LLDB by default (authored by brooks).
devel/llvm11: disable LLDB by default
Dec 9 2025, 4:06 PM
brooks committed R11:6fb41863d079: devel/llvm12: don't build gold plugin when disabled (authored by brooks).
devel/llvm12: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:78ffea3bfe2b: devel/llvm13: don't build gold plugin when disabled (authored by brooks).
devel/llvm13: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:4438cc0381fc: devel/llvm15: don't build gold plugin when disabled (authored by brooks).
devel/llvm15: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:6b80b5acae0b: devel/llvm14: don't build gold plugin when disabled (authored by brooks).
devel/llvm14: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:c67ff903ebb7: devel/llvm16: don't build gold plugin when disabled (authored by brooks).
devel/llvm16: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:01d933a4488e: devel/llvm17: don't build gold plugin when disabled (authored by brooks).
devel/llvm17: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:cfedc18cd014: devel/llvm18: don't build gold plugin when disabled (authored by brooks).
devel/llvm18: don't build gold plugin when disabled
Dec 9 2025, 4:06 PM
brooks committed R11:c181633fc977: devel/llvm20: don't build gold plugin when disabled (authored by brooks).
devel/llvm20: don't build gold plugin when disabled
Dec 9 2025, 4:05 PM
brooks committed R11:9f9ae975724e: devel/llvm21: 21.1.7 release (authored by brooks).
devel/llvm21: 21.1.7 release
Dec 9 2025, 4:05 PM
brooks committed R11:4e1881d3af60: devel/llvm21: don't build gold plugin when disabled (authored by brooks).
devel/llvm21: don't build gold plugin when disabled
Dec 9 2025, 4:05 PM
brooks accepted D54147: zfs: Reuse ZINCDIR variable from kmod.mk.
Dec 9 2025, 10:11 AM

Dec 3 2025

brooks added inline comments to D53946: libcasper: fix warnings when _ALIGN preserves types.
Dec 3 2025, 3:25 PM

Dec 1 2025

brooks added inline comments to D54009: sys/_types.h: avoid use of __has_feature().
Dec 1 2025, 11:02 AM
brooks added a reverting change for rG19728f31ae42: sys/_types.h: Unbreak gcc build: D54009: sys/_types.h: avoid use of __has_feature().
Dec 1 2025, 11:00 AM
brooks requested review of D54009: sys/_types.h: avoid use of __has_feature().
Dec 1 2025, 10:59 AM
brooks added a reverting change for D53986: sys/_types.h: Actually unbreak gcc build: D54009: sys/_types.h: avoid use of __has_feature().
Dec 1 2025, 10:59 AM