Repository navigation
feat(libs): add four sysctl MIB mappings and an IME setter - #8553
fishingpvalues wants to merge 7 commits into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
The Everything else is green: Conventions, PR labels, PR intake. The pr-overlap note against #6936 is a benign adjacency in |
|
@fishingpvalues Thanks. The four mappings use the MIBs already recorded from the console measurement, and the test table covers them. One small docs request. With the After that, the bar is a full CI run with |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Moved |
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main b607bfd and FreeBSD 11.4 (sys/kern/kern_sysctl.c, kern_exec.c, subr_smp.c, kern_tc.c, sched_ule.c):
- The four MIBs match the console values main already records (SystemConfiguration.cpp:115-118 and the libkernel.md entry). FreeBSD 11.4 is consistent with them: all eight nodes are OID_AUTO, and
sysctl_register_oidcounts OID_AUTO numbers down from 0x7fffffff, which gives values near INT_MAX and children numbered below their parents. sysctlbynameon these names still returns ENOENT throughIsUnansweredName, as measured; only the name-to-MIB step changes. The branch merges cleanly.- Small description note: since 950a21a, unknown names return -1/ENOENT rather than throwing; the code and debt text are already right.
- Optional: the test declares the IME setter with
boolwhile Export.cpp usesstd::uint8_t; matching them would keep the declarations consistent.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
What
Two small exports that titles actually reach:
libkernel:sysctlnametomibnow resolveskern.smp.maxcpus,kern.stackprot,kern.sched.nameandkern.timecounter.hardwareto the MIBs measured on a PS5 (firmware 12.70) payload process: {1, 2147482816, 2147482814}, {1, 2147483151}, {1, 2147483182, 2147483181} and {1, 2147482838, 2147482834}. Payloads that probe these names (e.g. allocator probes) no longer get an exception;sysctlby those exact MIBs still returns -1/ENOENT as measured, and writes throw.libSceIme:sceImeSetConsecutiveClauseConversionEnabledstops throwing and returns 0 for any value. PPSA24191 calls it with 1 before everysceImeOpenand opens the panel only when it returns 0; nothing consumes the flag, so no state is stored.Tested
macOS (Apple Silicon). Both affected test targets compile in a linux/amd64 container build; running the ctests there fails on unmodified main too because the emulated x86_64 CPU lacks AVX/BMI2 which the guest libs' host-CPU check requires. Verified with a source-level smoke script instead: the four mappings match the measured console MIBs, pre-existing table entries are untouched, the short-buffer/size-query/truncation semantics of
sysctlnametomibare unchanged, unknown names still throw, and the IME setter no longer callsNotImplemented_nid_no_patch.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)