{
  "ml": {
    "v": "4",
    "fs": [
      {
        "id": 0,
        "prob": 0.9147847294807434,
        "class": 0
      }
    ],
    "prob": 0.9147847,
    "class": 0,
    "version": "v16.16",
    "thresholds": [
      0.9815004,
      0.99404883
    ],
    "analyzed_at": "2026-04-30T04:52:38Z"
  },
  "path": "busdma_machdep.c",
  "raw": {
    "v": "4",
    "fs": [
      {
        "f": "O(Er₂)",
        "x": 1,
        "id": 0,
        "is": [
          "SYSCTL_NODE",
          "SYSCTL_UINT",
          "SYSCTL_UINT",
          "SYSCTL_UINT",
          "SYSCTL_UINT",
          "SYSCTL_COUNTER_U64",
          "SYSCTL_COUNTER_U64",
          "SYSCTL_COUNTER_U64",
          "SYSCTL_COUNTER_U64",
          "SYSCTL_COUNTER_U64",
          "SYSCTL_COUNTER_U64",
          "MALLOC_DEFINE",
          "counter_u64_alloc",
          "counter_u64_alloc",
          "counter_u64_alloc",
          "counter_u64_alloc",
          "counter_u64_alloc",
          "counter_u64_alloc",
          "busdma_bufalloc_create",
          "busdma_bufalloc_create",
          "SYSINIT",
          "vm_addr_align_ok",
          "KASSERT",
          "alignment_bounce",
          "cacheline_bounce",
          "cacheline_bounce",
          "exclusion_bounce",
          "addr_needs_bounce",
          "KASSERT",
          "powerof2",
          "KASSERT",
          "KASSERT",
          "powerof2",
          "KASSERT",
          "malloc",
          "CTR4",
          "trunc_page",
          "trunc_page",
          "MIN",
          "MAX",
          "MAX",
          "MIN",
          "exclusion_bounce_check",
          "alignment_bounce",
          "roundup2",
          "alloc_bounce_zone",
          "free",
          "ptoa",
          "atop",
          "alloc_bounce_pages",
          "free",
          "atomic_add_32",
          "CTR4",
          "free",
          "CTR3",
          "alloc_bounce_zone",
          "STAILQ_INIT",
          "atop",
          "roundup2",
          "MIN",
          "MAX",
          "alloc_bounce_pages",
          "KASSERT",
          "malloc",
          "CTR3",
          "STAILQ_INIT",
          "allocate_map",
          "CTR3",
          "allocate_bz_and_pages",
          "free",
          "atomic_add_32",
          "atomic_add_32",
          "STAILQ_FIRST",
          "CTR3",
          "atomic_subtract_32",
          "atomic_subtract_32",
          "free",
          "CTR2",
          "allocate_map",
          "CTR4",
          "busdma_bufalloc_findzone",
          "exclusion_bounce",
          "uma_zalloc",
          "howmany",
          "MIN",
          "kmem_alloc_attr",
          "kmem_alloc_contig",
          "CTR4",
          "free",
          "atomic_add_32",
          "atomic_add_32",
          "atomic_add_32",
          "CTR4",
          "busdma_bufalloc_findzone",
          "exclusion_bounce",
          "uma_zfree",
          "kmem_free",
          "atomic_subtract_32",
          "atomic_subtract_32",
          "atomic_subtract_32",
          "free",
          "CTR3",
          "CTR5",
          "must_bounce",
          "MIN",
          "CTR1",
          "CTR5",
          "MIN",
          "predict_true",
          "pmap_kextract",
          "pmap_extract",
          "must_bounce",
          "CTR1",
          "counter_u64_add",
          "counter_u64_add",
          "might_bounce",
          "bus_dmamap_count_phys",
          "counter_u64_add",
          "bus_dmamap_reserve_pages",
          "must_bounce",
          "MIN",
          "add_bounce_page",
          "PHYS_TO_VM_PAGE",
          "KASSERT",
          "bus_dmamap_addsegs",
          "bus_dmamap_unload",
          "bus_dmamap_load_ma_triv",
          "counter_u64_add",
          "counter_u64_add",
          "counter_u64_add",
          "counter_u64_add",
          "might_bounce",
          "bus_dmamap_count_pages",
          "counter_u64_add",
          "bus_dmamap_reserve_pages",
          "predict_true",
          "pmap_kextract",
          "pmap_extract",
          "MIN",
          "must_bounce",
          "add_bounce_page",
          "PHYS_TO_VM_PAGE",
          "KASSERT",
          "bus_dmamap_addsegs",
          "MIN",
          "bus_dmamap_unload",
          "free_bounce_pages",
          "mtx_lock",
          "mtx_unlock",
          "dcache_wb_poc",
          "dcache_wb_poc",
          "dcache_inv_poc_dma",
          "min",
          "pmap_quick_enter_page",
          "KASSERT",
          "VM_PAGE_TO_PHYS",
          "VM_PAGE_TO_PHYS",
          "dcache_wb_poc",
          "dma_preread_safe",
          "dcache_inv_poc",
          "panic",
          "pmap_quick_remove_page",
          "STAILQ_FIRST",
          "CTR4",
          "pmap_quick_enter_page",
          "bcopy",
          "pmap_quick_remove_page",
          "dcache_wb_poc",
          "STAILQ_NEXT",
          "STAILQ_FIRST",
          "dcache_inv_poc_dma",
          "STAILQ_NEXT",
          "dcache_inv_poc",
          "pmap_quick_enter_page",
          "bcopy",
          "pmap_quick_remove_page",
          "STAILQ_NEXT",
          "dsb",
          "cpu_l2cache_drain_writebuf",
          "CTR4",
          "dma_dcache_sync"
        ],
        "ms": {
          "text": {
            "tab_count": 1578.0,
            "digit_ratio": 0.01,
            "space_count": 4500.0,
            "total_lines": 1305.0,
            "char_entropy": 5.35,
            "mixed_indent": true,
            "unique_chars": 94.0,
            "import_density": 13.87,
            "string_density": 0.1,
            "avg_line_length": 29.17,
            "max_line_length": 80.0,
            "empty_line_ratio": 0.1,
            "last_line_length": 1.0,
            "most_common_char": "a",
            "whitespace_ratio": 0.19,
            "most_common_ratio": 0.06,
            "identifier_density": 1.09,
            "line_length_stddev": 24.09,
            "normalized_import_count": 5.01,
            "normalized_string_count": 3.76,
            "repeated_char_sequences": 1.0,
            "suspicious_comment_ratio": 0.12,
            "max_inline_whitespace_run": 5.0,
            "normalized_function_count": 0.78,
            "imports_to_functions_ratio": 6.46,
            "strings_to_functions_ratio": 4.86,
            "suspicious_identifier_ratio": 0.01,
            "normalized_unique_identifiers": 22.61,
            "identifiers_to_functions_ratio": 8.36
          },
          "imports": {
            "total": 181.0,
            "unique_modules": 74.0,
            "third_party_count": 181.0,
            "third_party_ratio": 1.0
          },
          "strings": {
            "total": 136.0,
            "avg_length": 29.33,
            "max_length": 90.0,
            "path_count": 2.0,
            "avg_entropy": 3.62,
            "total_bytes": 3989.0,
            "entropy_stddev": 0.49
          },
          "comments": {
            "chars": 11910.0,
            "lines": 293.0,
            "total": 66.0,
            "xxx_count": 2.0,
            "to_code_ratio": 0.29,
            "high_entropy_comments": 8.0
          },
          "functions": {
            "total": 28.0,
            "length_stddev": 35.34,
            "over_100_lines": 3.0,
            "avg_name_length": 88.0,
            "no_params_count": 28.0,
            "avg_length_lines": 35.96,
            "max_length_lines": 131.0,
            "min_length_lines": 6.0,
            "high_entropy_names": 28.0,
            "density_per_100_lines": 2.15,
            "code_in_functions_ratio": 0.77
          },
          "identifiers": {
            "total": 1423.0,
            "avg_length": 11.39,
            "max_length": 33.0,
            "min_length": 1.0,
            "avg_entropy": 2.81,
            "reuse_ratio": 0.16,
            "unique_count": 234.0,
            "length_stddev": 6.36,
            "has_digit_ratio": 0.06,
            "sequential_names": 3.0,
            "single_char_count": 3.0,
            "single_char_ratio": 0.01,
            "high_entropy_count": 44.0,
            "high_entropy_ratio": 0.19,
            "all_lowercase_ratio": 0.71,
            "all_uppercase_ratio": 0.24,
            "numeric_suffix_count": 10.0,
            "double_underscore_count": 1.0,
            "underscore_prefix_count": 14.0
          }
        },
        "ss": [
          [
            1633,
            "\u003csys/param.h\u003e"
          ],
          [
            1656,
            "\u003csys/systm.h\u003e"
          ],
          [
            1679,
            "\u003csys/malloc.h\u003e"
          ],
          [
            1703,
            "\u003csys/bus.h\u003e"
          ],
          [
            1724,
            "\u003csys/busdma_bufalloc.h\u003e"
          ],
          [
            1757,
            "\u003csys/counter.h\u003e"
          ],
          [
            1782,
            "\u003csys/interrupt.h\u003e"
          ],
          [
            1809,
            "\u003csys/kernel.h\u003e"
          ],
          [
            1833,
            "\u003csys/ktr.h\u003e"
          ],
          [
            1854,
            "\u003csys/lock.h\u003e"
          ],
          [
            1876,
            "\u003csys/memdesc.h\u003e"
          ],
          [
            1901,
            "\u003csys/proc.h\u003e"
          ],
          [
            1923,
            "\u003csys/mutex.h\u003e"
          ],
          [
            1946,
            "\u003csys/sysctl.h\u003e"
          ],
          [
            1970,
            "\u003csys/uio.h\u003e"
          ],
          [
            1992,
            "\u003cvm/vm.h\u003e"
          ],
          [
            2011,
            "\u003cvm/vm_param.h\u003e"
          ],
          [
            2036,
            "\u003cvm/vm_page.h\u003e"
          ],
          [
            2060,
            "\u003cvm/vm_phys.h\u003e"
          ],
          [
            2084,
            "\u003cvm/vm_map.h\u003e"
          ],
          [
            2107,
            "\u003cvm/vm_extern.h\u003e"
          ],
          [
            2133,
            "\u003cvm/vm_kern.h\u003e"
          ],
          [
            2158,
            "\u003cmachine/atomic.h\u003e"
          ],
          [
            2186,
            "\u003cmachine/bus.h\u003e"
          ],
          [
            2211,
            "\u003cmachine/cpu.h\u003e"
          ],
          [
            2236,
            "\u003cmachine/md_var.h\u003e"
          ],
          [
            3661,
            "Busdma parameters"
          ],
          [
            3662,
            "Busdma parameters"
          ],
          [
            3760,
            "Number of active tags"
          ],
          [
            3761,
            "Number of active tags"
          ],
          [
            3863,
            "Number of active maps"
          ],
          [
            3864,
            "Number of active maps"
          ],
          [
            3968,
            "Number of active maps for bus_dmamem_alloc buffers"
          ],
          [
            3969,
            "Number of active maps for bus_dmamem_alloc buffers"
          ],
          [
            4106,
            "Number of active maps with BUS_DMA_COHERENT flag set"
          ],
          [
            4107,
            "Number of active maps with BUS_DMA_COHERENT flag set"
          ],
          [
            4285,
            "Number of load operations performed"
          ],
          [
            4286,
            "Number of load operations performed"
          ],
          [
            4419,
            "Number of load operations that used bounce buffers"
          ],
          [
            4420,
            "Number of load operations that used bounce buffers"
          ],
          [
            4568,
            "Number of load operations on BUS_DMA_COHERENT memory"
          ],
          [
            4569,
            "Number of load operations on BUS_DMA_COHERENT memory"
          ],
          [
            4717,
            "Number of load operations on bus_dmamem_alloc buffers"
          ],
          [
            4718,
            "Number of load operations on bus_dmamem_alloc buffers"
          ],
          [
            4863,
            "Number of load operations for mbufs"
          ],
          [
            4864,
            "Number of load operations for mbufs"
          ],
          [
            4997,
            "Number of load operations on physical buffers"
          ],
          [
            4998,
            "Number of load operations on physical buffers"
          ],
          [
            6096,
            "busdma"
          ],
          [
            6097,
            "busdma"
          ],
          [
            6106,
            "busdma metadata"
          ],
          [
            6107,
            "busdma metadata"
          ],
          [
            6598,
            "../../kern/subr_busdma_bounce.c"
          ],
          [
            6599,
            "../../kern/subr_busdma_bounce.c"
          ],
          [
            7156,
            "buffer"
          ],
          [
            7157,
            "buffer"
          ],
          [
            7792,
            "coherent"
          ],
          [
            7793,
            "coherent"
          ],
          [
            11534,
            "%s: unsupported alignment (0x%08lx) for buffer not \"\n\t    \"allocated by bus_dmamem_alloc()"
          ],
          [
            11534,
            "%s: unsupported alignment (0x%08lx) for buffer not "
          ],
          [
            11535,
            "%s: unsupported alignment (0x%08lx) for buffer not "
          ],
          [
            11593,
            "allocated by bus_dmamem_alloc()"
          ],
          [
            11594,
            "allocated by bus_dmamem_alloc()"
          ],
          [
            12891,
            "dma tag boundary %lu, must be a power of 2"
          ],
          [
            12892,
            "dma tag boundary %lu, must be a power of 2"
          ],
          [
            13003,
            "dma tag boundary %lu is \u003c maxsegsz %lu\\n"
          ],
          [
            13004,
            "dma tag boundary %lu is \u003c maxsegsz %lu"
          ],
          [
            13123,
            "dma tag alignment %lu, must be non-zero power of 2"
          ],
          [
            13124,
            "dma tag alignment %lu, must be non-zero power of 2"
          ],
          [
            13215,
            "dma tag maxsegsz must not be zero"
          ],
          [
            13216,
            "dma tag maxsegsz must not be zero"
          ],
          [
            13535,
            "%s returned tag %p tag flags 0x%x error %d"
          ],
          [
            13536,
            "%s returned tag %p tag flags 0x%x error %d"
          ],
          [
            16000,
            "%s returned tag %p tag flags 0x%x error %d"
          ],
          [
            16001,
            "%s returned tag %p tag flags 0x%x error %d"
          ],
          [
            16844,
            "%s tag %p error %d"
          ],
          [
            16845,
            "%s tag %p error %d"
          ],
          [
            18441,
            "cannot allocate %u dma segments (max is %u)"
          ],
          [
            18442,
            "cannot allocate %u dma segments (max is %u)"
          ],
          [
            18761,
            "%s: tag %p error %d"
          ],
          [
            18762,
            "%s: tag %p error %d"
          ],
          [
            19238,
            "%s: tag %p error %d"
          ],
          [
            19239,
            "%s: tag %p error %d"
          ],
          [
            20185,
            "%s: tag %p error %d"
          ],
          [
            20186,
            "%s: tag %p error %d"
          ],
          [
            20490,
            "%s: tag %p error 0"
          ],
          [
            20491,
            "%s: tag %p error 0"
          ],
          [
            21187,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            21188,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            23492,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            23493,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            23810,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            23811,
            "%s: tag %p tag flags 0x%x error %d"
          ],
          [
            24725,
            "%s: tag %p flags 0x%x"
          ],
          [
            24726,
            "%s: tag %p flags 0x%x"
          ],
          [
            24999,
            "lowaddr= %d, boundary= %d, alignment= %d\"\n\t\t    \" map= %p, pagesneeded= %d"
          ],
          [
            24999,
            "lowaddr= %d, boundary= %d, alignment= %d"
          ],
          [
            25000,
            "lowaddr= %d, boundary= %d, alignment= %d"
          ],
          [
            25048,
            " map= %p, pagesneeded= %d"
          ],
          [
            25049,
            " map= %p, pagesneeded= %d"
          ],
          [
            25537,
            "pagesneeded= %d"
          ],
          [
            25538,
            "pagesneeded= %d"
          ],
          [
            25847,
            "lowaddr= %d, boundary= %d, alignment= %d\"\n\t\t    \" map= %p, pagesneeded= %d"
          ],
          [
            25847,
            "lowaddr= %d, boundary= %d, alignment= %d"
          ],
          [
            25848,
            "lowaddr= %d, boundary= %d, alignment= %d"
          ],
          [
            25896,
            " map= %p, pagesneeded= %d"
          ],
          [
            25897,
            " map= %p, pagesneeded= %d"
          ],
          [
            26536,
            "pagesneeded= %d"
          ],
          [
            26537,
            "pagesneeded= %d"
          ],
          [
            28156,
            "%s: page at PA:0x%08lx is not in \"\n\t\t\t\t    \"vm_page_array"
          ],
          [
            28156,
            "%s: page at PA:0x%08lx is not in "
          ],
          [
            28157,
            "%s: page at PA:0x%08lx is not in "
          ],
          [
            28200,
            "vm_page_array"
          ],
          [
            28201,
            "vm_page_array"
          ],
          [
            31151,
            "%s: page at PA:0x%08lx is not \"\n\t\t\t\t\t    \"in vm_page_array"
          ],
          [
            31151,
            "%s: page at PA:0x%08lx is not "
          ],
          [
            31152,
            "%s: page at PA:0x%08lx is not "
          ],
          [
            31193,
            "in vm_page_array"
          ],
          [
            31194,
            "in vm_page_array"
          ],
          [
            33636,
            "unexpected vm_page_t phys: 0x%08x != 0x%08x"
          ],
          [
            33637,
            "unexpected vm_page_t phys: 0x%08x != 0x%08x"
          ],
          [
            34595,
            "unsupported combination of sync operations: \"\n                              \"0x%08x\\n"
          ],
          [
            34595,
            "unsupported combination of sync operations: "
          ],
          [
            34596,
            "unsupported combination of sync operations: "
          ],
          [
            34672,
            "0x%08x\\n"
          ],
          [
            34673,
            "0x%08x"
          ],
          [
            35343,
            "%s: tag %p tag flags 0x%x op 0x%x \"\n\t\t    \"performing bounce"
          ],
          [
            35343,
            "%s: tag %p tag flags 0x%x op 0x%x "
          ],
          [
            35344,
            "%s: tag %p tag flags 0x%x op 0x%x "
          ],
          [
            35386,
            "performing bounce"
          ],
          [
            35387,
            "performing bounce"
          ],
          [
            39216,
            "%s: tag %p tag flags 0x%x op 0x%x \"\n\t\t    \"performing sync"
          ],
          [
            39216,
            "%s: tag %p tag flags 0x%x op 0x%x "
          ],
          [
            39217,
            "%s: tag %p tag flags 0x%x op 0x%x "
          ],
          [
            39259,
            "performing sync"
          ],
          [
            39260,
            "performing sync"
          ]
        ],
        "sz": 39373,
        "ts": [
          {
            "c": 0.800000011920929,
            "d": "TAILQ list manipulation in kernel context",
            "e": [
              "TAILQ_NEXT"
            ],
            "i": "objectives/evasion/kernel-hide/lkm::tailq-manipulation",
            "l": 1
          },
          {
            "c": 0.8500000238418579,
            "d": "FreeBSD sysctl interface header",
            "e": [
              "sys/sysctl.h"
            ],
            "i": "objectives/evasion/kernel-hide/lkm::sys-sysctl-header",
            "l": 2
          }
        ],
        "sha": "8b7b0dee65fde58054d5f1cb43cc691f0cbed37b1daa77c45df2726cc00e301b",
        "path": "busdma_machdep.c",
        "type": "c"
      }
    ],
    "tv": "f6eaa"
  }
}