Files
nvdriver/reports/kernel-module-codegen-validation.json
arabek 42dc565c12 The gate now judges what objtool enforces, and the strict rule stays visible as a count
- check_kernel_module.py: pass condition = every relocation in an allocatable non-executable section that resolves to code must target a landing-pad entry (addend 0). This be objtool's own rule (check.c:4611 accepts a target it knows is not an IBT target), so the gate can be green honestly instead of demanding something rustc cannot deliver.
- Strict every-entry check stays as an informational count (functions_without_endbr = 1332 on the current object) - visible, not a false failure.
- Proven against objtool on four cases, all agreeing: table without pads (both fail), table with branch protection (both pass), forced jump table (objtool errors, the check flags the mid-function relocations), current object (both pass).
- Gotchas written down: readelf pads [18] as one token but [ 5] as two, so flags were landing in the wrong column; objtool returns 0 on warnings unless --werror (CONFIG_OBJTOOL_WERROR=y adds it); the gate disassembles raw (-dr) so names match readelf.
- Gate is green on the current object: 357 data relocations to code, 0 missing pads, 0 mid-function. Counts move with the build, so read them as measured-at-the-time numbers.
2026-11-30 17:39:55 +01:00

213 lines
8.8 KiB
JSON

{
"passed": true,
"checks": {
"no_unresolved_private_or_Rust_runtime_symbols": true,
"no_unsupported_GOT_relocations": true,
"no_SIMD_x87_registers": true,
"no_Rust_unwind_sections": true,
"bounded_fixed_function_stack": true,
"no_dynamic_RSP_subtraction": true,
"no_RSP_redzone_reference": true,
"endbr64_at_data_relocation_targets": true,
"protocol_exports_present": true,
"distinct_diagnostic_module_name": true,
"no_PCI_aliases": true
},
"largest_conservative_function_stack_bytes": 1000,
"functions_without_endbr": 1332,
"endbr64_at_every_function_entry_informational": false,
"data_relocations_to_code": 357,
"data_relocation_targets_without_endbr": 0,
"data_relocations_pointing_inside_a_function": 0,
"object_sha256": "5d56363bbfa603ca66321465d9cbd4f2e38ed14f3665d8a84e7a8f5018514a0f",
"module_sha256": "84c0a56fabdcbd93ea42e4cbc6cec37b3d38eb1dbc074f7c83c05e80df0bbe0a",
"undefined_kernel_symbols": [
" U ___ratelimit",
" U __check_object_size",
" U __clear_pages_unrolled",
" U __const_udelay",
" U __default_kernel_pte_mask",
" U __dma_sync_single_for_cpu",
" U __dma_sync_single_for_device",
" U __flush_workqueue",
" U __fortify_panic",
" U __free_pages",
" U __init_swait_queue_head",
" U __init_waitqueue_head",
" U __kmalloc_cache_noprof",
" U __kmalloc_noprof",
" U __kvmalloc_node_noprof",
" U __module_get",
" U __pci_register_driver",
" U __pm_runtime_resume",
" U __preempt_count",
" U __put_task_struct_rcu_cb",
" U __ref_stack_chk_guard",
" U __stack_chk_fail",
" U __trace_set_current_state",
" U __tracepoint_sched_set_state_tp",
" U __udelay",
" U __usecs_to_jiffies",
" U __vma_start_write",
" U __wake_up",
" U _copy_from_user",
" U _copy_to_user",
" U _ctype",
" U _dev_err",
" U _dev_info",
" U _dev_warn",
" U _printk",
" U _raw_spin_lock_irqsave",
" U _raw_spin_unlock_irqrestore",
" U _totalram_pages",
" U acpi_evaluate_object",
" U alloc_pages_noprof",
" U alloc_workqueue_noprof",
" U boot_cpu_data",
" U cachemode2protval",
" U call_rcu",
" U cancel_delayed_work_sync",
" U capable",
" U complete",
" U const_current_task",
" U cpu_number",
" U current_work",
" U delayed_work_timer_fn",
" U destroy_workqueue",
" U disable_irq",
" U dma_alloc_attrs",
" U dma_buf_export",
" U dma_buf_fd",
" U dma_buf_put",
" U dma_free_attrs",
" U dma_map_page_attrs",
" U dma_map_resource",
" U dma_set_coherent_mask",
" U dma_set_mask",
" U dma_unmap_page_attrs",
" U dma_unmap_resource",
" U enable_irq",
" U fget",
" U finish_wait",
" U fput",
" U free_irq",
" U free_pages",
" U hrtimer_cancel",
" U hrtimer_setup",
" U hrtimer_start_range_ns",
" U hwmon_device_register_with_info",
" U hwmon_device_unregister",
" U init_wait_entry",
" U is_acpi_device_node",
" U iterate_fd",
" U jiffies",
" U jiffies_to_timespec64",
" U kasprintf",
" U kfree",
" U kmalloc_caches",
" U kstrdup",
" U kthread_create_on_node",
" U ktime_get_real_ts64",
" U kvfree",
" U latent_entropy",
" U lookup_address",
" U memcpy",
" U memset",
" U misc_deregister",
" U misc_register",
" U mod_timer",
" U module_put",
" U msleep",
" U mutex_init_generic",
" U mutex_lock",
" U mutex_lock_interruptible",
" U mutex_trylock",
" U mutex_unlock",
" U nonseekable_open",
" U noop_llseek",
" U nr_cpu_ids",
" U page_offset_base",
" U param_ops_bool",
" U param_ops_charp",
" U param_ops_int",
" U param_ops_uint",
" U pci_alloc_irq_vectors",
" U pci_assign_unassigned_bus_resources",
" U pci_clear_master",
" U pci_dev_get",
" U pci_dev_put",
" U pci_disable_device",
" U pci_enable_device_mem",
" U pci_find_host_bridge",
" U pci_free_irq_vectors",
" U pci_get_class",
" U pci_get_domain_bus_and_slot",
" U pci_iomap",
" U pci_iomap_range",
" U pci_iounmap",
" U pci_irq_vector",
" U pci_msix_vec_count",
" U pci_read_config_dword",
" U pci_read_config_word",
" U pci_rebar_bytes_to_size",
" U pci_rebar_get_possible_sizes",
" U pci_release_region",
" U pci_release_resource",
" U pci_request_region",
" U pci_resize_resource",
" U pci_restore_state",
" U pci_save_state",
" U pci_set_master",
" U pci_set_power_state",
" U pci_unregister_driver",
" U pci_write_config_word",
" U pgprot_writecombine",
" U phys_base",
" U pin_user_pages_fast",
" U preempt_schedule_thunk",
" U prepare_to_wait_event",
" U proc_create_single_data",
" U proc_mkdir",
" U proc_remove",
" U queue_delayed_work_on",
" U queue_work_on",
" U refcount_warn_saturate",
" U release_firmware",
" U remap_pfn_range",
" U request_firmware",
" U request_threaded_irq",
" U schedule",
" U schedule_timeout",
" U seq_printf",
" U seq_write",
" U set_memory_uc",
" U set_memory_wb",
" U sg_alloc_table",
" U sg_free_table",
" U sme_me_mask",
" U snprintf",
" U strcasecmp",
" U strchr",
" U strcmp",
" U strncmp",
" U synchronize_irq",
" U sysfs_emit",
" U system_percpu_wq",
" U timer_delete_sync",
" U timer_init_key",
" U try_module_get",
" U unpin_user_pages",
" U unpin_user_pages_dirty_lock",
" U validate_usercopy_range",
" U vm_get_page_prot",
" U vm_insert_page",
" U vmap",
" U vmemmap_base",
" U vunmap",
" U wait_for_completion",
" U wait_for_completion_timeout",
" U wake_up_process"
],
"scope": "Static codegen/export checks for the current diagnostic module only. Per-function stack accounting is not a full call-chain proof; this does not prove GPU initialization, CUDA, hardware ownership or parity."
}