Page MenuHomeFreeBSD

netchild (Alexander Leidinger)
User

Projects (2)

User Details

User Since
Jul 25 2015, 10:06 AM (590 w, 2 d)

Recent Activity

Sat, Nov 14

netchild accepted D61053: hwpmc_amd: Support Large Increment per Cycle events.
Sat, Nov 14, 10:52 AM

Thu, Nov 12

netchild added a comment to D61053: hwpmc_amd: Support Large Increment per Cycle events.

I have run this through my checks... there are some findings:

Thu, Nov 12, 2:32 PM
netchild committed R11:882943b44f14: www/piwigo: remove superflous entry in plist.
Thu, Nov 12, 12:50 PM

Wed, Nov 11

netchild added a comment to D61328: jail: index prison ids to optimize lookups.

As for real world case, we're building a cloud service that runs on pretty large hosts with over 1k jails per host. So, O(n) time is quite noticeable and jls enumeration (which takes n get_jail(lastjid) calls) is quite something.

Wed, Nov 11, 11:13 AM
netchild added a comment to D61328: jail: index prison ids to optimize lookups.

There are some style issues, you can run run clang-format (not in base, e.g. clang-format19 -i tests/sys/kern/jail_jid_index.c tools/test/jail/jail_get_bench.c) and/or tools/build/checkstyle9.pl to see them:

  • 25 lines over 80 columns
  • 4 “trailing statements should be on next line”
  • 3 “parentheses required on return”
  • 2 each: “spaces required around =”, “complex macro needs parentheses”, foo * bar, and comment * alignment
  • 1 each: “spaces required around ==”, and braces on a single-statement block
Wed, Nov 11, 10:56 AM

Tue, Nov 10

netchild committed R11:4691be577639: www/piwigo: Update to 16.5.0..
Tue, Nov 10, 9:37 PM

Mon, Nov 9

netchild added a comment to D61328: jail: index prison ids to optimize lookups.

Can you please describe why this is needed? Where do you see a performance issue in-practice in a real-world scenario?

Mon, Nov 9, 6:04 PM

Tue, Nov 3

netchild added a comment to D61166: iflib: prefer simple_tx over mp_ring.

FWIW: I run simple_tx since our discussion about the watchdog on the system which triggered my watchdog changes. I can not tell anything about the performance (heavily under-equiped memory there), but I can not see any obvious ill-effects.

Tue, Nov 3, 7:43 PM

Thu, Oct 29

netchild committed rGf581891cd16c: vfs_register: prevent kernel crash.
Thu, Oct 29, 8:45 AM
netchild committed rG83fdec2d26fc: vfs_register: prevent kernel crash.
Thu, Oct 29, 8:42 AM

Oct 13 2026

netchild added a comment to D60625: libpmc: Map AMD Family 1Ah models 00h-0Fh to amdzen5.

Not sure it's worth the bloat of adding test cases for these things.

Oct 13 2026, 6:56 PM

Oct 10 2026

netchild added a comment to D59549: tests/sys/pmc: add pidtrack, callchain, pmc(8), RAPL and AMD tests.
  • Turin, family 1Ah models 00h–0Fh. If I read it correctly, the test calls these Zen 5, but mapfile.csv on the main branch sends them to the amdzen6 tables (added in 178d0b5b8da7 by Ali Mashtizadeh). The test’s result doesn’t change, because the events it expects are in both tables. Can you please check?
  • pmu_mux_test: Again, if I read this correctly: Five cases only run on Zen 4. What they test depends on how many core counters there are, not on the CPU generation. Can you please check?
Oct 10 2026, 8:32 AM

Sep 30 2026

netchild committed rGb32597a90dfb: hwpmc tests: the sampling log file.
Sep 30 2026, 5:13 PM
netchild committed rG4a82521f9a11: hwpmc: add credential-transition exec tests (keep and drop).
Sep 30 2026, 5:13 PM
netchild committed rG81ddb2e01569: hwpmc tests: process-attachment lifecycle and ownership cases.
Sep 30 2026, 5:13 PM
netchild committed rG198c334c1983: hwpmc: add tests for handle validation and the privilege boundaries.
Sep 30 2026, 5:13 PM
netchild committed rGd5a5e414c32d: hwpmc: add regression tests for a credential-changing exec.
Sep 30 2026, 5:12 PM
netchild committed rG517d051b81f1: hwpmc tests: sort the list of test programs.
Sep 30 2026, 5:12 PM
netchild committed rG63b3fdee0416: hwpmc tests: the sampling log file.
Sep 30 2026, 5:08 PM
netchild committed rG913328f5c784: hwpmc: add credential-transition exec tests (keep and drop).
Sep 30 2026, 5:08 PM
netchild committed rG7fc003779456: hwpmc tests: process-attachment lifecycle and ownership cases.
Sep 30 2026, 5:08 PM
netchild committed rG24b4ea09496d: hwpmc: add tests for handle validation and the privilege boundaries.
Sep 30 2026, 5:07 PM
netchild committed rG8ba25f084d04: hwpmc: add regression tests for a credential-changing exec.
Sep 30 2026, 5:07 PM
netchild committed rG299197df10be: hwpmc tests: sort the list of test programs.
Sep 30 2026, 5:07 PM
netchild added a comment to D59748: Jail init process and virtual reboot.

This is interesting. I asked Claude Code to help a bit with the review...

Ah, my first encounter with Claude. So how much of this was Claude Code, and how much was you?

Sep 30 2026, 8:07 AM

Sep 29 2026

netchild added a comment to D59748: Jail init process and virtual reboot.

This is interesting. I asked Claude Code to help a bit with the review...

Sep 29 2026, 8:01 PM
netchild added a comment to D60025: sys/uio: add updateiov().

A bit late...

Sep 29 2026, 7:11 PM
netchild added a comment to D59549: tests/sys/pmc: add pidtrack, callchain, pmc(8), RAPL and AMD tests.
  • tests/sys/pmc/Makefile drops existing tests, looks like an updated tree got only your makefile based on an older version
  • similar for etc/mtree/BSD.tests.dist (loses changes from Sept 1-5)
  • the Kyuafiles are not supposed to be committed (generated), so they should not be in the diff. I suspect an in-src-tree build instead of "make objdir" before the build.
  • The helper pmcinfo_thread_count is not built. It moved from PROGS+= to PROGS_TESTSDIR+=, and nothing in share/mk reads that variable. The in-tree way is BINDIR= ${TESTSDIR} plus PROGS+=, as in tests/sys/cam/ctl/Makefile. That missing BINDIR is probably why Paulo's build installed it to /.
Sep 29 2026, 6:58 PM

Sep 23 2026

netchild committed rG044cae040488: ipfw tests: cover layer-2 filtering of unmapped mbufs.
Sep 23 2026, 12:48 PM
netchild committed rG3897678132e7: vfs_register: prevent kernel crash.
Sep 23 2026, 12:48 PM
netchild closed D59390: ipfw tests: cover layer-2 filtering of unmapped mbufs.
Sep 23 2026, 12:48 PM
netchild closed D59839: vfs_register: prevent kernel crash.
Sep 23 2026, 12:48 PM

Sep 19 2026

netchild requested review of D59839: vfs_register: prevent kernel crash.
Sep 19 2026, 10:20 AM
netchild updated the summary of D59390: ipfw tests: cover layer-2 filtering of unmapped mbufs.
Sep 19 2026, 9:51 AM
netchild updated the diff for D59390: ipfw tests: cover layer-2 filtering of unmapped mbufs.

unmapped_block now denies the data segments instead of the handshake (tcpdatalen 1000-65535): 71 s -> 1.5 s, and an unfixed kernel panics on it

Sep 19 2026, 9:47 AM
netchild abandoned D59389: ipfw: pull up only the headers ipfw_chk() inspects.

Superseeded by D59426

Sep 19 2026, 9:13 AM

Sep 18 2026

netchild added a comment to D59549: tests/sys/pmc: add pidtrack, callchain, pmc(8), RAPL and AMD tests.

Makefiles:

  • tests/sys/Makefile descends into tests/sys/amd, which this diff no longer creates.
  • tests/sys/pmc/Makefile says SUBDIR+= amd. bsd.test.mk reserves SUBDIR for helper/data dirs; only TESTS_SUBDIRS gets include("amd/Kyuafile") in the parent Kyuafile, so as posted kyua test from /usr/tests are not run. And it's ungated: MK_PMC is default-on everywhere, the C tests need do_cpuid() from <machine/cpufunc.h> (amd64/i386 only) → aarch64/riscv/powerpc break. The architecture guard needs to be here.
  • pmc_pidtrack_test is a .c file listed under ATF_TESTS_SH. atf.test.mk makes it depend on pmc_pidtrack_test.sh, which doesn't exist. ATF_TESTS_C is the correct one.
Sep 18 2026, 7:33 AM

Sep 17 2026

netchild added a comment to D59549: tests/sys/pmc: add pidtrack, callchain, pmc(8), RAPL and AMD tests.

Please update to a recent version of the main branch. You created a new pmc/Makefile, but the tip of main has one already. As-is the patch does not apply, and is not self-sufficient. It also contains a build-host hack (include dir and lib dir pointing hardcoded to /usr/local, whereas ATF should be in the base and doesn't need that. I have seen several internal Jira IDs. Not sure if you want to have that in public. And tests are skipped unless amd.pmc.grouping.runtime is set (which nothing does in this patch). umcdf/amd_umcdf_common.h still uses /dev/cpuctl0 (do_cpuid() went into amd_pmc_test_common.h only). The family/model messages and the AuthenticAMD-25-00-1 fixture names still print hex where the map now has the names.

Sep 17 2026, 12:30 PM

Sep 15 2026

netchild added a comment to D59549: tests/sys/pmc: add pidtrack, callchain, pmc(8), RAPL and AMD tests.
  • End of last month I added some tests/sys/pmc tests. While the items in this review seem to be AMD specific, they are testing parts of the PMC subsystem. I would expect the tests in the pmc directory (if you want in an amd subdirectory, but I have already some amd specific tests in the main OMC directory), than as it is vice versa.
  • Is it feasible to use speaking names for model in amd_umcdf_map_zen()?
  • hwpmc_exterr_test.c is a near-copy of the in-tree tests/sys/pmc/pmc_exterr_test.c. 13 of 14 case names identical; adds amd_missing_pmu_flag, drops amd_invalid_df_config_bits. Copyright/author line changed from the original.
  • The directory never builds. tests/sys/Makefile gains TESTS_SUBDIRS+= ${_amd} but _amd is defined nowhere in the diff (the _pmc/_audit pattern needs the .if … _amd= amd .endif block, and _pmc is also gated on MK_PMC, which this isn't).
  • tests/sys/amd/pmc/Makefile starts with a UTF-8 BOM and has no trailing newline. make may choke on the BOM.
  • Content for other diffs shipped here. msr_snapshot.[ch] is not compiled ("see follow-on diff").
  • The two umcdf/ headers seem to belong to to something that isn't in this diff, yet five pmc tests #include "../umcdf/amd_umcdf_common.h" for Zen-generation decoding. Not sure if the decde should belong together with amd_pmc_test_common.h or with this something else not included here.
  • hwpmc_rdpmc_test is in the Makefile and the diff but not in the summary.
  • Roughly half the suite is not AMD-specific. The callchain-UR regression (af3929c5152b, 66118c3f1011 — both vendor-neutral hwpmc_mod.c fixes), pmcstat TSC column, group-alloc atomicity, pidtrack, pmc(8) CLI smoke: they only use AMD event names. Under tests/sys/pmc/ with a per-vendor event table they'd cover Intel too. Having this in a vendor-specific subdirectory would need a reorg to add intel support. Better to not use a vendor specific directory (I do not ask someone from AMD to provide the Intel parts, but not making it harder to add them would be polite).
  • Vendor detection via /dev/cpuctl0 (needs cpuctl.ko + root) in the C tests vs. kern.hwpmc.cpuid in the sh tests. <machine/cpufunc.h> do_cpuid() needs no device.
  • AMDID2_* redefined instead of <machine/specialreg.h>.
  • "../amd_pmc_test_common.h" relative includes and -I${SRCTOP}/tests/sys/amd — one is redundant.
Sep 15 2026, 5:28 PM

Sep 12 2026

netchild accepted D59589: website: Restore "The Power to Serve" on homepage.
Sep 12 2026, 4:20 PM

Sep 11 2026

netchild closed D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

I forgot to add the revision in the commit...
https://cgit.freebsd.org/src/commit/?id=26248c370fade359e5303094fb57102d7fcc9c78

Sep 11 2026, 6:03 PM
netchild committed rG8209ceeb7504: if_bridge: count the drops on the fragmentation path.
Sep 11 2026, 5:17 PM
netchild committed rG26248c370fad: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 11 2026, 5:16 PM
netchild closed D59391: if_bridge: count the drops of the fragmentation path.
Sep 11 2026, 5:16 PM

Sep 10 2026

netchild updated the diff for D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

Limit the SNAP pullup length via min(m_pkthdr.len, ETHER_HDR_LEN + sizeof(struct llc)), per gallatin@.

Sep 10 2026, 12:45 PM

Sep 9 2026

netchild added inline comments to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 9 2026, 8:11 AM

Sep 8 2026

netchild added inline comments to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 8 2026, 8:21 PM

Sep 6 2026

netchild committed R11:34c3b48f8644: security/lua-resty-openssl: Update to 1.9.0 (authored by longros).
Sep 6 2026, 6:03 PM
netchild committed rGe48af5f99566: rc.subr: svcj - send the stop signal from inside the service jail (authored by joneum).
Sep 6 2026, 10:02 AM
netchild committed rG4c84a6a29ce6: rc.subr tests: service jail behaviour of run_rc_command.
Sep 6 2026, 10:02 AM
netchild committed rGf1cc2f565739: rc.conf.5: note that a negative nice value does not reach a service jail.
Sep 6 2026, 10:02 AM
netchild committed rGaf97285a6726: rc.subr: svcj - add a setaudit option.
Sep 6 2026, 10:02 AM
netchild committed rGf74c4cb8a2ed: rc.subr: svcj - run a service's own restart and status methods in its jail.
Sep 6 2026, 10:01 AM
netchild committed rG37a4bc181810: rc.subr: svcj - remove the service jail when the service is not running.
Sep 6 2026, 10:01 AM
netchild committed rG2c9ed2b6a129: rc.subr: svcj - let svcj_all_enable enable service jails.
Sep 6 2026, 10:01 AM

Sep 5 2026

netchild added a comment to D59391: if_bridge: count the drops of the fragmentation path.

The bad: label in the previous revision gets called for ether types 0x88e1 (HomePlug AV management frames) and 0x8912 (not named in sys/net/ethernet.h) via the default: case and with net.link.bridge.pfil_onlyip=1. This looks to me like a policy drop and not an error path. As such I removed that part. Correct me if I get this wrong... (447 such packets in 300s doesn't not sound like an error to me).

Sep 5 2026, 5:27 PM
netchild retitled D59391: if_bridge: count the drops of the fragmentation path from if_bridge: count the packets bridge_pfil() drops on error
Sep 5 2026, 5:23 PM
netchild updated the diff for D59391: if_bridge: count the drops of the fragmentation path.

rework: the bad: counter is removed; only the fragmentation path is counted

Sep 5 2026, 5:12 PM

Sep 4 2026

netchild added a comment to D59391: if_bridge: count the drops of the fragmentation path.

The following part may need to get a rework for this change... investigating...

Sep 4 2026, 8:11 PM
netchild added inline comments to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 4 2026, 7:40 PM
netchild added a comment to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

There are a couple of other places in if_bridge where we m_copyup() up to max_protohdr bytes. Do we need to fix those as well? m_copyup() doesn't handle extpg mbufs, though it wouldn't be hard to just fix that directly.

Sep 4 2026, 7:05 PM
netchild added a comment to D59389: ipfw: pull up only the headers ipfw_chk() inspects.

Ok, this mess mostly comes from me. While reviewing this patch I came to alternative that I will post soon.

Sep 4 2026, 6:53 PM
netchild added a comment to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

D59389 has a similar fix for ipfw.

Sep 4 2026, 1:54 PM
netchild published D59391: if_bridge: count the drops of the fragmentation path for review.
Sep 4 2026, 1:53 PM
netchild published D59390: ipfw tests: cover layer-2 filtering of unmapped mbufs for review.

Unit test for the issue in D59389.

Sep 4 2026, 1:51 PM
netchild published D59389: ipfw: pull up only the headers ipfw_chk() inspects for review.
Sep 4 2026, 1:48 PM
netchild retitled D59332: if_bridge: pull up only the headers bridge_pfil() inspects from if_bridge: map unmapped mbufs before filtering
Sep 4 2026, 1:44 PM
netchild updated the diff for D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

Narrowed per markj@: pull up ETHER_HDR_LEN first, the SNAP/LLC header only when the frame is long enough to carry one. No mb_unmapped_to_ext() call. Rebased on current main.

Sep 4 2026, 1:43 PM

Sep 3 2026

netchild added inline comments to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 3 2026, 4:09 PM
netchild added a comment to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.
Sep 3 2026, 12:00 PM
netchild added a comment to D59332: if_bridge: pull up only the headers bridge_pfil() inspects.

After a bit more digging around. This does not seem only to be a particular problem for the bridge, this is a problem for everything pfil related...
ipfw_check_frame_mbuf() seems to have the same bug (depends on net.link.ether.ipfw=1).
pf's ethernet hook seems to be safe at first look (m_copydata()).
if_enc passes the chain without touching, safe.
dummynet: pulls 14 bytes, so probably safe.
ipfilter: no idea, maybe.

Sep 3 2026, 11:33 AM
netchild published D59333: pf tests: cover filtering of bridged unmapped mbufs for review.

This is a test for the fix in D59332

Sep 3 2026, 7:02 AM
netchild published D59332: if_bridge: pull up only the headers bridge_pfil() inspects for review.

Unit tests in D59333

Sep 3 2026, 7:01 AM

Sep 2 2026

netchild added a comment to D59204: iflib: Require sustained demand for TX watchdog.

The patchset is now running on the host which needs the watchdog to trigger from time to time. It needs a while to run into the issue.

Any idea how long this will take to trigger? I'd really like this patch to be pushed, as my test machines are all delivering spurious WD resets and need this patch merged (and a follow-on of my own to fix the world for ktls as well)

Sep 2 2026, 7:34 AM
netchild added a comment to D59294: iflib: Do not hold the ifnet lock across registration.

This fixes the hang at boot I've seen.

Sep 2 2026, 7:31 AM

Sep 1 2026

netchild added a comment to D59308: rc.subr: serialize service-jail creation to avoid a create-create race.

But don't we want the second one to fail?
Why do I want the second one to succeed?
When I run a non-svc start in parllel, I would want only one to succeed (if we think about nginx, or mysql or such).
What if someone hits ctrl-c after taking the lock?

Sep 1 2026, 9:09 PM
netchild added a comment to D59204: iflib: Require sustained demand for TX watchdog.

The patchset is now running on the host which needs the watchdog to trigger from time to time. It needs a while to run into the issue.

Sep 1 2026, 12:30 PM

Aug 30 2026

netchild committed rGb5dcd8f9d6ae: rc.subr tests: service jail behaviour of run_rc_command.
Aug 30 2026, 5:45 PM
netchild committed rG6155e17019f6: rc.subr: svcj - send the stop signal from inside the service jail (authored by joneum).
Aug 30 2026, 5:45 PM
netchild committed rGbe834d62e990: rc.conf.5: note that a negative nice value does not reach a service jail.
Aug 30 2026, 5:45 PM
netchild committed rG9125bc0727db: rc.subr: svcj - add a setaudit option.
Aug 30 2026, 5:45 PM
netchild committed rG327dae508105: rc.subr: svcj - run a service's own restart and status methods in its jail.
Aug 30 2026, 5:45 PM
netchild committed rGa70ca1ebd8ad: rc.subr: svcj - remove the service jail when the service is not running.
Aug 30 2026, 5:45 PM
netchild committed rG21e53eeaffca: rc.subr: svcj - let svcj_all_enable enable service jails.
Aug 30 2026, 5:44 PM

Aug 29 2026

netchild added inline comments to D59204: iflib: Require sustained demand for TX watchdog.
Aug 29 2026, 9:24 AM
netchild added a comment to D59204: iflib: Require sustained demand for TX watchdog.

My build is still running on the old hardware where I can test this.
Quick check, if I get it right:

  • this solves the issue where demand is false on the next period.
  • this does not solve an issue where ~1 packet per period is send while more than one is in the queue (no idea if this is behavior we can see in the real world): growth every period → demand true every period → armed reaches 4 → still resets.
Aug 29 2026, 9:19 AM

Aug 27 2026

netchild committed rG8f0789bee7ab: hwpmc tests: the sampling log file.
Aug 27 2026, 2:04 PM
netchild committed rGbea7b932b9ee: hwpmc: add credential-transition exec tests (keep and drop).
Aug 27 2026, 2:04 PM
netchild committed rGd00da14532bc: hwpmc tests: process-attachment lifecycle and ownership cases.
Aug 27 2026, 2:04 PM
netchild committed rG17fca802ded1: hwpmc: add tests for handle validation and the privilege boundaries.
Aug 27 2026, 2:03 PM
netchild committed rG068957e040f4: hwpmc: add regression tests for a credential-changing exec.
Aug 27 2026, 2:03 PM
netchild committed rGdf537ff1520d: hwpmc tests: sort the list of test programs.
Aug 27 2026, 2:03 PM

Aug 23 2026

netchild added a comment to D59102: hwpmc: Fix the exec handler.
	if (PMC_SYSTEM_SAMPLING_ACTIVE() || PMC_PROC_IS_USING_PMCS(p)) {
		VOP_UNLOCK(imgp->vp);
-		pe.pm_credentialschanged = credential_changing;
+		pe.pm_credentialschanged = imgp->credential_setid;

filemon already does it this way — filemon_wrapper.c:127-129 pairs the same priv_check_cred(cred, PRIV_DEBUG_DIFFCRED) with imgp->newcred != NULL && imgp->credential_setid.
With this change, my 32 test cases pass (= no regression to what we have right now, except the security issue gone).

Yes, thanks. Probably exec should just be passing imgp directly to these hooks. (HWT has a nearly duplicate hook, but it doesn't seem to check for setuid/setgid switches. OTOH it is currently only usable by privileged users, at least today. Something to fix, but not in this patch.)

Aug 23 2026, 5:02 PM
netchild committed rG9c8bcdddb35e: hwpmc: build hwpmc_rapl.c into the i386 module.
Aug 23 2026, 8:12 AM
netchild committed rGd2e7fcb6dd79: hwpmc: do not register RAPL when the unit register reads as zero.
Aug 23 2026, 8:12 AM
netchild committed rG469727f0637b: hwpmc: probe the RAPL unit MSR instead of faulting on it.
Aug 23 2026, 8:12 AM

Aug 22 2026

netchild added a comment to D59102: hwpmc: Fix the exec handler.

My tests detect a regression:

Aug 22 2026, 2:23 PM
netchild committed rGfd7171d78f3b: rc.d/bgfsck: use the correct variable name.
Aug 22 2026, 10:44 AM
netchild committed rG0bee17af48dd: etc/rc.subr: svcj - use the filename for services.
Aug 22 2026, 10:44 AM

Aug 14 2026

netchild committed rG84d8d2878a6e: rc.d/bgfsck: use the correct variable name.
Aug 14 2026, 8:00 AM