{ "results": [ { "index": 0, "function": "ax25_send_frame", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8aa0c9e3", "address_formatted": "0xffffffff8aa0c9e3 (0xffffffff8aa0c350 + 0x693)", "addr2line_address": "0xffffffff8aa0c9e3", "source": { "primary": { "function": "_Z14kmemdup_noprofPKvU25pass_dynamic_object_size0mj", "file": "include/linux/fortify-string.h", "line": 763 }, "inlined_frames": [ { "function": "ax25_send_frame", "file": "net/ax25/ax25_out.c", "line": 78 } ] }, "function_source": { "file": "include/linux/fortify-string.h", "start_line": 751, "end_line": 764, "code": "\nextern void *__real_kmemdup(const void *src, size_t len, gfp_t gfp) __RENAME(kmemdup_noprof)\n __realloc_size(2);\n__FORTIFY_INLINE void *kmemdup_noprof(const void * const POS0 p, size_t size, gfp_t gfp)\n{\n const size_t p_size = __struct_size(p);\n\n if (__compiletime_lessthan(p_size, size))\n __read_overflow();\n if (p_size < size)\n fortify_panic(FORTIFY_FUNC_kmemdup, FORTIFY_READ, p_size, size,\n __real_kmemdup(p, 0, gfp));\n return __real_kmemdup(p, size, gfp);\n}\n" }, "git_blame_hashes": [ "21a2c74b0a2a784228c9e3af63cff96d0dea7b8a", "74df22453c51392476117d7330bf02cee6e987cf", "7bd230a26648ac68ab3731ebbc449090f0ac6a37", "9e4a617757273a86b560c1ece40c48e4940a3c79", "a28a6e860c6cf231cf3c5171c75c342adcd00406", "fa35198f39571bbdae53c5b321020021eaad6bd2" ], "blame_details": [ { "hash": "74df22453c51392476117d7330bf02cee6e987cf", "subject": "kunit/fortify: Fix replaced failure path to unbreak __alloc_size", "fixes_tag": "fa4a3f86d498", "link": "https://lore.kernel.org/r/20240501232937.work.532-kees@kernel.org" }, { "hash": "7bd230a26648ac68ab3731ebbc449090f0ac6a37", "subject": "mm/slab: enable slab allocation tagging for kmalloc and friends", "link": "https://lkml.kernel.org/r/20240321163705.3067592-26-surenb@google.com" }, { "hash": "21a2c74b0a2a784228c9e3af63cff96d0dea7b8a", "subject": "fortify: Use const variables for __member_size tracking", "link": "https://lore.kernel.org/r/20230407192717.636137-4-keescook@chromium.org" }, { "hash": "9e4a617757273a86b560c1ece40c48e4940a3c79", "subject": "string: Add __realloc_size hint to kmemdup()" }, { "hash": "fa35198f39571bbdae53c5b321020021eaad6bd2", "subject": "fortify: Explicitly check bounds are compile-time constants", "link": "https://lore.kernel.org/lkml/20220920192202.190793-3-keescook@chromium.org" }, { "hash": "a28a6e860c6cf231cf3c5171c75c342adcd00406", "subject": "string.h: move fortified functions definitions in a dedicated header.", "link": "https://lkml.kernel.org/r/20210111092141.22946-2-laniel_francis@privacyrequired.com" } ], "fix_candidates": [ { "hash": "939c5de3c70d", "subject": "mm/slab: call kmalloc_noprof() unconditionally in kmalloc_array_noprof()", "fixes_hash": "7bd230a26648ac68ab3731ebbc449090f0ac6a37" } ], "recent_commits": [ { "hash": "61307b7be41a", "subject": "Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm" }, { "hash": "7bd230a26648", "subject": "mm/slab: enable slab allocation tagging for kmalloc and friends" }, { "hash": "74df22453c51", "subject": "kunit/fortify: Fix replaced failure path to unbreak __alloc_size" }, { "hash": "3d965b33e40d", "subject": "fortify: Improve buffer overflow reporting" }, { "hash": "4ce615e798a7", "subject": "fortify: Provide KUnit counters for failure testing" }, { "hash": "475ddf1fce1e", "subject": "fortify: Split reporting and avoid passing string pointer" }, { "hash": "21a2c74b0a2a", "subject": "fortify: Use const variables for __member_size tracking" }, { "hash": "9e4a61775727", "subject": "string: Add __realloc_size hint to kmemdup()" }, { "hash": "9f7d69c5cd23", "subject": "fortify: Convert to struct vs member helpers" }, { "hash": "fa35198f3957", "subject": "fortify: Explicitly check bounds are compile-time constants" } ], "disasm": "ffffffff8aa0c9a3:\tcall ffffffff81aba970 <__rcu_read_unlock>\nffffffff8aa0c9a8:\tlea 0x10(%r13),%rdi\nffffffff8aa0c9ac:\tmov $0x7,%edx\nffffffff8aa0c9b1:\tmov 0x8(%rsp),%rsi\nffffffff8aa0c9b6:\tcall ffffffff82310fd0 <__asan_memcpy>\nffffffff8aa0c9bb:\tlea 0x17(%r13),%rdi\nffffffff8aa0c9bf:\tmov $0x7,%edx\nffffffff8aa0c9c4:\tmov %r12,%rsi\nffffffff8aa0c9c7:\tcall ffffffff82310fd0 <__asan_memcpy>\nffffffff8aa0c9cc:\ttest %r14,%r14\nffffffff8aa0c9cf:\tje ffffffff8aa0ca1d \nffffffff8aa0c9d1:\tmov $0x42,%esi\nffffffff8aa0c9d6:\tmov %r14,%rdi\nffffffff8aa0c9d9:\tmov $0x820,%edx\nffffffff8aa0c9de:\tcall ffffffff820f4170 \nffffffff8aa0c9e3:\tmov %rax,%r15 <<< crash\nffffffff8aa0c9e6:\tlea 0x20(%r13),%r14\nffffffff8aa0c9ea:\tmov %r14,%r12\nffffffff8aa0c9ed:\tshr $0x3,%r12\nffffffff8aa0c9f1:\tmovabs $0xdffffc0000000000,%rax\nffffffff8aa0c9fb:\tcmpb $0x0,(%r12,%rax,1)" }, { "index": 1, "function": "kasan_check_range", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8230f694", "address_formatted": "0xffffffff8230f694 (0xffffffff8230f430 + 0x264)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8230f693", "source": { "primary": { "function": "check_region_inline", "file": "mm/kasan/generic.c", "line": 0 }, "inlined_frames": [ { "function": "kasan_check_range", "file": "mm/kasan/generic.c", "line": 200 } ] }, "function_source": null, "note": "addr2line returned line 0 for mm/kasan/generic.c \u2014 DWARF may be incomplete at this address" }, { "index": 2, "function": "__asan_memcpy", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff82310ff9", "address_formatted": "0xffffffff82310ff9 (0xffffffff82310fd0 + 0x29)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff82310ff8", "source": { "primary": { "function": "__asan_memcpy", "file": "mm/kasan/shadow.c", "line": 105 }, "inlined_frames": [] }, "function_source": { "file": "mm/kasan/shadow.c", "start_line": 100, "end_line": 110, "code": "EXPORT_SYMBOL(__asan_memmove);\n#endif\n\nvoid *__asan_memcpy(void *dest, const void *src, ssize_t len)\n{\n if (!kasan_check_range(src, len, false, _RET_IP_) ||\n !kasan_check_range(dest, len, true, _RET_IP_))\n return NULL;\n\n return __memcpy(dest, src, len);\n}\n" }, "git_blame_hashes": [ "69d4c0d3218692ffa56b0e1b9c76c50c699d7044", "bb6e04a173f06e51819a4bb512e127dfbc50dcfa" ], "recent_commits": [ { "hash": "bb6e04a173f0", "subject": "kasan: use internal prototypes matching gcc-13 builtins" }, { "hash": "69d4c0d32186", "subject": "entry, kasan, x86: Disallow overriding mem*() functions" } ] }, { "index": 3, "function": "kmemdup_noprof", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff820f41c5", "address_formatted": "0xffffffff820f41c5 (0xffffffff820f4170 + 0x55)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff820f41c4", "source": { "primary": { "function": "kmemdup_noprof", "file": "mm/util.c", "line": 0 }, "inlined_frames": [] }, "function_source": null, "note": "addr2line returned line 0 for mm/util.c \u2014 DWARF may be incomplete at this address" }, { "index": 4, "function": "rose_t0timer_expiry", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8a9f7005", "address_formatted": "0xffffffff8a9f7005 (0xffffffff8a9f6db0 + 0x255)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8a9f7004", "source": { "primary": { "function": "rose_send_frame", "file": "net/rose/rose_link.c", "line": 0 }, "inlined_frames": [ { "function": "rose_transmit_restart_request", "file": "net/rose/rose_link.c", "line": 0 }, { "function": "rose_t0timer_expiry", "file": "net/rose/rose_link.c", "line": 0 } ] }, "function_source": null, "note": "addr2line returned line 0 for net/rose/rose_link.c \u2014 DWARF may be incomplete at this address" }, { "index": 5, "function": "call_timer_fn", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff81b24b22", "address_formatted": "0xffffffff81b24b22 (0xffffffff81b24990 + 0x192)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff81b24b21", "source": { "primary": { "function": "call_timer_fn", "file": "kernel/time/timer.c", "line": 1748 }, "inlined_frames": [] }, "function_source": { "file": "kernel/time/timer.c", "start_line": 1720, "end_line": 1764, "code": "EXPORT_SYMBOL_GPL(timer_shutdown_sync);\n\nstatic void call_timer_fn(struct timer_list *timer,\n void (*fn)(struct timer_list *),\n unsigned long baseclk)\n{\n int count = preempt_count();\n\n#ifdef CONFIG_LOCKDEP\n /*\n * It is permissible to free the timer from inside the\n * function that is called from it, this we need to take into\n * account for lockdep too. To avoid bogus \"held lock freed\"\n * warnings as well as problems when looking into\n * timer->lockdep_map, make a copy and use that here.\n */\n struct lockdep_map lockdep_map;\n\n lockdep_copy_map(&lockdep_map, &timer->lockdep_map);\n#endif\n /*\n * Couple the lock chain with the lock chain at\n * timer_delete_sync() by acquiring the lock_map around the fn()\n * call here and in timer_delete_sync().\n */\n lock_map_acquire(&lockdep_map);\n\n trace_timer_expire_entry(timer, baseclk);\n fn(timer);\n trace_timer_expire_exit(timer);\n\n lock_map_release(&lockdep_map);\n\n if (count != preempt_count()) {\n WARN_ONCE(1, \"timer: %pS preempt leak: %08x -> %08x\\n\",\n fn, count, preempt_count());\n /*\n * Restore the preempt count. That gives us a decent\n * chance to survive and extract information. If the\n * callback kept a lock held, bad luck, but not worse\n * than the BUG() we had.\n */\n preempt_count_set(count);\n }\n}\n" }, "git_blame_hashes": [ "354b46b1a0adda1dd5b7f0bc2a5604cca091be5f", "4a2b4b222743bb07fedf985b884550f2ca067ea9", "4d82a1debbffec129cc387aafa8f40b7bbab3297", "576da126a6c7364d70dfd58d0bbe43d05cf5859f", "802702e0c2618465b813242d4dfee6a233ba0beb", "9b13df3fb64ee95e2397585404e442afee2c7d4f", "d75f773c86a2b8b7278e2c33343b46a4024bc002", "f28d3d5346e97e60c81f933ac89ccf015430e5cf", "f571faf6e443b6011ccb585d57866177af1f643c" ], "recent_commits": [ { "hash": "f571faf6e443", "subject": "timers: Provide timer_shutdown[_sync]()" }, { "hash": "9b13df3fb64e", "subject": "timers: Rename del_timer_sync() to timer_delete_sync()" }, { "hash": "0968621917ad", "subject": "Merge tag 'printk-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk" }, { "hash": "d75f773c86a2", "subject": "treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively" }, { "hash": "f28d3d5346e9", "subject": "timer/trace: Improve timer tracing" }, { "hash": "354b46b1a0ad", "subject": "timer: Switch callback prototype to take struct timer_list * argument" }, { "hash": "c1eba5bcb643", "subject": "timer: Pass timer_list pointer to callbacks unconditionally" }, { "hash": "4a2b4b222743", "subject": "sched: Introduce preempt_count accessor functions" }, { "hash": "4d82a1debbff", "subject": "lockdep: fix oops in processing workqueue" }, { "hash": "802702e0c261", "subject": "timer: Try to survive timer callback preempt_count leak" } ] }, { "index": 6, "function": "__run_timer_base", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff81b207a2", "address_formatted": "0xffffffff81b207a2 (0xffffffff81b20150 + 0x652)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff81b207a1", "source": { "primary": { "function": "expire_timers", "file": "kernel/time/timer.c", "line": 1799 }, "inlined_frames": [ { "function": "__run_timers", "file": "kernel/time/timer.c", "line": 2374 }, { "function": "__run_timer_base", "file": "kernel/time/timer.c", "line": 2386 } ] }, "function_source": { "file": "kernel/time/timer.c", "start_line": 1765, "end_line": 1805, "code": "\nstatic void expire_timers(struct timer_base *base, struct hlist_head *head)\n{\n /*\n * This value is required only for tracing. base->clk was\n * incremented directly before expire_timers was called. But expiry\n * is related to the old base->clk value.\n */\n unsigned long baseclk = base->clk - 1;\n\n while (!hlist_empty(head)) {\n struct timer_list *timer;\n void (*fn)(struct timer_list *);\n\n timer = hlist_entry(head->first, struct timer_list, entry);\n\n base->running_timer = timer;\n detach_timer(timer, true);\n\n fn = timer->function;\n\n if (WARN_ON_ONCE(!fn)) {\n /* Should never happen. Emphasis on should! */\n base->running_timer = NULL;\n continue;\n }\n\n if (timer->flags & TIMER_IRQSAFE) {\n raw_spin_unlock(&base->lock);\n call_timer_fn(timer, fn, baseclk);\n raw_spin_lock(&base->lock);\n base->running_timer = NULL;\n } else {\n raw_spin_unlock_irq(&base->lock);\n call_timer_fn(timer, fn, baseclk);\n raw_spin_lock_irq(&base->lock);\n base->running_timer = NULL;\n timer_sync_wait_running(base);\n }\n }\n}\n" }, "git_blame_hashes": [ "030dcdd197d77374879bb5603d091eee7d8aba80", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "2287d8664fe7345ead891017eccd879fc605305e", "354b46b1a0adda1dd5b7f0bc2a5604cca091be5f", "3bb475a3446facd0425d3f2fe7e85bf03c5c6c05", "500462a9de657f86edaa102f8ab6bff7f7e43fc2", "576da126a6c7364d70dfd58d0bbe43d05cf5859f", "bb7262b295472eb6858b5c49893954794027cd84", "d02e382cef06cc73561dd32dfdc171c00dcc416d", "f28d3d5346e97e60c81f933ac89ccf015430e5cf" ], "recent_commits": [ { "hash": "d02e382cef06", "subject": "timers: Silently ignore timers with a NULL function" }, { "hash": "bb7262b29547", "subject": "timers: Move clearing of base::timer_running under base:: Lock" }, { "hash": "030dcdd197d7", "subject": "timers: Prepare support for PREEMPT_RT" }, { "hash": "f28d3d5346e9", "subject": "timer/trace: Improve timer tracing" }, { "hash": "354b46b1a0ad", "subject": "timer: Switch callback prototype to take struct timer_list * argument" }, { "hash": "c1eba5bcb643", "subject": "timer: Pass timer_list pointer to callbacks unconditionally" }, { "hash": "2287d8664fe7", "subject": "timers: Make the cpu base lock raw" }, { "hash": "dfb4357da6dd", "subject": "time: Remove CONFIG_TIMER_STATS" }, { "hash": "500462a9de65", "subject": "timers: Switch to a non-cascading wheel" }, { "hash": "494af3ed7848", "subject": "timers: Give a few structs and members proper names" } ] }, { "index": 7, "function": "run_timer_softirq", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff81b224a7", "address_formatted": "0xffffffff81b224a7 (0xffffffff81b223f0 + 0xb7)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff81b224a6", "source": { "primary": { "function": "run_timer_base", "file": "kernel/time/timer.c", "line": 2395 }, "inlined_frames": [ { "function": "run_timer_softirq", "file": "kernel/time/timer.c", "line": 2405 } ] }, "function_source": { "file": "kernel/time/timer.c", "start_line": 2390, "end_line": 2396, "code": "\nstatic void run_timer_base(int index)\n{\n struct timer_base *base = this_cpu_ptr(&timer_bases[index]);\n\n __run_timer_base(base);\n}\n" }, "git_blame_hashes": [ "73420fea80c6c376d91a69defe64013baa0d7e95", "90f5df66c86c259d61aff84e16f519fe1424e1ef" ], "recent_commits": [ { "hash": "90f5df66c86c", "subject": "timers: Restructure internal locking" }, { "hash": "73420fea80c6", "subject": "timers: Move __run_timers() function" } ] }, { "index": 8, "function": "handle_softirqs", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8187fdba", "address_formatted": "0xffffffff8187fdba (0xffffffff8187fb90 + 0x22a)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8187fdb9", "source": { "primary": { "function": "handle_softirqs", "file": "kernel/softirq.c", "line": 0 }, "inlined_frames": [] }, "function_source": null, "note": "addr2line returned line 0 for kernel/softirq.c \u2014 DWARF may be incomplete at this address" }, { "index": 9, "function": "__irq_exit_rcu", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff818806ba", "address_formatted": "0xffffffff818806ba (0xffffffff818805f0 + 0xca)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff818806b9", "source": { "primary": { "function": "__do_softirq", "file": "kernel/softirq.c", "line": 656 }, "inlined_frames": [ { "function": "invoke_softirq", "file": "kernel/softirq.c", "line": 496 }, { "function": "__irq_exit_rcu", "file": "kernel/softirq.c", "line": 735 } ] }, "function_source": { "file": "kernel/softirq.c", "start_line": 653, "end_line": 657, "code": "\nasmlinkage __visible void __softirq_entry __do_softirq(void)\n{\n handle_softirqs(false);\n}\n" }, "git_blame_hashes": [ "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "1dd1eff161bd55968d3d46bc36def62d71fb4785" ], "recent_commits": [ { "hash": "1dd1eff161bd", "subject": "softirq: Fix suspicious RCU usage in __do_softirq()" }, { "hash": "1da177e4c3f4", "subject": "Linux-2.6.12-rc2" } ] }, { "index": 10, "function": "irq_exit_rcu", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff818805b9", "address_formatted": "0xffffffff818805b9 (0xffffffff818805b0 + 0x9)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff818805b8", "source": { "primary": { "function": "irq_exit_rcu", "file": "kernel/softirq.c", "line": 752 }, "inlined_frames": [] }, "function_source": { "file": "kernel/softirq.c", "start_line": 744, "end_line": 755, "code": "\n/**\n * irq_exit_rcu() - Exit an interrupt context without updating RCU\n *\n * Also processes softirqs if needed and possible.\n */\nvoid irq_exit_rcu(void)\n{\n __irq_exit_rcu();\n /* must be last! */\n lockdep_hardirq_exit();\n}\n" }, "git_blame_hashes": [ "59bc300b712998d10254ee20e24f2e7ec09c560a", "8a6bc4787f05d087fda8e11ead225c8830250703" ], "recent_commits": [ { "hash": "59bc300b7129", "subject": "x86/entry: Clarify irq_{enter,exit}_rcu()" }, { "hash": "8a6bc4787f05", "subject": "genirq: Provide irq_enter/exit_rcu()" } ] }, { "index": 11, "function": "sysvec_apic_timer_interrupt", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb8dc66", "address_formatted": "0xffffffff8bb8dc66 (0xffffffff8bb8dbc0 + 0xa6)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb8dc65", "source": { "primary": { "function": "instr_sysvec_apic_timer_interrupt", "file": "arch/x86/kernel/apic/apic.c", "line": 0 }, "inlined_frames": [ { "function": "sysvec_apic_timer_interrupt", "file": "arch/x86/kernel/apic/apic.c", "line": 0 } ] }, "function_source": null, "note": "addr2line returned line 0 for arch/x86/kernel/apic/apic.c \u2014 DWARF may be incomplete at this address" }, { "index": 12, "function": "asm_sysvec_apic_timer_interrupt", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff810014ca", "address_formatted": "0xffffffff810014ca (0xffffffff810014b0 + 0x1a)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff810014c9", "source": { "primary": { "function": "asm_sysvec_apic_timer_interrupt", "file": "arch/x86/include/asm/idtentry.h", "line": 697 }, "inlined_frames": [] }, "function_source": null, "note": "function boundary heuristic misfired (extracted >150 lines) for arch/x86/include/asm/idtentry.h:697" }, { "index": 13, "function": "pv_native_safe_halt", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb8e12f", "address_formatted": "0xffffffff8bb8e12f (0xffffffff8bb8e120 + 0xf)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb8e12e", "source": { "primary": { "function": "native_safe_halt", "file": "arch/x86/include/asm/irqflags.h", "line": 48 }, "inlined_frames": [ { "function": "pv_native_safe_halt", "file": "arch/x86/kernel/paravirt.c", "line": 62 } ] }, "function_source": { "file": "arch/x86/include/asm/irqflags.h", "start_line": 44, "end_line": 49, "code": "\nstatic __always_inline void native_safe_halt(void)\n{\n x86_idle_clear_cpu_buffers();\n asm volatile(\"sti; hlt\": : :\"memory\");\n}\n" }, "git_blame_hashes": [ "2b5a0e425e6e319b1978db1e9564f6af4228a567", "6abcd98ffafbff81f0bfd7ee1d129e634af13245", "f9af88a3d384c8b55beb5dc5483e5da0135fadbd" ], "recent_commits": [ { "hash": "f9af88a3d384", "subject": "x86/bugs: Rename MDS machinery to something more generic" }, { "hash": "2b5a0e425e6e", "subject": "objtool/idle: Validate __cpuidle code as noinstr" }, { "hash": "07f07f55a29c", "subject": "x86/speculation/mds: Conditionally clear CPU buffers on idle entry" }, { "hash": "6727ad9e206c", "subject": "nmi_backtrace: generate one-line reports for idle cpus" }, { "hash": "6abcd98ffafb", "subject": "x86: irqflags consolidation" }, { "hash": "96a388de5dc5", "subject": "i386/x86_64: move headers to include/asm-x86" } ] }, { "index": 14, "function": "default_idle", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb90bc9", "address_formatted": "0xffffffff8bb90bc9 (0xffffffff8bb90bc0 + 0x9)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb90bc8", "source": { "primary": { "function": "arch_safe_halt", "file": "arch/x86/kernel/process.c", "line": 766 }, "inlined_frames": [ { "function": "default_idle", "file": "arch/x86/kernel/process.c", "line": 767 } ] }, "function_source": { "file": "arch/x86/kernel/process.c", "start_line": 756, "end_line": 769, "code": "/*\n * Idle related variables and functions\n */\nunsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;\nEXPORT_SYMBOL(boot_option_idle_override);\n\n/*\n * We use this if we don't have any better idle routine..\n */\nvoid __cpuidle default_idle(void)\n{\n raw_safe_halt();\n raw_local_irq_disable();\n}\n" }, "git_blame_hashes": [ "00dba56465228825ea806e3a7fc0aa6bba7bdc6c", "89b3098703bd2aa3237ef10a704e6a5838e6ea69", "aaa3896b969bdf946e0fd6aa6199da17b5da8d5c", "d18960494f65ca4fa0d67c865aaca99452070d15" ], "recent_commits": [ { "hash": "89b3098703bd", "subject": "arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled" }, { "hash": "aaa3896b969b", "subject": "x86/idle: Replace 'x86_idle' function pointer with a static_call" }, { "hash": "a476bda30baf", "subject": "x86 idle: rename global pm_idle to static x86_idle" }, { "hash": "6783eaa2e125", "subject": "x86, um/x86: switch to generic sys_execve and kernel_execve" }, { "hash": "7076aada1040", "subject": "x86: split ret_from_fork" }, { "hash": "e76623d69408", "subject": "x86: get rid of TIF_IRET hackery" }, { "hash": "1cf8343f5552", "subject": "x86: Fix rflags in FAKE_STACK_FRAME" }, { "hash": "d18960494f65", "subject": "ACPI, intel_idle: Cleanup idle= internal variables" }, { "hash": "d7627467b7a8", "subject": "Make do_execve() take a const filename pointer" }, { "hash": "c7887325230a", "subject": "Mark arguments to certain syscalls as being const" } ] }, { "index": 15, "function": "default_idle_call", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb90e12", "address_formatted": "0xffffffff8bb90e12 (0xffffffff8bb90da0 + 0x72)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb90e11", "source": { "primary": { "function": "default_idle_call", "file": "kernel/sched/idle.c", "line": 122 }, "inlined_frames": [] }, "function_source": { "file": "kernel/sched/idle.c", "start_line": 104, "end_line": 131, "code": "static inline void cond_tick_broadcast_enter(void) { }\nstatic inline void cond_tick_broadcast_exit(void) { }\n#endif /* !CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE */\n\n/**\n * default_idle_call - Default CPU idle routine.\n *\n * To use when the cpuidle framework cannot be used.\n */\nvoid __cpuidle default_idle_call(void)\n{\n instrumentation_begin();\n if (!current_clr_polling_and_test()) {\n cond_tick_broadcast_enter();\n trace_cpu_idle(1, smp_processor_id());\n stop_critical_timings();\n\n ct_cpuidle_enter();\n arch_cpu_idle();\n ct_cpuidle_exit();\n\n start_critical_timings();\n trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());\n cond_tick_broadcast_exit();\n }\n local_irq_enable();\n instrumentation_end();\n}\n" }, "git_blame_hashes": [ "2be2a197ff6c3a659ab9285e1d88cbdc609ac6de", "58c644ba512cfbc2e39b758dd979edd1d6d00e27", "63caae8480921773b46adec0b6ddac9a844a042f", "6727ad9e206cc08b80d8000a4d67f8417e53539d", "827a5aefc542b8fb17c00de06118e5cd0e3800f2", "82f663277d0db854e8978e5f89fd88f6df75a4a4", "833840a94f4dfd86ed32f1b6222fe8d9ba1790a9", "9864f5b5943ab0f1f835f21dc3f9f068d06f5b52", "a01353cf1896ea5b8a7bbc5e2b2d38feed8b7aaa" ], "recent_commits": [ { "hash": "833840a94f4d", "subject": "sched: Clean up and standardize #if/#else/#endif markers in sched/idle.c" }, { "hash": "2be2a197ff6c", "subject": "sched/idle: Conditionally handle tick broadcast in default_idle_call()" }, { "hash": "89b3098703bd", "subject": "arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled" }, { "hash": "a01353cf1896", "subject": "cpuidle: Fix ct_idle_*() usage" }, { "hash": "e67198cc05b8", "subject": "context_tracking: Take idle eqs entrypoints over RCU" }, { "hash": "8b023accc8df", "subject": "lockdep: Fix -Wunused-parameter for _THIS_IP_" }, { "hash": "58c644ba512c", "subject": "sched/idle: Fix arch_cpu_idle() vs tracing" }, { "hash": "9864f5b5943a", "subject": "cpuidle: Move trace_cpu_idle() into generic code" }, { "hash": "1098582a0f6c", "subject": "sched,idle,rcu: Push rcu_idle deeper into the idle path" }, { "hash": "6727ad9e206c", "subject": "nmi_backtrace: generate one-line reports for idle cpus" } ] }, { "index": 16, "function": "do_idle", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff819aae9a", "address_formatted": "0xffffffff819aae9a (0xffffffff819aab30 + 0x36a)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff819aae99", "source": { "primary": { "function": "cpuidle_idle_call", "file": "kernel/sched/idle.c", "line": 199 }, "inlined_frames": [ { "function": "do_idle", "file": "kernel/sched/idle.c", "line": 352 } ] }, "function_source": { "file": "kernel/sched/idle.c", "start_line": 172, "end_line": 271, "code": "/**\n * cpuidle_idle_call - the main idle function\n *\n * NOTE: no locks or semaphores should be used here\n *\n * On architectures that support TIF_POLLING_NRFLAG, is called with polling\n * set, and it returns with polling set. If it ever stops polling, it\n * must clear the polling bit.\n */\nstatic void cpuidle_idle_call(bool stop_tick)\n{\n struct cpuidle_device *dev = cpuidle_get_device();\n struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);\n int next_state, entered_state;\n\n /*\n * Check if the idle task must be rescheduled. If it is the\n * case, exit the function after re-enabling the local IRQ.\n */\n if (need_resched()) {\n local_irq_enable();\n return;\n }\n\n if (cpuidle_not_available(drv, dev)) {\n idle_call_stop_or_retain_tick(stop_tick);\n\n default_idle_call();\n goto exit_idle;\n }\n\n /*\n * Suspend-to-idle (\"s2idle\") is a system state in which all user space\n * has been frozen, all I/O devices have been suspended and the only\n * activity happens here and in interrupts (if any). In that case bypass\n * the cpuidle governor and go straight for the deepest idle state\n * available. Possibly also suspend the local tick and the entire\n * timekeeping to prevent timer interrupts from kicking us out of idle\n * until a proper wakeup interrupt happens.\n */\n\n if (idle_should_enter_s2idle() || dev->forced_idle_latency_limit_ns) {\n u64 max_latency_ns;\n\n if (idle_should_enter_s2idle()) {\n max_latency_ns = cpu_wakeup_latency_qos_limit() *\n NSEC_PER_USEC;\n\n entered_state = call_cpuidle_s2idle(drv, dev,\n max_latency_ns);\n if (entered_state > 0)\n goto exit_idle;\n } else {\n max_latency_ns = dev->forced_idle_latency_limit_ns;\n }\n\n tick_nohz_idle_stop_tick();\n\n next_state = cpuidle_find_deepest_state(drv, dev, max_latency_ns);\n call_cpuidle(drv, dev, next_state);\n } else if (drv->state_count > 1) {\n /*\n * stop_tick is expected to be true by default by cpuidle\n * governors, which allows them to select idle states with\n * target residency above the tick period length.\n */\n stop_tick = true;\n\n /*\n * Ask the cpuidle framework to choose a convenient idle state.\n */\n next_state = cpuidle_select(drv, dev, &stop_tick);\n\n idle_call_stop_or_retain_tick(stop_tick);\n\n entered_state = call_cpuidle(drv, dev, next_state);\n /*\n * Give the governor an opportunity to reflect on the outcome\n */\n cpuidle_reflect(dev, entered_state);\n } else {\n idle_call_stop_or_retain_tick(stop_tick);\n\n /*\n * If there is only a single idle state (or none), there is\n * nothing meaningful for the governor to choose. Skip the\n * governor and always use state 0.\n */\n call_cpuidle(drv, dev, 0);\n }\n\nexit_idle:\n __current_set_polling();\n\n /*\n * It is up to the idle functions to re-enable local interrupts\n */\n if (WARN_ON_ONCE(irqs_disabled()))\n local_irq_enable();\n}\n" }, "git_blame_hashes": [ "08c373e5123b4595588ae1a7aa7e00a046c61cc6", "10e8b11eb3195e11450c509d4dd3984d707a4167", "30cdd69e2a266505ca8229c944d361ff350a6959", "37352273ad48f2d177ed1b06ced32d5536b773fb", "3810631332465d967ba5e27ea2c7dff2c9afac6c", "3b03706fa621ce31a3e9ef6307020fde4e6aae16", "3e0de271fff77abb933f1b69c213854c3eda9125", "402de7fc880fef055bc984957454b532987e9ad0", "45f1ff59e27ca59d33cc1a317e669d90022ccf7d", "554c8aa8ecade210d58a252173bb8f2106552a44", "5aa9ba6312e36c18626e73506b92d1513d815435", "82c65d60d64401aedc1006d6572469bbfdf148de", "82f663277d0db854e8978e5f89fd88f6df75a4a4", "8ca3c6424f4988fc19ed1067b121fbaf2e884d77", "99b42445f4a4aaff75eca24dfc9e6e376292dd48", "9bd616e3dbedfc103f158197c8ad93678849b1ed", "a1d028bd6d2b7789d15eddfd07c5bea2aaf36040", "bb8313b603eb8fd52de48a079bfcd72dcab2ef1e", "bcf6ad8a4a3d002e8bc8f6639cdc119168f4e87b", "c444117f0f39d59733ec23da67c44424df529230", "c55b51a06b01d67a99457bb82a8c31081c7faa23", "c8cc7d4de7a4f2fb1f8774ec2de5b49c46c42e64", "d557640e4ce589a24dca5ca7ce3b9680f471325f", "ed98c34919985a9f87c3edacb9a8d8c283c9e243", "ef2b22ac540c018bd574d1846ab95b9bfcf38702", "f02f4f9d826590f1ef1b087374d3e3cfb7949eac", "f4c31b07b136839e0fb3026f8a5b6543e3b14d2f" ], "recent_commits": [ { "hash": "f4c31b07b136", "subject": "sched: idle: Consolidate the handling of two special cases" }, { "hash": "d557640e4ce5", "subject": "sched: idle: Make skipping governor callbacks more consistent" }, { "hash": "99b42445f4a4", "subject": "sched: idle: Respect the CPU system wakeup QoS limit for s2idle" }, { "hash": "764d5fcc2a58", "subject": "idle: Remove stale RCU comment" }, { "hash": "402de7fc880f", "subject": "sched: Fix spelling in comments" }, { "hash": "3b03706fa621", "subject": "sched: Fix various typos" }, { "hash": "1098582a0f6c", "subject": "sched,idle,rcu: Push rcu_idle deeper into the idle path" }, { "hash": "10e8b11eb319", "subject": "cpuidle: Rearrange s2idle-specific idle state entry code" }, { "hash": "3e0de271fff7", "subject": "idle: fix spelling mistake \"iterrupts\" -> \"interrupts\"" }, { "hash": "5aa9ba6312e3", "subject": "cpuidle: Pass exit latency limit to cpuidle_use_deepest_state()" } ] }, { "index": 17, "function": "cpu_startup_entry", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff819ab173", "address_formatted": "0xffffffff819ab173 (0xffffffff819ab130 + 0x43)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff819ab172", "source": { "primary": { "function": "cpu_startup_entry", "file": "kernel/sched/idle.c", "line": 451 }, "inlined_frames": [] }, "function_source": { "file": "kernel/sched/idle.c", "start_line": 443, "end_line": 452, "code": "EXPORT_SYMBOL_GPL(play_idle_precise);\n\nvoid cpu_startup_entry(enum cpuhp_state state)\n{\n current->flags |= PF_IDLE;\n arch_cpu_idle_prepare();\n cpuhp_online_idle(state);\n while (1)\n do_idle();\n}\n" }, "git_blame_hashes": [ "8df3e07e7f21f2ed8d001e6fabf9505946b438aa", "c1de45ca831acee9b72c9320dde447edafadb43f", "c55b51a06b01d67a99457bb82a8c31081c7faa23", "cf37b6b48428d6be8f8762b3599d529c44644fb2", "cff9b2332ab762b7e0586c793c431a8f2ea4db04" ], "recent_commits": [ { "hash": "cff9b2332ab7", "subject": "kernel/sched: Modify initial boot task idle setup" }, { "hash": "c55b51a06b01", "subject": "cpuidle: Allow idle injection to apply exit latency limit" }, { "hash": "977e4be5eb71", "subject": "x86/stackprotector: Remove the call to boot_init_stack_canary() from cpu_startup_entry()" }, { "hash": "97fb7a0a8944", "subject": "sched: Clean up and harmonize the coding style of the scheduler code base" }, { "hash": "c1de45ca831a", "subject": "sched/idle: Add support for tasks that inject idle" }, { "hash": "8df3e07e7f21", "subject": "cpu/hotplug: Let upcoming cpu bring itself fully up" }, { "hash": "82c65d60d644", "subject": "sched/idle: Clear polling before descheduling the idle thread" }, { "hash": "ea8117478918", "subject": "sched, idle: Fix the idle polling state logic" }, { "hash": "d7880812b359", "subject": "idle: Add the stack canary init to cpu_startup_entry()" }, { "hash": "d16699123434", "subject": "idle: Implement generic idle function" } ] }, { "index": 18, "function": "rest_init", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb91cde", "address_formatted": "0xffffffff8bb91cde (0xffffffff8bb91a00 + 0x2de)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb91cdd", "source": { "primary": { "function": "rest_init", "file": "init/main.c", "line": 762 }, "inlined_frames": [] }, "function_source": { "file": "init/main.c", "start_line": 707, "end_line": 763, "code": " * between the root thread and the init thread may cause start_kernel to\n * be reaped by free_initmem before the root thread has proceeded to\n * cpu_idle.\n *\n * gcc-3.4 accidentally inlines this function, so use noinline.\n */\n\nstatic __initdata DECLARE_COMPLETION(kthreadd_done);\n\nstatic noinline void __ref __noreturn rest_init(void)\n{\n struct task_struct *tsk;\n int pid;\n\n rcu_scheduler_starting();\n /*\n * We need to spawn init first so that it obtains pid 1, however\n * the init task will end up wanting to create kthreads, which, if\n * we schedule it before we create kthreadd, will OOPS.\n */\n pid = user_mode_thread(kernel_init, NULL, CLONE_FS);\n /*\n * Pin init on the boot CPU. Task migration is not properly working\n * until sched_init_smp() has been run. It will set the allowed\n * CPUs for init to the non isolated CPUs.\n */\n rcu_read_lock();\n tsk = find_task_by_pid_ns(pid, &init_pid_ns);\n tsk->flags |= PF_NO_SETAFFINITY;\n set_cpus_allowed_ptr(tsk, cpumask_of(smp_processor_id()));\n rcu_read_unlock();\n\n numa_default_policy();\n pid = kernel_thread(kthreadd, NULL, NULL, CLONE_FS | CLONE_FILES);\n rcu_read_lock();\n kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);\n rcu_read_unlock();\n\n /*\n * Enable might_sleep() and smp_processor_id() checks.\n * They cannot be enabled earlier because with CONFIG_PREEMPTION=y\n * kernel_thread() would trigger might_sleep() splats. With\n * CONFIG_PREEMPT_VOLUNTARY=y the init task might have scheduled\n * already, but it's stuck on the kthreadd_done completion.\n */\n system_state = SYSTEM_SCHEDULING;\n\n complete(&kthreadd_done);\n\n /*\n * The boot idle thread must execute schedule()\n * at least once to get things moving:\n */\n schedule_preempt_disabled();\n /* Call into cpu_idle with preempt disabled */\n cpu_startup_entry(CPUHP_ONLINE);\n}\n" }, "git_blame_hashes": [ "15faafc6b449777a85c0cf82dd8286c293fed4eb", "1c3c5eab171590f86edd8d31389d61dd1efe3037", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "1df21055e34b6a68d62cf0c524b9e52deebd7ead", "343f4c49f2438d8920f1f76fa823ee59b91f02e4", "5bfb5d690f36d316a5f3b4f7775fda996faa6b12", "5cd204550b1a006f2b0c986b0e0f53220ebfd391", "73c279927f89561ecb45b2dfdf9314bafcfd9f67", "7db905e636f08ea5bc9825c1f73d77802e8ccad5", "8fb12156b8db61af3d49f3e5e104568494581d1f", "9715856922bf8475f5428c29b6f4a9eebc97d391", "a1a04ec3c7c27a682473fd9beb2c996316a64649", "ac4db926e17a669c788efc89b81a4a0f40648445", "b433c3d4549ae74935b585115f076c6fb7bc48fe", "bd2f55361f18347e890d52ff9cfd8895455ec11b", "c1a280b68d4e6b6db4a65aa7865c22d8789ddf09", "cf587db2ee0261c74d04f61f39783db88a0b65e4", "d11c563dd20ff35da5652c3e1c989d9e10e1d6d0", "f340c0d1a3f40fdcba69cd291530a4debc58748f" ], "recent_commits": [ { "hash": "ac4db926e17a", "subject": "init: remove obsolete arch_call_rest_init() wrapper" }, { "hash": "2aff7c706c74", "subject": "Merge tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip" }, { "hash": "9ea7e6b62c2b", "subject": "init: Mark [arch_call_]rest_init() __noreturn" }, { "hash": "cf587db2ee02", "subject": "kernel: Allow a kernel thread's name to be set in copy_process" }, { "hash": "343f4c49f243", "subject": "kthread: Don't allocate kthread_struct for init and umh" }, { "hash": "15faafc6b449", "subject": "sched,init: Fix DEBUG_PREEMPT vs early boot" }, { "hash": "c1a280b68d4e", "subject": "sched/preempt: Use CONFIG_PREEMPTION where appropriate" }, { "hash": "53c99bd665a2", "subject": "init: add arch_call_rest_init to allow stack switching" }, { "hash": "f142f08bf7ec", "subject": "Fix typo in comment." }, { "hash": "18f08dae1999", "subject": "sched/core: Remove unnecessary initialization init_idle_bootup_task()" } ] }, { "index": 19, "function": "start_kernel", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff91a10aca", "address_formatted": "0xffffffff91a10aca (0xffffffff91a10740 + 0x38a)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff91a10ac9", "source": { "primary": { "function": "start_kernel", "file": "init/main.c", "line": 1220 }, "inlined_frames": [] }, "function_source": null, "note": "function boundary heuristic misfired (extracted >150 lines) for init/main.c:1220" }, { "index": 20, "function": "x86_64_start_reservations", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff91a30484", "address_formatted": "0xffffffff91a30484 (0xffffffff91a30460 + 0x24)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff91a30483", "source": { "primary": { "function": "x86_64_start_reservations", "file": "arch/x86/kernel/head64.c", "line": 310 }, "inlined_frames": [] }, "function_source": { "file": "arch/x86/kernel/head64.c", "start_line": 293, "end_line": 311, "code": "\nvoid __init __noreturn x86_64_start_reservations(char *real_mode_data)\n{\n /* version is always not zero if it is copied */\n if (!boot_params.hdr.version)\n copy_bootdata(__va(real_mode_data));\n\n x86_early_init_platform_quirks();\n\n switch (boot_params.hdr.hardware_subarch) {\n case X86_SUBARCH_INTEL_MID:\n x86_intel_mid_early_setup();\n break;\n default:\n break;\n }\n\n start_kernel();\n}\n" }, "git_blame_hashes": [ "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "3fda5bb420e79b357328b358409e4c547d8f0a18", "4208d2d79837ef70f260d6170e3ac7fd6fde7788", "751752789162fde69474edfa15935d0a77c0bc17", "8d152e7a5c7537b18b4e9e0eb96f549b016636dc", "9de819fe72fc6979ddd18aa04ef9e2af5aa8bc5f", "f97013fd8f17120182aa247f360e4d2069a9db9c", "fa2bbce985ca97943305cdc81d9626e6810ed7f2" ], "recent_commits": [ { "hash": "4208d2d79837", "subject": "x86/head: Mark *_start_kernel() __noreturn" }, { "hash": "384184044981", "subject": "x86/boot: Mostly revert commit ae7e1238e68f2a (\"Add ACPI RSDP address to setup_header\")" }, { "hash": "ae7e1238e68f", "subject": "x86/boot: Add ACPI RSDP address to setup_header" }, { "hash": "007b75605338", "subject": "x86/boot: Run reserve_bios_regions() after we initialize the memory map" }, { "hash": "edce21216a88", "subject": "x86/boot: Reorganize and clean up the BIOS area reservation code" }, { "hash": "8d152e7a5c75", "subject": "x86/rtc: Replace paravirt rtc check with platform legacy quirk" }, { "hash": "3fda5bb420e7", "subject": "x86/platform/intel-mid: Enable 64-bit build" }, { "hash": "6c902b656c4a", "subject": "x86: Merge early kernel reserve for 32bit and 64bit" }, { "hash": "1b8c78be0120", "subject": "x86: Merge early_reserve_initrd for 32bit and 64bit" }, { "hash": "fa2bbce985ca", "subject": "x86, 64bit: Copy struct boot_params early" } ] }, { "index": 21, "function": "x86_64_start_kernel", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff91a302f3", "address_formatted": "0xffffffff91a302f3 (0xffffffff91a301b0 + 0x143)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff91a302f2", "source": { "primary": { "function": "x86_64_start_kernel", "file": "arch/x86/kernel/head64.c", "line": 291 }, "inlined_frames": [] }, "function_source": { "file": "arch/x86/kernel/head64.c", "start_line": 221, "end_line": 292, "code": "\nasmlinkage __visible void __init __noreturn x86_64_start_kernel(char * real_mode_data)\n{\n /*\n * Build-time sanity checks on the kernel image and module\n * area mappings. (these are purely build-time and produce no code)\n */\n BUILD_BUG_ON(MODULES_VADDR < __START_KERNEL_map);\n BUILD_BUG_ON(MODULES_VADDR - __START_KERNEL_map < KERNEL_IMAGE_SIZE);\n BUILD_BUG_ON(MODULES_LEN + KERNEL_IMAGE_SIZE > 2*PUD_SIZE);\n BUILD_BUG_ON((__START_KERNEL_map & ~PMD_MASK) != 0);\n BUILD_BUG_ON((MODULES_VADDR & ~PMD_MASK) != 0);\n BUILD_BUG_ON(!(MODULES_VADDR > __START_KERNEL));\n MAYBE_BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) ==\n (__START_KERNEL & PGDIR_MASK)));\n BUILD_BUG_ON(__fix_to_virt(__end_of_fixed_addresses) <= MODULES_END);\n\n cr4_init_shadow();\n\n /* Kill off the identity-map trampoline */\n reset_early_page_tables();\n\n if (pgtable_l5_enabled()) {\n page_offset_base = __PAGE_OFFSET_BASE_L5;\n vmalloc_base = __VMALLOC_BASE_L5;\n vmemmap_base = __VMEMMAP_BASE_L5;\n }\n\n clear_bss();\n\n /*\n * This needs to happen *before* kasan_early_init() because latter maps stuff\n * into that page.\n */\n clear_page(init_top_pgt);\n\n /*\n * SME support may update early_pmd_flags to include the memory\n * encryption mask, so it needs to be called before anything\n * that may generate a page fault.\n */\n sme_early_init();\n\n kasan_early_init();\n\n /*\n * Flush global TLB entries which could be left over from the trampoline page\n * table.\n *\n * This needs to happen *after* kasan_early_init() as KASAN-enabled .configs\n * instrument native_write_cr4() so KASAN must be initialized for that\n * instrumentation to work.\n */\n __native_tlb_flush_global(this_cpu_read(cpu_tlbstate.cr4));\n\n idt_setup_early_handler();\n\n /* Needed before cc_platform_has() can be used for TDX */\n tdx_early_init();\n\n copy_bootdata(__va(real_mode_data));\n\n /*\n * Load microcode early on BSP.\n */\n load_ucode_bsp();\n\n /* set init_top_pgt kernel high mapping*/\n init_top_pgt[511] = early_top_pgt[511];\n\n x86_64_start_reservations(real_mode_data);\n}\n" }, "git_blame_hashes": [ "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "1e02ce4cccdcb9688386e5b8d2c9fa4660b45389", "21729f81ce8ae76a6995681d40e16f7ce8075db4", "3df0af0eb064a16bbdbe81b46bc72a4089f88d54", "4208d2d79837ef70f260d6170e3ac7fd6fde7788", "588787fde7aa346f345e1a7600f84d88039fc9df", "59bd54a84d15e9335de5b8abe7b3b9713a36b99b", "5d5aa3cfca5cf74cd928daf3674642e6004328d1", "64797551baec252f953fa8234051f88b0c368ed5", "65ade2f872b474fa8a04c2d397783350326634e6", "66d4bdf22b8652cda215e2653c8bbec7a767ed57", "8170e6bed465b4b0c7687f93e9948aca4358a33b", "8e3c2a8cf647e2f3a1e9d38009b0d1c02145822f", "b4e0409a36f4533770a12095bde2a574a08a319e", "b64dfcde1ca9cb82e38e573753f0c0db8fb841c2", "c65e774fb3f6af212641538694b9778ff9ab4300", "d0f77d4d04b222a817925d33ba3589b190bfa863", "f6c2e3330d3fdd5474bc3756da46fca889a30e33", "f97013fd8f17120182aa247f360e4d2069a9db9c", "fa2bbce985ca97943305cdc81d9626e6810ed7f2", "feddc9de8bf69415da6f96eca0219186b70d145a" ], "recent_commits": [ { "hash": "64797551baec", "subject": "x86/boot: Defer initialization of VM space related global variables" }, { "hash": "9843231c9726", "subject": "x86/boot/64: Move 5-level paging global variable assignments back" }, { "hash": "63bed9660420", "subject": "x86/startup_64: Defer assignment of 5-level paging global variables" }, { "hash": "4208d2d79837", "subject": "x86/head: Mark *_start_kernel() __noreturn" }, { "hash": "59bd54a84d15", "subject": "x86/tdx: Detect running as a TDX guest in early boot" }, { "hash": "b64dfcde1ca9", "subject": "x86/mm: Prevent early boot triple-faults with instrumentation" }, { "hash": "f154f290855b", "subject": "x86/mm/64: Flush global TLB on boot and AP bringup" }, { "hash": "c65e774fb3f6", "subject": "x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D variable" }, { "hash": "24e700e291d5", "subject": "Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip" }, { "hash": "588787fde7aa", "subject": "x86/idt: Move early IDT handler setup to IDT code" } ] }, { "index": 22, "function": "common_startup_64", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff81688b77", "address_formatted": "0xffffffff81688b77 (0xffffffff81688a39 + 0x13e)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff81688b76", "source": { "primary": { "function": "common_startup_64", "file": "arch/x86/kernel/head_64.S", "line": 418 }, "inlined_frames": [] }, "function_source": { "file": "arch/x86/kernel/head_64.S", "start_line": 378, "end_line": 478, "code": " /* Check if nx is implemented */\n movl $0x80000001, %eax\n cpuid\n movl %edx,%edi\n\n /* Setup EFER (Extended Feature Enable Register) */\n movl $MSR_EFER, %ecx\n rdmsr\n /*\n * Preserve current value of EFER for comparison and to skip\n * EFER writes if no change was made (for TDX guest)\n */\n movl %eax, %edx\n btsl $_EFER_SCE, %eax /* Enable System Call */\n btl $20,%edi /* No Execute supported? */\n jnc 1f\n btsl $_EFER_NX, %eax\n btsq $_PAGE_BIT_NX,early_pmd_flags(%rip)\n\n /* Avoid writing EFER if no change was made (for TDX guest) */\n1: cmpl %edx, %eax\n je 1f\n xor %edx, %edx\n wrmsr /* Make changes effective */\n1:\n /* Setup cr0 */\n movl $CR0_STATE, %eax\n /* Make changes effective */\n movq %rax, %cr0\n\n /* zero EFLAGS after setting rsp */\n pushq $0\n popfq\n\n /* Pass the boot_params pointer as first argument */\n movq %r15, %rdi\n\n.Ljump_to_C_code:\n xorl %ebp, %ebp # clear frame pointer\n ANNOTATE_RETPOLINE_SAFE\n callq *initial_code(%rip)\n ud2\nSYM_CODE_END(secondary_startup_64)\n\n#include \"verify_cpu.S\"\n#include \"sev_verify_cbit.S\"\n\n#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_AMD_MEM_ENCRYPT)\n/*\n * Entry point for soft restart of a CPU. Invoked from xxx_play_dead() for\n * restarting the boot CPU or for restarting SEV guest CPUs after CPU hot\n * unplug. Everything is set up already except the stack.\n */\nSYM_CODE_START(soft_restart_cpu)\n ANNOTATE_NOENDBR\n UNWIND_HINT_END_OF_STACK\n\n /* Find the idle task stack */\n movq PER_CPU_VAR(current_task), %rcx\n movq TASK_threadsp(%rcx), %rsp\n\n jmp .Ljump_to_C_code\nSYM_CODE_END(soft_restart_cpu)\n#endif\n\n#ifdef CONFIG_AMD_MEM_ENCRYPT\n/*\n * VC Exception handler used during early boot when running on kernel\n * addresses, but before the switch to the idt_table can be made.\n * The early_idt_handler_array can't be used here because it calls into a lot\n * of __init code and this handler is also used during CPU offlining/onlining.\n * Therefore this handler ends up in the .text section so that it stays around\n * when .init.text is freed.\n */\nSYM_CODE_START_NOALIGN(vc_boot_ghcb)\n UNWIND_HINT_IRET_REGS offset=8\n ENDBR\n\n /* Build pt_regs */\n PUSH_AND_CLEAR_REGS\n\n /* Call C handler */\n movq %rsp, %rdi\n movq ORIG_RAX(%rsp), %rsi\n movq initial_vc_handler(%rip), %rax\n ANNOTATE_RETPOLINE_SAFE\n call *%rax\n\n /* Unwind pt_regs */\n POP_REGS\n\n /* Remove Error Code */\n addq $8, %rsp\n\n iretq\nSYM_CODE_END(vc_boot_ghcb)\n#endif\n\n /* Both SMP bootup and ACPI suspend change these variables */\n __REFDATA\n .balign 8\n" }, "git_blame_hashes": [ "04633df0c43d710e5f696b06539c100898678235", "15675706241887ed7fdad9e91f4bf977b9896d0f", "1aa9aa8ee517e0443b06e816a4fd2d15f2113615", "1ab60e0f72f71ec54831e525a3e1154f1c092408", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "2f69a81ad6873231a2ae78d5ade3263ec54a4c9c", "369101da7e3f6f971b7303922d2978b8483241c6", "3adee777ad0d328e76ca9015cb7924134a992e81", "42e78e9719aa0c76711e2731b19c90fe5ae05278", "666e1156b2c514f045827f50263ed2eb9d78671b", "77a512e35db7609a8c909e2006b2ea82f2b1616f", "78d77df71510a96e042de7ba6dbd7998103642cb", "79d243a042155b4421a06faaac15d775a133e6c8", "8170e6bed465b4b0c7687f93e9948aca4358a33b", "a1e4cc0155ad577adc3a2c563fc5eec625945ce7", "a7bea8308933aaeea76dad7d42a6e51000417626", "a9468df5ad48d06e5237fc2b56fb04c52f79c8c4", "b32f96c75d0dcbb9bf9cc7994e8022c8ce20a668", "bc7b11c04ee9c9b0451ebf85bf64e0de69fdbb17", "c9f09539e16e281f92a27760fdfae71e8af036f6", "cded367976587ed4d160ed7d6bb118992a8b82ab", "da5968ae305ab5209ebc2502ef6a8fbf2cce536c", "e81dc127ef69887c72735a3e3868930e2bf313ed", "e8d61bdf0fdfaeaf35fb5a63d6e67e60038b88e0", "fb799447ae2974a07907906dff5bd4b9e47b7123" ], "recent_commits": [ { "hash": "a1e4cc0155ad", "subject": "x86/percpu: Move current_task to percpu hot section" }, { "hash": "2e2bc42c8381", "subject": "Merge branch 'linus' into x86/boot, to resolve conflict" }, { "hash": "156757062418", "subject": "x86/startup_64: Drop long return to initial_code pointer" }, { "hash": "39d64ee59cee", "subject": "x86/percpu: Correct PER_CPU_VAR() usage to include symbol and its addend" }, { "hash": "2f69a81ad687", "subject": "x86/head_64: Store boot_params pointer in callee save register" }, { "hash": "cded36797658", "subject": "x86/smpboot: Restrict soft_restart_cpu() to SEV" }, { "hash": "666e1156b2c5", "subject": "x86/smpboot: Rename start_cpu0() to soft_restart_cpu()" }, { "hash": "2aff7c706c74", "subject": "Merge tag 'objtool-core-2023-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip" }, { "hash": "fb799447ae29", "subject": "x86,objtool: Split UNWIND_HINT_EMPTY in two" }, { "hash": "4708ea14bef3", "subject": "x86,objtool: Separate unret validation from unwind hints" } ] }, { "index": 23, "function": "__kmalloc_cache_noprof", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8225a38c", "address_formatted": "0xffffffff8225a38c (0xffffffff8225a070 + 0x31c)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8225a38b", "source": { "primary": { "function": "kasan_kmalloc", "file": "include/linux/kasan.h", "line": 263 }, "inlined_frames": [ { "function": "__kmalloc_cache_noprof", "file": "mm/slub.c", "line": 5415 } ] }, "function_source": { "file": "include/linux/kasan.h", "start_line": 256, "end_line": 265, "code": "\nvoid * __must_check __kasan_kmalloc(struct kmem_cache *s, const void *object,\n size_t size, gfp_t flags);\nstatic __always_inline void * __must_check kasan_kmalloc(struct kmem_cache *s,\n const void *object, size_t size, gfp_t flags)\n{\n if (kasan_enabled())\n return __kasan_kmalloc(s, object, size, flags);\n return (void *)object;\n}\n" }, "git_blame_hashes": [ "34303244f2615add92076a4bf2d4f39323bde4f2" ], "recent_commits": [ { "hash": "34303244f261", "subject": "kasan, mm: check kasan_enabled in annotations" }, { "hash": "80a9201a5965", "subject": "mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB" } ] }, { "index": 24, "function": "rose_add_node", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8a9fbdb1", "address_formatted": "0xffffffff8a9fbdb1 (0xffffffff8a9fb940 + 0x471)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8a9fbdb0", "source": { "primary": { "function": "kmalloc_noprof", "file": "include/linux/slab.h", "line": 950 }, "inlined_frames": [ { "function": "rose_add_node", "file": "net/rose/rose_route.c", "line": 109 } ] }, "function_source": { "file": "include/linux/slab.h", "start_line": 932, "end_line": 955, "code": " * then give up at once.\n *\n * %__GFP_NOWARN\n * If allocation fails, don't issue any warnings.\n *\n * %__GFP_RETRY_MAYFAIL\n * Try really hard to succeed the allocation but fail\n * eventually.\n */\nstatic __always_inline __alloc_size(1) void *kmalloc_noprof(size_t size, gfp_t flags)\n{\n if (__builtin_constant_p(size) && size) {\n unsigned int index;\n\n if (size > KMALLOC_MAX_CACHE_SIZE)\n return __kmalloc_large_noprof(size, flags);\n\n index = kmalloc_index(size);\n return __kmalloc_cache_noprof(\n kmalloc_caches[kmalloc_type(flags, _RET_IP_)][index],\n flags, size);\n }\n return __kmalloc_noprof(size, flags);\n}\n" }, "git_blame_hashes": [ "01598ba6b1a863fbd819fc5c36c27886e5072164", "3bf019334fbbb51723587f9819c62d3d6f9d6f3f", "3c6152940584290668b35fa0800026f6a1ae05fe", "6fa57d78aa7f212fd7c0de70f5756e18513dcdcf", "7bd230a26648ac68ab3731ebbc449090f0ac6a37", "7e3528c3660a2e8602abc7858b0994d611f74bc3", "a0a44d9175b349df2462089140fb7f292100bd7c", "cc252eae85e09552f9c1e7ac0c3227f835efdf2d", "f1b6eb6e6be149b40ebb013f5bfe2ac86b6f1c1b" ], "recent_commits": [ { "hash": "a0a44d9175b3", "subject": "mm, slab: don't wrap internal functions with alloc_hooks()" }, { "hash": "7bd230a26648", "subject": "mm/slab: enable slab allocation tagging for kmalloc and friends" }, { "hash": "3c6152940584", "subject": "Randomized slab caches for kmalloc()" }, { "hash": "de4d6089b927", "subject": "mm/slab: remove CONFIG_SLOB code from slab common code" }, { "hash": "6fa57d78aa7f", "subject": "slab: Remove special-casing of const 0 size allocations" }, { "hash": "3bf019334fbb", "subject": "slab: Clean up SLOB vs kmalloc() definition" }, { "hash": "26a40990ba05", "subject": "mm/sl[au]b: cleanup kmem_cache_alloc[_node]_trace()" }, { "hash": "c37495d6254c", "subject": "slab: add __alloc_size attributes for better bounds checking" }, { "hash": "01598ba6b1a8", "subject": "docs/mm: update kmalloc kernel-doc description" }, { "hash": "cc252eae85e0", "subject": "mm, slab: combine kmalloc_caches and kmalloc_dma_caches" } ] }, { "index": 25, "function": "rose_rt_ioctl", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8a9fb3c5", "address_formatted": "0xffffffff8a9fb3c5 (0xffffffff8a9fa690 + 0xd35)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8a9fb3c4", "source": { "primary": { "function": "rose_rt_ioctl", "file": "net/rose/rose_route.c", "line": 748 }, "inlined_frames": [] }, "function_source": { "file": "net/rose/rose_route.c", "start_line": 726, "end_line": 767, "code": "\n/*\n * Handle the ioctls that control the routing functions.\n */\nint rose_rt_ioctl(unsigned int cmd, void __user *arg)\n{\n struct rose_route_struct rose_route;\n struct net_device *dev;\n int err;\n\n switch (cmd) {\n case SIOCADDRT:\n if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct)))\n return -EFAULT;\n if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL)\n return -EINVAL;\n if (rose_dev_exists(&rose_route.address)) /* Can't add routes to ourself */\n return -EINVAL;\n if (rose_route.mask > 10) /* Mask can't be more than 10 digits */\n return -EINVAL;\n if (rose_route.ndigis > AX25_MAX_DIGIS)\n return -EINVAL;\n err = rose_add_node(&rose_route, dev);\n return err;\n\n case SIOCDELRT:\n if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct)))\n return -EFAULT;\n if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL)\n return -EINVAL;\n err = rose_del_node(&rose_route, dev);\n return err;\n\n case SIOCRSCLRRT:\n return rose_clear_routes();\n\n default:\n return -EINVAL;\n }\n\n return 0;\n}\n" }, "git_blame_hashes": [ "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "95df1c04ab3f7ca617774930df62c0893a188c2c", "b4ec824021493ba6cb7eeb61572f4d2f8a80a52e" ], "recent_commits": [ { "hash": "b4ec82402149", "subject": "rose: device refcount leak" }, { "hash": "95df1c04ab3f", "subject": "[AX.25]: Use constant instead of magic number" }, { "hash": "1da177e4c3f4", "subject": "Linux-2.6.12-rc2" } ] }, { "index": 26, "function": "rose_ioctl", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8a9efb4b", "address_formatted": "0xffffffff8a9efb4b (0xffffffff8a9ef750 + 0x3fb)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8a9efb4a", "source": { "primary": { "function": "rose_ioctl", "file": "net/rose/af_rose.c", "line": 1387 }, "inlined_frames": [] }, "function_source": { "file": "net/rose/af_rose.c", "start_line": 1341, "end_line": 1437, "code": "\n\nstatic int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n{\n struct sock *sk = sock->sk;\n struct rose_sock *rose = rose_sk(sk);\n void __user *argp = (void __user *)arg;\n\n switch (cmd) {\n case TIOCOUTQ: {\n long amount;\n\n amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);\n if (amount < 0)\n amount = 0;\n return put_user(amount, (unsigned int __user *) argp);\n }\n\n case TIOCINQ: {\n struct sk_buff *skb;\n long amount = 0L;\n\n spin_lock_irq(&sk->sk_receive_queue.lock);\n if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)\n amount = skb->len;\n spin_unlock_irq(&sk->sk_receive_queue.lock);\n return put_user(amount, (unsigned int __user *) argp);\n }\n\n case SIOCGIFADDR:\n case SIOCSIFADDR:\n case SIOCGIFDSTADDR:\n case SIOCSIFDSTADDR:\n case SIOCGIFBRDADDR:\n case SIOCSIFBRDADDR:\n case SIOCGIFNETMASK:\n case SIOCSIFNETMASK:\n case SIOCGIFMETRIC:\n case SIOCSIFMETRIC:\n return -EINVAL;\n\n case SIOCADDRT:\n case SIOCDELRT:\n case SIOCRSCLRRT:\n if (!capable(CAP_NET_ADMIN))\n return -EPERM;\n return rose_rt_ioctl(cmd, argp);\n\n case SIOCRSGCAUSE: {\n struct rose_cause_struct rose_cause;\n rose_cause.cause = rose->cause;\n rose_cause.diagnostic = rose->diagnostic;\n return copy_to_user(argp, &rose_cause, sizeof(struct rose_cause_struct)) ? -EFAULT : 0;\n }\n\n case SIOCRSSCAUSE: {\n struct rose_cause_struct rose_cause;\n if (copy_from_user(&rose_cause, argp, sizeof(struct rose_cause_struct)))\n return -EFAULT;\n rose->cause = rose_cause.cause;\n rose->diagnostic = rose_cause.diagnostic;\n return 0;\n }\n\n case SIOCRSSL2CALL:\n if (!capable(CAP_NET_ADMIN)) return -EPERM;\n if (ax25cmp(&rose_callsign, &null_ax25_address) != 0)\n ax25_listen_release(&rose_callsign, NULL);\n if (copy_from_user(&rose_callsign, argp, sizeof(ax25_address)))\n return -EFAULT;\n if (ax25cmp(&rose_callsign, &null_ax25_address) != 0)\n return ax25_listen_register(&rose_callsign, NULL);\n\n return 0;\n\n case SIOCRSGL2CALL:\n return copy_to_user(argp, &rose_callsign, sizeof(ax25_address)) ? -EFAULT : 0;\n\n case SIOCRSACCEPT:\n if (rose->state == ROSE_STATE_5) {\n rose_write_internal(sk, ROSE_CALL_ACCEPTED);\n rose_start_idletimer(sk);\n rose->condition = 0x00;\n rose->vs = 0;\n rose->va = 0;\n rose->vr = 0;\n rose->vl = 0;\n rose->state = ROSE_STATE_3;\n }\n return 0;\n\n default:\n return -ENOIOCTLCMD;\n }\n\n return 0;\n}\n" }, "git_blame_hashes": [ "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "20b7d10a3339cbfa2f7a52da0ad77b5a0723f0ca", "31e6d363abcd0d05766c82f1a9c905a4c974a199", "810c38a369a0a0ce625b5c12169abce1dd9ccd53", "81dcd1690697efbdf8126e78fbbf7c76d359377f", "b5e5fa5e093e42cab4ee3d6dcbc4f450ad29a723" ], "recent_commits": [ { "hash": "810c38a369a0", "subject": "net/rose: Fix Use-After-Free in rose_ioctl" }, { "hash": "c7cbdbf29f48", "subject": "net: rework SIOCGSTAMP ioctl handling" }, { "hash": "31e6d363abcd", "subject": "net: correct off-by-one write allocations reports" }, { "hash": "ae40eb1ef30a", "subject": "[NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution" }, { "hash": "81dcd1690697", "subject": "[AX.25]: Fix unchecked ax25_listen_register uses" }, { "hash": "b5e5fa5e093e", "subject": "[NET]: Add a dev_ioctl() fallback to sock_ioctl()" }, { "hash": "20b7d10a3339", "subject": "[AX.25/ROSE]: Whitespace formatting changes" }, { "hash": "9b37ee75858c", "subject": "[NETROM/AX.25/ROSE]: Remove useless tests" }, { "hash": "1da177e4c3f4", "subject": "Linux-2.6.12-rc2" } ] }, { "index": 27, "function": "sock_do_ioctl", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff897a71a1", "address_formatted": "0xffffffff897a71a1 (0xffffffff897a70a0 + 0x101)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff897a71a0", "source": { "primary": { "function": "sock_do_ioctl", "file": "net/socket.c", "line": 0 }, "inlined_frames": [] }, "function_source": null, "note": "addr2line returned line 0 for net/socket.c \u2014 DWARF may be incomplete at this address" }, { "index": 28, "function": "sock_ioctl", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff897a5b06", "address_formatted": "0xffffffff897a5b06 (0xffffffff897a5540 + 0x5c6)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff897a5b05", "source": { "primary": { "function": "sock_ioctl", "file": "net/socket.c", "line": 1434 }, "inlined_frames": [] }, "function_source": { "file": "net/socket.c", "start_line": 1334, "end_line": 1438, "code": "\n/*\n * With an ioctl, arg may well be a user mode pointer, but we don't know\n * what to do with it - that's up to the protocol still.\n */\n\nstatic long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)\n{\n const struct proto_ops *ops;\n struct socket *sock;\n struct sock *sk;\n void __user *argp = (void __user *)arg;\n int pid, err;\n struct net *net;\n\n sock = file->private_data;\n ops = READ_ONCE(sock->ops);\n sk = sock->sk;\n net = sock_net(sk);\n if (unlikely(cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15))) {\n struct ifreq ifr;\n void __user *data;\n bool need_copyout;\n if (get_user_ifreq(&ifr, &data, argp))\n return -EFAULT;\n err = dev_ioctl(net, cmd, &ifr, data, &need_copyout);\n if (!err && need_copyout)\n if (put_user_ifreq(&ifr, argp))\n return -EFAULT;\n } else\n#ifdef CONFIG_WEXT_CORE\n if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {\n err = wext_handle_ioctl(net, cmd, argp);\n } else\n#endif\n switch (cmd) {\n case FIOSETOWN:\n case SIOCSPGRP:\n err = -EFAULT;\n if (get_user(pid, (int __user *)argp))\n break;\n err = f_setown(sock->file, pid, 1);\n break;\n case FIOGETOWN:\n case SIOCGPGRP:\n err = put_user(f_getown(sock->file),\n (int __user *)argp);\n break;\n case SIOCGIFBR:\n case SIOCSIFBR:\n case SIOCBRADDBR:\n case SIOCBRDELBR:\n case SIOCBRADDIF:\n case SIOCBRDELIF:\n err = br_ioctl_call(net, cmd, argp);\n break;\n case SIOCGIFVLAN:\n case SIOCSIFVLAN:\n err = -ENOPKG;\n if (!vlan_ioctl_hook)\n request_module(\"8021q\");\n\n mutex_lock(&vlan_ioctl_mutex);\n if (vlan_ioctl_hook)\n err = vlan_ioctl_hook(net, argp);\n mutex_unlock(&vlan_ioctl_mutex);\n break;\n case SIOCGSKNS:\n err = -EPERM;\n if (!ns_capable(net->user_ns, CAP_NET_ADMIN))\n break;\n\n err = open_related_ns(&net->ns, get_net_ns);\n break;\n case SIOCGSTAMP_OLD:\n case SIOCGSTAMPNS_OLD:\n if (!ops->gettstamp) {\n err = -ENOIOCTLCMD;\n break;\n }\n err = ops->gettstamp(sock, argp,\n cmd == SIOCGSTAMP_OLD,\n !IS_ENABLED(CONFIG_64BIT));\n break;\n case SIOCGSTAMP_NEW:\n case SIOCGSTAMPNS_NEW:\n if (!ops->gettstamp) {\n err = -ENOIOCTLCMD;\n break;\n }\n err = ops->gettstamp(sock, argp,\n cmd == SIOCGSTAMP_NEW,\n false);\n break;\n\n case SIOCGIFCONF:\n err = dev_ifconf(net, argp);\n break;\n\n default:\n err = sock_do_ioctl(net, sock, cmd, arg);\n break;\n }\n return err;\n}\n" }, "git_blame_hashes": [ "0768e17073dc527ccd18ed5f96ce85f9985e9115", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "1ded5e5a5931bb8b31e15b63b655fe232e3416b2", "393cc3f51135ea2520521f776ef3afdf3395c797", "3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9", "3d23e349d807177eaf519d444677cee86b1a04cf", "44c02a2c3dc55835e9f0d8ef73966406cd805001", "4a3e2f711a00a1feb72ae12fdc749da10179d185", "60747828eac28836b49bed214399b0c972f19df3", "609d7fa9565c754428d2520cac2accc9052e1245", "63ff03ab786ab1bc6cca01d48eacd22c95b9b3eb", "6b96018b28bd93274b4b2a4c633a5d373fda0441", "876f0bf9d0d5189dca9341c8e8e8686b09db8398", "881d966b48b035ab3f3aeaae0f3d3f9b584f45b2", "89bddce58e85bb18b13f5077e8349ba9a3ee2597", "a554bf96b49db4c208e305ae92546422e9489380", "b1b0c245067268043e0e832432f3d537a5cae33b", "b69aee04fbfc027fc4ddaddc809ea8711cef9511", "c62cce2caee558e18aa05c01c2fd3b40f07174f2", "c7cbdbf29f488a19982cd9f4a109887f18028bbb", "ed3ba9b6e280e14cc3148c1b226ba453f02fa76c" ], "recent_commits": [ { "hash": "ed3ba9b6e280", "subject": "net: Remove RTNL dance for SIOCBRADDIF and SIOCBRDELIF." }, { "hash": "1ded5e5a5931", "subject": "net: annotate data-races around sock->ops" }, { "hash": "ad2f99aedf8f", "subject": "net: bridge: move bridge ioctls out of .ndo_do_ioctl" }, { "hash": "a554bf96b49d", "subject": "dev_ioctl: pass SIOCDEVPRIVATE data separately" }, { "hash": "876f0bf9d0d5", "subject": "net: socket: simplify dev_ifconf handling" }, { "hash": "ea6932d70e22", "subject": "net: make get_net_ns return error if NET_NS is disabled" }, { "hash": "f73659192b0b", "subject": "net: wan: Delete the DLCI / SDLA drivers" }, { "hash": "60747828eac2", "subject": "net: socket: Fix missing break in switch statement" }, { "hash": "0768e17073dc", "subject": "net: socket: implement 64-bit timestamps" }, { "hash": "c7cbdbf29f48", "subject": "net: rework SIOCGSTAMP ioctl handling" } ] }, { "index": 29, "function": "__se_sys_ioctl", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff824860cc", "address_formatted": "0xffffffff824860cc (0xffffffff82485fd0 + 0xfc)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff824860cb", "source": { "primary": { "function": "vfs_ioctl", "file": "fs/ioctl.c", "line": 51 }, "inlined_frames": [ { "function": "__do_sys_ioctl", "file": "fs/ioctl.c", "line": 597 }, { "function": "__se_sys_ioctl", "file": "fs/ioctl.c", "line": 583 } ] }, "function_source": { "file": "fs/ioctl.c", "start_line": 35, "end_line": 56, "code": " * @filp: open file to invoke ioctl method on\n * @cmd: ioctl command to execute\n * @arg: command-specific argument for ioctl\n *\n * Invokes filesystem specific ->unlocked_ioctl, if one exists; otherwise\n * returns -ENOTTY.\n *\n * Returns 0 on success, -errno on error.\n */\nstatic int vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)\n{\n int error = -ENOTTY;\n\n if (!filp->f_op->unlocked_ioctl)\n goto out;\n\n error = filp->f_op->unlocked_ioctl(filp, cmd, arg);\n if (error == -ENOIOCTLCMD)\n error = -ENOTTY;\n out:\n return error;\n}\n" }, "git_blame_hashes": [ "07d106d0a33d6063d2061305903deb02489eba20", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "72c2d53192004845cbc19cd8a30b3212a9288140", "b19dd42faf413b4705d4adb38521e82d73fa4249", "deb21db7788b97a2bccdefe605433ef97f482689", "e5bca063c150877c45b88ff134b6ef7a5eae8e7a", "f6a4c8bdb30370991905941ddf85d28dde7370b1" ], "recent_commits": [ { "hash": "e5bca063c150", "subject": "fs: remove vfs_ioctl export" }, { "hash": "f326565c4441", "subject": "ioctl: Fix return type of several functions from long to int" }, { "hash": "66cf191f3eae", "subject": "compat_ioctl: don't pass fd around when not needed" }, { "hash": "72c2d5319200", "subject": "file->f_op is never NULL..." }, { "hash": "07d106d0a33d", "subject": "vfs: fix up ENOIOCTLCMD error handling" }, { "hash": "b19dd42faf41", "subject": "bkl: Remove locked .ioctl file operation" }, { "hash": "67cde595374d", "subject": "make vfs_ioctl() static" }, { "hash": "f6a4c8bdb303", "subject": "fix up kerneldoc in fs/ioctl.c a little bit" }, { "hash": "deb21db7788b", "subject": "VFS: swap do_ioctl and vfs_ioctl names" }, { "hash": "64d67d21773f", "subject": "revert \"vanishing ioctl handler debugging\"" } ] }, { "index": 30, "function": "do_syscall_64", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8bb861df", "address_formatted": "0xffffffff8bb861df (0xffffffff8bb86080 + 0x15f)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8bb861de", "source": { "primary": { "function": "do_syscall_x64", "file": "arch/x86/entry/syscall_64.c", "line": 63 }, "inlined_frames": [ { "function": "do_syscall_64", "file": "arch/x86/entry/syscall_64.c", "line": 94 } ] }, "function_source": { "file": "arch/x86/entry/syscall_64.c", "start_line": 51, "end_line": 67, "code": "#endif\n\nstatic __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr)\n{\n /*\n * Convert negative numbers to very high and thus out of range\n * numbers for comparisons.\n */\n unsigned int unr = nr;\n\n if (likely(unr < NR_syscalls)) {\n unr = array_index_nospec(unr, NR_syscalls);\n regs->ax = x64_sys_call(regs, unr);\n return true;\n }\n return false;\n}\n" }, "git_blame_hashes": [ "01dfb4805420291966b75b208d66c88c62579649", "21832247f2df4f636b0f2ae6939819e8dd2ed35f" ], "recent_commits": [ { "hash": "21832247f2df", "subject": "x86/syscall/x32: Move x32 syscall table" }, { "hash": "01dfb4805420", "subject": "x86/syscall/64: Move 64-bit syscall dispatch code" } ] }, { "index": 31, "function": "entry_SYSCALL_64_after_hwframe", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff81000130", "address_formatted": "0xffffffff81000130 (0xffffffff810000b9 + 0x77)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8100012f", "source": { "primary": { "function": "entry_SYSCALL_64_after_hwframe", "file": "arch/x86/entry/entry_64.S", "line": 121 }, "inlined_frames": [] }, "function_source": { "file": "arch/x86/entry/entry_64.S", "start_line": 81, "end_line": 181, "code": " *\n * When user can change pt_regs->foo always force IRET. That is because\n * it deals with uncanonical addresses better. SYSRET has trouble\n * with them due to bugs in both AMD and Intel CPUs.\n */\n\nSYM_CODE_START(entry_SYSCALL_64)\n UNWIND_HINT_ENTRY\n ENDBR\n\n swapgs\n /* tss.sp2 is scratch space. */\n movq %rsp, PER_CPU_VAR(cpu_tss_rw + TSS_sp2)\n SWITCH_TO_KERNEL_CR3 scratch_reg=%rsp\n movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp\n\nSYM_INNER_LABEL(entry_SYSCALL_64_safe_stack, SYM_L_GLOBAL)\n ANNOTATE_NOENDBR\n\n /* Construct struct pt_regs on stack */\n pushq $__USER_DS /* pt_regs->ss */\n pushq PER_CPU_VAR(cpu_tss_rw + TSS_sp2) /* pt_regs->sp */\n pushq %r11 /* pt_regs->flags */\n pushq $__USER_CS /* pt_regs->cs */\n pushq %rcx /* pt_regs->ip */\nSYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL)\n pushq %rax /* pt_regs->orig_ax */\n\n PUSH_AND_CLEAR_REGS rax=$-ENOSYS\n\n /* IRQs are off. */\n movq %rsp, %rdi\n /* Sign extend the lower 32bit as syscall numbers are treated as int */\n movslq %eax, %rsi\n\n /* clobbers %rax, make sure it is after saving the syscall nr */\n IBRS_ENTER\n UNTRAIN_RET\n CLEAR_BRANCH_HISTORY\n\n call do_syscall_64 /* returns with IRQs disabled */\n\n /*\n * Try to use SYSRET instead of IRET if we're returning to\n * a completely clean 64-bit userspace context. If we're not,\n * go to the slow exit path.\n * In the Xen PV case we must use iret anyway.\n */\n\n ALTERNATIVE \"testb %al, %al; jz swapgs_restore_regs_and_return_to_usermode\", \\\n \"jmp swapgs_restore_regs_and_return_to_usermode\", X86_FEATURE_XENPV\n\n /*\n * We win! This label is here just for ease of understanding\n * perf profiles. Nothing jumps here.\n */\nsyscall_return_via_sysret:\n IBRS_EXIT\n POP_REGS pop_rdi=0\n\n /*\n * Now all regs are restored except RSP and RDI.\n * Save old stack pointer and switch to trampoline stack.\n */\n movq %rsp, %rdi\n movq PER_CPU_VAR(cpu_tss_rw + TSS_sp0), %rsp\n UNWIND_HINT_END_OF_STACK\n\n pushq RSP-RDI(%rdi) /* RSP */\n pushq (%rdi) /* RDI */\n\n /*\n * We are on the trampoline stack. All regs except RDI are live.\n * We can do future final exit work right here.\n */\n STACKLEAK_ERASE_NOCLOBBER\n\n SWITCH_TO_USER_CR3_STACK scratch_reg=%rdi\n\n popq %rdi\n popq %rsp\nSYM_INNER_LABEL(entry_SYSRETQ_unsafe_stack, SYM_L_GLOBAL)\n ANNOTATE_NOENDBR\n swapgs\n CLEAR_CPU_BUFFERS\n sysretq\nSYM_INNER_LABEL(entry_SYSRETQ_end, SYM_L_GLOBAL)\n ANNOTATE_NOENDBR\n int3\nSYM_CODE_END(entry_SYSCALL_64)\n\n/*\n * %rdi: prev task\n * %rsi: next task\n */\n.pushsection .text, \"ax\"\nSYM_FUNC_START(__switch_to_asm)\n ANNOTATE_NOENDBR\n /*\n * Save callee-saved registers\n * This must match the order in inactive_task_frame\n" }, "git_blame_hashes": [ "0100301bfdf56a2a370c7157b5ab0fbf9313e1cd", "0595494891723a1dcca5eaa8eeca8ab54ad953b9", "0bd7b79851d0f74b24a9ce87d088f2e7c718f668", "1b331eeea7b8676fc5dbdf80d0a07e41be226177", "1da177e4c3f41524e886b7f1b8a0c1fc7321cac2", "1e423bff959e48166f5b7efca01fdb0dbdf05846", "26ba4e5738a544aa17c462bfbe580e74071c810b", "2dbb887e875b1de3ca8f40ddf26bcfe55798c609", "30907fd13bb593202574bb20af58d67c70a1ee14", "385f72c83eb609652f02dc9ee415520c23bda629", "3c7501722e6b31a6e56edd23cea5e77dbb9ffd1a", "3e3b9293d392c577b62e24e4bc9982320438e749", "3e5e7f7736b05d5fdf2cc4e0ba4f2d8bc42c630d", "47f33de4aafb2f5e43d480d590a939d0f1d566a9", "4d7321381e5c7102a3d3faf0a0a0035a09619612", "4fbb39108f972437c44e5ffa781b56635d496826", "582077c94052bd69a544b3f9d7619c9c6a67c34b", "6fd166aae78c0ab738d49bda653cbd9e3b1491cf", "72fe4858544292ad64600765cb78bc02298c6b1c", "7390db8aea0d64e9deb28b8e1ce716f5020c7ee5", "7bf36bbc5e0c09271f9efe22162f8cc3f8ebd3d2", "7fcb3bc361c724a75bc642dbdd9d9bf0bdf07260", "8a055d7f411d41755ce30db5bb65b154777c4b78", "8a9949bc71a71b3dd633255ebe8f8869b1f73474", "8f93402b92d443573d310250efa0b7f352fec992", "96c64806b4bf35f5edb465cafa6cec490e424a30", "98f05b5138f0a9b56022295cc1387e635b25635d", "9ed8e7d86061e7c3fb3855358d51ba4abb19ceb1", "a09a6e2399ba0595c3042b3164f3ca68a3cff33e", "a13644f3a53de4e95a7bce6459f834e832ea44c5", "afaef01c001537fa97a25092d7f54d764dc7d8c1", "afd30525a659ac0ae0904f0cb4a2ca75522c3123", "b9f6976bfb949121bb6e1e6f4fd9909735729148", "bc7b11c04ee9c9b0451ebf85bf64e0de69fdbb17", "bf904d2762ee6fc1e4acfcb0772bbfb4a27ad8a6", "c482feefe1aeb150156248ba0fd3e029bc886605", "ca282b486a570a0bfda5c1a4595ace7fa14243bf", "ce6565282b3b16fd850c6a676f78c6bc76d0c235", "e8d61bdf0fdfaeaf35fb5a63d6e67e60038b88e0", "fb799447ae2974a07907906dff5bd4b9e47b7123", "fffbb5dcfd29f8831e41b4dd2ab938bd36d35283" ], "recent_commits": [ { "hash": "385f72c83eb6", "subject": "x86/percpu: Move top_of_stack to percpu hot section" }, { "hash": "582077c94052", "subject": "x86/cfi: Clean up linkage" }, { "hash": "7390db8aea0d", "subject": "x86/bhi: Add support for clearing branch history at syscall entry" }, { "hash": "3c7501722e6b", "subject": "x86/entry_64: Add VERW just before userspace transition" }, { "hash": "ca282b486a57", "subject": "x86/entry/64: Convert SYSRET validation tests to C" }, { "hash": "eb43c9b1517b", "subject": "x86/entry/64: Remove obsolete comment on tracing vs. SYSRET" }, { "hash": "fb799447ae29", "subject": "x86,objtool: Split UNWIND_HINT_EMPTY in two" }, { "hash": "c063a217bc07", "subject": "x86/percpu: Move current_top_of_stack next to current_task" }, { "hash": "a09a6e2399ba", "subject": "objtool: Add entry UNRET validation" }, { "hash": "2dbb887e875b", "subject": "x86/entry: Add kernel IBRS implementation" } ] }, { "index": 32, "function": "kfree", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff82255675", "address_formatted": "0xffffffff82255675 (0xffffffff822554b0 + 0x1c5)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff82255674", "source": { "primary": { "function": "kasan_slab_free", "file": "include/linux/kasan.h", "line": 235 }, "inlined_frames": [ { "function": "slab_free_hook", "file": "mm/slub.c", "line": 2689 }, { "function": "slab_free", "file": "mm/slub.c", "line": 6246 }, { "function": "kfree", "file": "mm/slub.c", "line": 6561 } ] }, "function_source": { "file": "include/linux/kasan.h", "start_line": 223, "end_line": 238, "code": " * whether KASAN took ownership of the object.\n *\n * This function is intended only for use by the slab allocator.\n *\n * @Return true if KASAN took ownership of the object; false otherwise.\n */\nstatic __always_inline bool kasan_slab_free(struct kmem_cache *s,\n void *object, bool init,\n bool still_accessible,\n bool no_quarantine)\n{\n if (kasan_enabled())\n return __kasan_slab_free(s, object, init, still_accessible,\n no_quarantine);\n return false;\n}\n" }, "git_blame_hashes": [ "34303244f2615add92076a4bf2d4f39323bde4f2", "af92793e52c3a99b828ed4bdd277fd3e11c18d08", "b3c34245756adada8a50bdaedbb3965b071c7b0a", "d57a964e09c22441e9fb497d1d7a5c1983a5d1fb" ], "recent_commits": [ { "hash": "af92793e52c3", "subject": "slab: Introduce kmalloc_nolock() and kfree_nolock()." }, { "hash": "b8c8ba73c68b", "subject": "slub: Introduce CONFIG_SLUB_RCU_DEBUG" }, { "hash": "b3c34245756a", "subject": "kasan: catch invalid free before SLUB reinitializes the object" }, { "hash": "d57a964e09c2", "subject": "kasan, mm: integrate slab init_on_free with HW_TAGS" }, { "hash": "027b37b552f3", "subject": "kasan: move _RET_IP_ to inline wrappers" }, { "hash": "34303244f261", "subject": "kasan, mm: check kasan_enabled in annotations" }, { "hash": "80a9201a5965", "subject": "mm, kasan: switch SLUB to stackdepot, enable memory quarantine for SLUB" } ] }, { "index": 33, "function": "rose_timer_expiry", "module": "vmlinux", "function_type": "normal", "address_computed": "0xffffffff8aa03d73", "address_formatted": "0xffffffff8aa03d73 (0xffffffff8aa038b0 + 0x4c3)", "addr2line_correction": "-1 (return address)", "addr2line_address": "0xffffffff8aa03d72", "source": { "primary": { "function": "rose_neigh_put", "file": "include/net/rose.h", "line": 0 }, "inlined_frames": [ { "function": "rose_timer_expiry", "file": "net/rose/rose_timer.c", "line": 0 } ] }, "function_source": null, "note": "addr2line returned line 0 for include/net/rose.h \u2014 DWARF may be incomplete at this address" } ] }