mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 14:38:47 +00:00
* Refuse data relocation targets that do not resolve to an instruction boundary PR #10 comment 4742386524, cherry-picked from d91d2df onto this branch: a data relocation to .text+1 where offset 1 is inside a multi-byte instruction has no entry in instr_at, so the checker dropped it and the ENDBR rule passed having never seen the target. A target in an allocatable data section that resolves to a code section must resolve to a recorded instruction boundary, so the unresolvable case is now a failure. Resolving the refused targets exposed two facts the earlier commit had wrong: the current object does have section-symbol relocations (3 data relocations), and readelf prints section names truncated to 256 characters while objdump prints the full name (measured here: a 306-character name prints as 256 in readelf, 306 in objdump). The checker now maps the truncated name back to the full one. With both, the 3 targets resolve to endbr64 entries at addend 0: counts 357 -> 360 data relocations to code, 0 missing pads, 0 mid-function, 0 unresolved, gate green. Test: tests/kernel-module-gate/*.s + tools/test_kernel_module_gate.sh, added as a validate_all step (30/30 -> 31/31 in AGENTS.md). Cases: .rodata -> .text+6 inside a 5-byte mov must be refused; .text+0 on an endbr64 entry passes; a name over 256 characters still resolves. The checker takes an object path for this, which also stops it writing the committed report, and skips the module-only checks when kernel-open/nvidia_rs.ko is absent so synthetic objects can be checked without a build. Adapted to this branch: the new check follows ibt_enforced (CONFIG_X86_KERNEL_IBT in $(KERNEL_OUTPUT)/.config, NV_RS_KERNEL_IBT, or endbr entries in the object) instead of plain x86_64, and the resolution keeps the fn_entries entry flag that endbr64_at_data_relocation_targets uses. (cherry picked from commit d91d2df) * Say the checker's ENDBR rule is stricter than objtool's, and list the extra conditions PR #10 comment 4742452532, cherry-picked from 166a3df onto this branch. The ENDBR bullet states the checker's rule as if it were objtool's rule. Re-checked validate_ibt_data_reloc at the v6.12 tag: objtool returns 0 (accepts) when find_insn finds nothing at sym->offset + addend, when the destination is marked noendbr, and when the destination is an ENDBR that is not a function entry. The checker is a superset: recorded instruction boundary, first instruction of the function, addend 0, and endbr64 regardless of marking. Adapted to this branch: the docs here were restructured into the ENDBR / IBT bullet list, so the distinction goes as a bullet on the existing section instead of the old Gate law paragraph; the counts and the x86-gating wording already live in the bullets above. (cherry picked from commit 166a3df) * Refuse a truncated 256-character name that is not a unique identity PR #15 comment 4743365034: mapping the readelf-truncated name to the last section that shares that prefix means a relocation to one section is judged against the other section's instruction. Two sections sharing their first 256 characters print identically in readelf, so the prefix cannot identify one section. The checker now records a prefix as ambiguous when a second distinct full name shares it, and refuses any data relocation to an ambiguous target rather than guessing. Fixture tests/kernel-module-gate/duplicate-prefix.s: two code sections with the same first 256 characters, the first starting with endbr64, the second with ret, and .rodata pointing at the endbr64 entry. Before the change the checker resolved it to the second section and reported the target as missing a pad - the wrong answer for the right reason. Now it is refused. Test asserts the ambiguous count as well as the unresolved count; 4/4 pass. No ambiguity exists on the current object (1681 code sections, 11 names over 256 characters, no shared prefix), so the only report change is the new ambiguous_truncated_names field: 360 resolved targets, 0 unresolved, 0 ambiguous, gate green. * Require the module in default validation; skip its checks only in object-only mode PR #15 comment 4743365052: the module-only checks were skipped whenever the .ko was absent, so a default run against a present object and a missing nvidia_rs.ko could write passed: true with no GOT-relocation, runtime-symbol, module-name or PCI-alias check. Now the default run carries a module_present check that fails on a missing module, and the skips happen only in explicit object-only mode (--object-only), which is what the gate test uses. Writing the committed report is likewise limited to the default run, so fixture runs cannot overwrite it. Test gained a case for it: explicit paths without --object-only and a nonexistent module must report module_present false. 5/5 pass. Report records module_checks_run for the verified default run (360 targets, 0 unresolved, 0 ambiguous, green). * Assert that the positive gate fixtures actually resolve a relocation PR #15 comment 4743365065: the entry and long-name cases only checked the resolve flag, the unresolved count and the ambiguous count, and all three are satisfied by an object that resolved nothing - the silent dropping the test exists to detect. Both positive cases now also assert data_relocations_to_code == 1 and endbr64_at_data_relocation_targets, so a fixture that fails to produce the relocation fails the test. The negative cases keep their own assertions (0 resolved targets, refused), which is what a refused target looks like. 5/5 pass. * Check ambiguity on the symbol path, not only the section path PR #15 comment 4743485055: the ambiguous-name guard ran only when the relocation name was also a code section, so a symbol name reaching the checker as a shared 256-character prefix was resolved through the first entry recorded in symtrunc and judged against the wrong function's instruction. The guard now runs before resolution on both paths. Fixture tests/kernel-module-gate/duplicate-symbol-prefix.s: two symbol names sharing their first 256 characters, one exactly 256 long and one longer, with .rodata pointing at both. Measured on this box with binutils 2.47: readelf -r prints names truncated to 256 ('symAaaaaaaaaa_RINvXs9_[...]') while readelf -rW, which the checker uses, prints them in full - so the longer name is a unique identity and must resolve to its own instruction, while the 256-character name is a printed form belonging to both symbols and must be refused. Before the change the checker resolved that relocation to the first symbol disassembled, a ret, and reported the target as missing a pad. Test asserts both halves: the shared printed form refused, the unique name resolved. 6/6 pass. * Move the gate cases from the shell harness into explicit per-case asserts tools/test_kernel_module_gate.sh compared one string built from three JSON fields, so every case had to be read through the same helper and the positive cases could only assert that nothing was refused. tests/kernel-module-gate/test_gate_cases.py states, per fixture, the whole set of values the IBT rule must report - resolves, unresolved, ambiguous, resolved targets, and the endbr64 rule - and asserts the dict, so a fixture that resolves nothing fails. The module-required case asserts module_present false plus that the module-only checks were skipped. The checker is invoked with sys.executable (it is not executable in the tree) and in object-only mode, which keeps the committed report from being overwritten by fixture runs. validate_all step replaced (still 31 steps), AGENTS.md and docs/KERNEL_COMPAT.md point at the new file, fixture comments name the test that reads them. 2 tests / 6 cases pass. * Qualify the relocation rule with IBT enforcement in the gate law PR #15 comment 4743567439: the law read as if the instruction-boundary rule applied to every code target, but the checker reports data_relocation_targets_resolve_to_instructions as True when IBT is not enforced (verified against the current code: 'True if not ibt_enforced else not unresolved and not ambiguous_targets'). On a non-IBT build the check is green without having enforced anything, so the counts there are not evidence that the targets resolved. The line now states the condition and how to read a green check without it. Docs-only: AGENTS.md line 46 and the same paragraph in docs/KERNEL_COMPAT.md. No code change; the behaviour is intended (the rule is x86/IBT-specific), the wording was the problem. * Assert the shared-prefix rule instead of one readelf-dependent outcome PR #15 comment 4743709007: the duplicate-prefix expectation only held when readelf printed the relocation name truncated to 256 characters. Measured here with binutils 2.47: readelf -rW prints names taken from the section string table truncated to 256 (this fixture field is 256, and the real object has 374 fields at exactly 256) but prints symbol names in full, which is why duplicate-symbol-prefix resolves. An implementation that prints names in full, as the review measured on 2.41, makes the section case resolve to the first section endbr64 entry instead of refusing it, so the fixed expectation was tool-dependent. Two changes, both printing-independent: - the checker refuses a name only when the printed form is a truncated prefix shared by two entities; a name readelf prints in full is its own identity and resolves normally, so the symbol path no longer refuses an attributable name - test_gate_cases.py takes each shared-prefix case expectation from the printing readelf actually showed, compared against nm full names, and records which branch ran, so the assertion is the rule rather than an assumed outcome. Resolving to whichever entity was disassembled first fails whichever branch applies. Verified on this box: duplicate-prefix observed truncated, so refused; duplicate-symbol-prefix observed full, so both relocations resolved to their own entries. 6/6 cases pass, default gate unchanged (360 resolved, 0 unresolved, 0 ambiguous), no shared prefix on the current object. * Fix the shared-prefix classifier and refuse a name that cannot be attributed PR #15 comment 4743842886, two parts, both confirmed against the code: 1. observed_printing() compared relocation names with nm --defined-only, which does not list section symbols (measured: it prints nothing for the duplicate-prefix fixture), so a section name printed in full was still classified as truncated and the test would pick the wrong expectation on a readelf that does not truncate. The classifier now compares the printed field against objdump's untruncated section names and against the name the fixture intended for each relocation entry, which is the only way to tell a complete 256-character name from another name truncated onto it. 2. With the exact-length-only guard, a name of exactly 256 characters that is also another name's truncated form was resolved instead of refused: from the printed text the checker cannot know which entry produced the string, so that resolution is a guess. The guard is unconditional again for ambiguous printed names, and duplicate-symbol-prefix.s now has one relocation, targeting the longer symbol, so the test knows which entity the entry names and asserts the identity, not just the aggregate counts. Branch data measured here: GNU readelf 2.47 truncates names from the section string table (the duplicate-prefix field is 256) and prints symbol names in full under -W (262), so the section case runs the truncated branch and the symbol case runs the full branch. llvm-readelf 23 prints both in full (347 for the same object), which is the second behaviour the classifier must handle. Running the fixtures with the guard removed shows what the test is guarding: duplicate-prefix resolves instead of being refused, and the symbol case resolves to the wrong symbol, so both branches fail. 6/6 cases pass, py_compile clean, default gate unchanged (360 resolved, 0 unresolved, 0 ambiguous). * Identify relocation targets from the ELF tables, not from printed names PR #15 comment 4743869738: a printed string is not an identity. A 256-character section name P is also the printed form of a longer name P+suffix, so a relocation to the longer section was judged against P, and an endbr64 in P could make a pointer to a ret in the longer section pass. The target's entity now comes from the section header table, the symbol table and the relocation entries themselves: target section, symbol value and addend, so nothing is attributed from a printed name. objdump is still the source of instruction boundaries, so its disassembly has to be attributed to a section. A header whose printed form belongs to two sections cannot be attributed, so the prefix is recorded as ambiguous and every target in it is refused. Demonstrated on the fixture with a truncating objdump: with the guard the target is refused; with the guard removed it is attributed to whichever section was seen last, so a data pointer to a ret is not refused. duplicate-prefix.s now has the relocation name the longer section, whose entry is a ret, so the case asserts the target was attributed to the entity the ELF names rather than to the one sharing the printed prefix. 6/6 cases pass, py_compile clean, default gate unchanged (360 recorded targets, 0 unresolved, 0 ambiguous, 1332 functions without endbr), committed report byte-identical, no hardware touched. * Record data relocations to code-symbol aliases through the symbol table PR #15 comment 4743869751: objdump displays one symbol per address, so an alias for an address it had already displayed had no name to match in the first-instruction map and the relocation was dropped without being recorded - the ENDBR rule then passed over an empty set, and a pointer to a non-ENDBR instruction could pass both IBT checks. Measured before this case existed, on the committed checker: tests/kernel-module-gate/alias.s recorded 1 target and the alias at the entry was dropped. Resolved through the ELF symbol table (the previous commit) both targets are recorded: the alias at the entry is an entry pad, the alias inside the multi-byte instruction is recorded as a target that is not one. The entry flag is now the symbol's own address (addend 0), not objdump's block header, so an alias is an entry when the symbol it names is one. 7/7 gate cases pass, py_compile clean, default gate unchanged (360 recorded targets, 0 unresolved, 0 ambiguous, 1332 functions without endbr), committed report byte-identical, no hardware touched. * Guard drm_driver.date at the 6.14 boundary make modules failed on kernel 7.3.6: struct drm_driver has no date member there. Verified against the source at tags - include/drm/drm_drv.h carries char *date; through v6.13 and not at v6.14 - so the initialiser is guarded below that boundary. .major, .minor and .patchlevel are still present in the 7.3.6 header (lines 391-395), so .date is the only field that needs it. Verified by rebuilding (build only, nothing loaded, no hardware): the DRM object and all four modules link, and the gate is green on the rebuilt object. The recorded report is left as committed, since rebuilding with the pinned nightly (1.102.0-nightly 6181cc4f0, 2026-11-28) changes its codegen numbers (360 -> 205 data relocations to code, 1332 -> 1336 functions without endbr); that run's report was reverted per the decision to keep the recorded artifact. * Count only defined symbol-table entries as protocol exports PR #15 comment 4744249665: export_names was built from every symbol table entry, so a name that is only referenced (st_shndx == SHN_UNDEF) counted as an export. Measured on the new fixture, an object that references all nine protocol names and defines none reports protocol_exports_present true - the nm --defined-only check this set replaced rejected it, and object-only mode has no module undefined-symbol check to catch it. The set now skips SHN_UNDEF entries; the symbols stay in elf_symbols for relocation analysis, so a data relocation against an undefined symbol is still seen and skipped as before. Undefined entries on the current object: 134, none of them protocol names, so the recorded gate numbers do not move. test_gate_cases.py asserts both sides - undefined-exports.s (nine names referenced, none defined, exports False) and defined-exports.s (the same nine defined, exports True) - and rule() reports the export set for every case so a fixture that exports nothing asserts that. 9/9 cases pass, py_compile clean, gate green on the current build (205 recorded targets, 0 unresolved, 0 ambiguous), committed report left as recorded, no hardware touched. * Refuse a section name that cannot be attributed to one section PR #15 comment 4744249690: name_index kept only the last section index per name, so two sections sharing a name put objdump's single disassembly header under whichever index came last. Measured on the new fixture with the committed checker: an endbr64 in the first section was recorded under the second, which is empty, so the .quad pointing at that empty section resolved and passed both relocation checks. A name belonging to more than one section is not an identity, so every section sharing it is now unattributable and its targets are refused; duplicates are counted in their own key because they are not truncations, and the committed report gains that key with 0. GNU as cannot produce the shape - it merges sections that share a name and warns "ignoring changed section attributes" - so the fixture is assembled and then linked with ld -r and the linker script beside it, which keeps two output sections under one name. Duplicate section names on the current object: 0. 10/10 gate cases pass, py_compile clean, gate green on the current build (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names); the recorded report keeps its recorded numbers and gains only the new key, whose value is 0 for the recorded object as well because as and ld merge same-named sections, so that shape cannot occur in this object. No hardware touched. * Set IBT explicitly in the gate test instead of depending on the host kernel config PR #15 comment 4744572952: the refusal expectations assume IBT is enforced. Measured on this box with a kernel config that has no CONFIG_X86_KERNEL_IBT=y: the duplicate-name case reports resolves true while the case expects false, so the suite fails (9/10) - validate_all.sh runs the suite with nothing set, so any host without an IBT config fails it. The shared-prefix case has the same dependency when a tool prints the shared form, because then no entry evidence is recorded and enforcement comes only from the host config. The test now passes NV_RS_KERNEL_IBT=1 in the checker environment for every case, and the checker honours NV_RS_KERNEL_IBT=0 as an explicit override, which is what utils.mk documents for 0/1 but the checker did not implement. The disabled path is asserted separately: a fixture whose code entry is a ret with a data relocation to it reports the target as recorded and not an entry pad under enforced IBT, and reports the ENDBR rule green over the same target with ibt_gate_enforced false when IBT is not in effect - green there means skipped, which is the distinction the gate law requires. Measured: 12/12 cases pass on this box and 12/12 with a no-IBT kernel config through KERNEL_OUTPUT; the gate for the current build is unchanged (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr, enforcement true from the host config). py_compile clean, no hardware touched. * Keep entry evidence when the disassembly cannot be attributed to a section PR #15 comment 4744572963: first_instr was only written when cur was not None, so an endbr64 at a block entry inside a duplicate-name section was never recorded as entry evidence. Without an IBT kernel config or an override, that left no evidence and the ENDBR check reported green over a target that had been recorded as unattributable - the object-based fallback the docs describe was defeated. Measured on the fixture with NV_RS_KERNEL_IBT=0 against the committed checker: resolves true, one recorded target, the pointer to the empty section passing both checks. Entry evidence is now recorded independently of attribution, so enforcement comes from the object and the target is refused: ibt_gate_enforced true, unattributable_duplicate_names 1, resolves false. The gate numbers for the current object do not move, because every section on it is attributable: 205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr. 13/13 cases pass, including a case that asserts enforcement from object evidence with IBT not in effect; py_compile clean, no hardware touched. * Read extended section numbering from the header-0 escape fields PR #15 summary, extended ELF section numbering: the checker took the section count and the string table index straight from e_shnum and e_shstrndx. Per the spec (Table 3.5, gabi.xinuos.com/elf/03-sheader.html), when e_shnum is SHN_UNDEF the real count is in sh_size of header 0, and when e_shstrndx is an escape value the real string table index is in sh_link of header 0; a symbol whose st_shndx is SHN_XINDEX gets its index from the associated SHT_SYMTAB_SHNDX (type 18) section. Measured on a crafted object: readelf reads it correctly (8 headers, names resolved, symXindex resolving to index 1) while the checker saw no sections and reported green over an empty set on an object whose two data relocations point at a ret entry. The test builds the object itself - as and ld cannot emit extended numbering - and asserts the two targets are recorded and refused (2 recorded, 2 not entry pads). With the SHT_SYMTAB_SHNDX section missing the escape value names no section and objdump refuses the file, so the run exits nonzero instead of passing: measured, "symbol number 2 references nonexistent SHT_SYMTAB_SHNDX section". Nothing is dropped silently. 15/15 gate cases pass, py_compile clean. The current object has 3859 sections, below the escape bound, so the gate numbers do not move: 205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr. No hardware touched. * Load the section-name table once and decode only the name bytes PR #15 comment (nitpick, tools/check_kernel_module.py line 16): blob(shstrndx) was called for every section entry, re-reading the header and the table each time, and cstr copied the rest of the table before splitting. The table is now loaded once into shnames and reused, and cstr finds the NUL in the existing table and decodes only the name bytes. Behaviour when no terminator is present is preserved: t.find returns -1 and the slice runs to the end of the table, the same as the split. A name offset past the end of the table still decodes to the empty string. No behaviour change, so no gate number moves: 15/15 cases pass, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr). No hardware touched. * Correct the function-entry claim on the ENDBR rule PR #15 comment (docs/KERNEL_COMPAT.md line 30): the line said mid-function targets fail. Measured, they do not always. A data relocation to a label on an endbr64 inside a function passes: objdump prints every labelled symbol as its own block header, so that label is a block entry, and the check requires endbr64 at the resolved address with addend 0, not that the address is a function entry. Measured before the edit (tmp/gate-verify/midendbr2.s): entry endbr64, a nop, then a labelled endbr64 at offset 5, relocated with addend 0 - resolves true, ENDBR rule true, one recorded target. The same shape is already asserted by duplicate-symbol-prefix.s, whose relocated symbol starts at offset 1 and is recorded as an entry pad, so the docs and the case now say the same thing. The finding's alternative - enforce function-entry boundaries - is not open to this checker. objdump's block boundary is the label, so a label inside a function cannot be told from an entry from its output, and a rule keyed on symbol type would refuse the current build: all 205 recorded targets on kernel-open/nvidia/nv-rust.o_binary come from symbols that are not STT_FUNC. Line 31 carried the same false claim ("the first instruction of a function") and is corrected with the same measurement, so the distinction the docs draw against objtool stands on what the checker can actually prove: a recorded instruction boundary, endbr64 at the resolved address, addend 0. Docs only. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr - that counter counts block entries, the same ambiguity). No hardware touched. * Skip a raw reserved st_shndx as a special value, not a section reference PR #15 comment (tools/check_kernel_module.py line 72): elf_symbols stored st_shndx after SHN_XINDEX expansion only, so a symbol whose raw value is a reserved special value (SHN_ABS 65521) resolved through the section header table at that number once extended numbering made the count larger than it - measured with count 0xfff3, where 65521 is a real section as well as SHN_ABS's value. The committed checker reported green on that object with 2 recorded code targets, one of them the absolute symbol attributed to a section it does not name. The raw value is now recorded before expansion and the reserved range SHN_LORESERVE..0xfffe is skipped before the section-bounds check, while SHN_XINDEX still resolves to a real index inside that range. The symbols are not classified as unresolved or as SHN_UNDEF, and the export set keys on the raw value, so the nine absolute protocol names in the fixture are still counted as defined exports. Measured after the fix on the same object: 1 recorded target (the SHN_XINDEX symbol resolving to index 65521), 0 unresolved, exports still present. The gate test builds the object itself because as and ld cannot emit extended numbering; the symbol covering the code needs a size that spans the section, otherwise objdump prints the section as one undecodable blob instead of the endbr64 entry, measured with symbol size 1, 5 and 14, so the fixture uses 14. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr - no reserved st_shndx values on it). No hardware touched, no report key added. * State the addend-zero condition on the ENDBR pass PR #15 comment (docs/KERNEL_COMPAT.md line 30, second comment): the line described the resolution but not the pass condition, so a reader could not see that the addend is part of it. Line 30 now states that a target passes only when the instruction at the resolved address is endbr64 and the relocation addend is zero, and that the resolved address is the symbol's value plus the addend. Measured on one instruction: the same endbr64 at offset 5 inside a function fails through the addend-5 form (as emits the reloc against the section symbol) and passes through the addend-0 form against the symbol. The counter name is the reason this needs care: data_relocations_pointing_inside_a_function counts a nonzero addend, not a target inside a function body - the addend-0 measurement reports 0 there although its target is inside the function. On the current object no recorded target has a nonzero addend, so the counter and its name agree there (205 recorded, 0 counted), which is why the committed report needs no change and no key is added. Docs only. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 unresolved, 0 ambiguous, 0 duplicate names, 1336 functions without endbr). No hardware touched. * Rename the addend counter to what it actually counts Decision on a docs inaccuracy found while writing the addend clause: data_relocations_pointing_inside_a_function counted recorded targets with a nonzero addend under a name that described the target's position. Measured on tmp/gate-verify/midendbr.o: the addend-5 reloc reports 1, the addend-0 reloc to the same endbr64 reports 0 although its target is inside the function, so the name and the value disagree on a case that exists. The key is renamed to data_relocations_with_nonzero_addend in the checker and the printed summary (the committed report stays untouched, since it's machine specific and we don't want to affect that). No gate case asserts this counter (the fixtures have no nonzero addend: as emits a symbol-based reloc with addend 0 for the aliases), so the gate test is unchanged: 16/16, py_compile clean, gate green on the current build (205 recorded, 0 nonzero addend, 0 unresolved, 0 ambiguous, 0 duplicate names). No hardware touched. * Say the stricter target condition does not guarantee objtool success PR #15 comment (docs/KERNEL_COMPAT.md line 31): the line drew the comparison one way, so a reader could take a green check as an objtool pass. Verified on the source the line already quotes (v6.12 tools/objtool/check.c): validate_ibt() iterates for_each_sec over the sections read_sections built from the section header table, skips executable sections, sections with no reloc section, and a named exclusion list (.discard*, .debug*, .altinstructions, .orc_unwind_ip, __ex_table, ...), and SHF_ALLOC does not appear anywhere in check.c, so a reloc in a non-allocatable, non-executable section is checked by objtool and never reaches the checker, which requires ALLOC (if not sections[sec][1]&ALLOC or sections[sec][1]&EXEC:continue). Measured on one object with a ret entry relocated from both .rodata and a non-allocatable .note.mine: the checker records 1 target and refuses that one, and says nothing about the second (0 recorded for it); objtool would warn on both since .note.mine is not in its exclusion list. objtool itself is not installed on this box, so the objtool side is stated from the verified source, not from a run - the checker side is the measurement. Docs only. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 nonzero addend, 0 unresolved, 0 ambiguous, 0 duplicate names). No hardware touched. * Scope the recorded-target numbers to the population they were measured on PR #15 comment (docs/KERNEL_COMPAT.md line 30): the line put 205 recorded targets next to a counter whose committed value comes from a different population. Verified: the committed report records 360 recorded targets for object sha 5d56363b..., which no toolchain on this box reproduces; the current build is sha 4d06b634... and measures 205. The STT_FUNC statement was measured on the current build, so line 30 now scopes it to that population and says plainly that it is not claimed for the 360. Line 30 also now says what the rename commit did and did not change for that metric: only the key name, value 0 either way, while the committed report as a whole is not the current build's output - 360 recorded, the count having moved 357 -> 360 in c57b76b, plus the ambiguous_truncated_names and unattributable_duplicate_names fields this PR added and the module checks that only a default run produces. So a reader cannot take the committed report as a re-measurement of the current object. Docs only. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 nonzero addend, 0 unresolved, 0 ambiguous, 0 duplicate names), committed report untouched. No hardware touched. * Name what this PR added to the committed report Docs only. Gate test 16/16, py_compile clean, gate on the current build unchanged (205 recorded targets, 0 nonzero addend, 0 unresolved, 0 ambiguous, 0 duplicate names), committed report untouched. No hardware touched. Post-rebase addendum: clarify that the report was left unchanged as per the repo maintainer request. * Update kernel-module-codegen-validation.json Satisfy latest CR review * revert changes to reports/kernel-module-codegen-validation.json master branch as source of truth * Fix minor nitpick --------- Co-authored-by: arabek <arabek@noreply.codeberg.org>
10 lines
462 B
ArmAsm
10 lines
462 B
ArmAsm
# Case for test_gate_cases.py in this directory: a data relocation to a code entry that is not an
|
|
# endbr64 pad, with no entry evidence anywhere in the object. Under enforced IBT the target is recorded
|
|
# and refused; with IBT not in effect the check reports green over the same target, so the case shows
|
|
# that a green check there means the rule was skipped, not that the target was an entry pad.
|
|
.section .text,"ax"
|
|
entry:
|
|
ret
|
|
.section .rodata,"a"
|
|
.quad entry
|