Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\panic.c Create Date:2022-07-28 08:59:40
Last Modify:2022-05-22 10:57:01 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.

Proto:void panic(const char *fmt, ...)

Type:void

Parameter:

TypeParameterName
const char *fmt
171  i_next = 0
172  state = 0
174  _crash_kexec_post_notifiers = crash_kexec_post_notifiers
182  local_irq_disable()
183  preempt_disable_notrace()
200  this_cpu = These macros fold the SMP functionality into a single CPU system()
201  old_cpu = atomic_cmpxchg( & panic_cpu, PANIC_CPU_INVALID, this_cpu)
203  If old_cpu != PANIC_CPU_INVALID && old_cpu != this_cpu Then Stop ourself in panic -- architecture code may override this
206  console_verbose()
207  bust_spinlocks(1)
208  va_start(args, fmt)
209  len = vscnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@args: Arguments for the format string* The return value is the
210  va_end(args)
212  If len && buf[len - 1] == '\n' Then buf[len - 1] = '\0'
215  These can be used to print at the various log levels.* All of these will print unconditionally, although note that pr_debug()* and other debug macros are compiled out unless either DEBUG is defined* or CONFIG_DYNAMIC_DEBUG is set.("Kernel panic - not syncing: %s\n", buf)
229  kgdb_panic(buf)
239  If Not _crash_kexec_post_notifiers Then
240  printk_safe_flush_on_panic()
241  __crash_kexec(NULL)
248  smp_send_stop()
249  Else
255  Stop other CPUs in panic. Architecture dependent code may override this* with more suitable version. For example, if the architecture supports* crash dump, it should save registers of each stopped CPU and disable
262  atomic_notifier_call_chain( & panic_notifier_list, 0, buf)
265  printk_safe_flush_on_panic()
266  kmsg_dump(KMSG_DUMP_PANIC)
277  If _crash_kexec_post_notifiers Then __crash_kexec(NULL)
283  console_unblank()
293  Generic 'turn off all lock debugging' function:
294  console_flush_on_panic(CONSOLE_FLUSH_PENDING)
296  panic_print_sys_info()
298  If Not panic_blink Then panic_blink = no_blink
301  If panic_timeout > 0 Then
306  These can be used to print at the various log levels.* All of these will print unconditionally, although note that pr_debug()* and other debug macros are compiled out unless either DEBUG is defined* or CONFIG_DYNAMIC_DEBUG is set.("Rebooting in %d seconds..\n", panic_timeout)
308  When i < panic_timeout * 1000 cycle
310  If i >= i_next Then
311  i += panic_blink(state ^= 1)
312  i_next = i + 3600 / PANIC_BLINK_SPD
317  If panic_timeout != 0 Then
323  If panic_reboot_mode != REBOOT_UNDEFINED Then reboot_mode = panic_reboot_mode
325  Emergency restart, callable from an interrupt handler.
339  These can be used to print at the various log levels.* All of these will print unconditionally, although note that pr_debug()* and other debug macros are compiled out unless either DEBUG is defined* or CONFIG_DYNAMIC_DEBUG is set.("---[ end Kernel panic - not syncing: %s ]---\n", buf)
342  suppress_printk = 1
343  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
344  cycle
345  touch_softlockup_watchdog()
346  If i >= i_next Then
347  i += panic_blink(state ^= 1)
348  i_next = i + 3600 / PANIC_BLINK_SPD
350  mdelay(PANIC_TIMER_STEP)
Caller
NameDescribe
oops_end
early_panic
e820__reserve_resources
tboot_create_trampoline
check_bugs
wait_for_panicPanic in progress. Enable interrupts and wait for final IPI
mce_panic
__reload_lateReturns:* < 0 - on error* 0 - no update done* 1 - microcode was updated
setup_per_cpu_areas
validate_x2apic
mp_save_irqWill be called in mpparse/acpi/sfi codes for saving IRQ info
add_pin_to_irq_node
setup_ioapic_ids_from_mpc_nocheck to set the IO-APIC physical IDs based on the* values stored in the MPC table.* by Matt Domsch Tue Dec 21 12:25:05 CST 1999
check_timerThis code may look a bit paranoid, but it's supposed to cooperate with* a wide range of boards and BIOS bugs. Fortunately only the timer IRQ* is so screwy. Thanks to Brian Perkins for testing/hacking this beast* fanatically on his truly buggy board.
io_apic_get_unique_id
ioapic_setup_resources
io_apic_init_mappings
uv_undefined
generic_apic_probe
doublefault_shimCalled by double_fault with CR0.TS and EFLAGS.NT cleared. The CPU thinks* we're running the doublefault task. Cannot return.
apbt_set_mapping
apbt_clocksource_register
apbt_time_initEarly setup the APBT timer, only use timer 0 for booting then switch to* per CPU timer if possible.* returns 1 if per cpu apbt is setup* returns 0 if no per cpu apbt is chosen* panic if set up failed, this is the only platform timer on Moorestown.
jailhouse_init_platform
dma_map_areaMap a single continuous physical area into the IOMMU.* Caller needs to check if the iommu is needed and flush.
gart_map_sgDMA map all entries in a scatterlist.* Merge chunks that have page aligned sizes into a continuous mapping.
init_amd_gattPrivate Northbridge GATT initialization in case we cannot use the* AGP driver for some reason.
gart_iommu_init
gart_iommu_hole_init
nmi_panicA variant of panic() called from NMI context. We return if we've already* panicked on this CPU. If another CPU already panicked, loop in* nmi_panic_self_stop() which can provide architecture dependent code such* as saving register state for crash dump.
__warn
do_exit
abort
put_cred_rcuThe RCU callback to actually dispose of a set of credentials
SYSCALL_DEFINE4Reboot system call: for obvious reasons only root may call it,* and even root needs to set up some magic numbers in the registers* so that some mistake won't make this reboot the whole machine.* You can also set the meaning of the ctrl-alt-del-key here.
__schedule_bugPrint scheduling while atomic bug:
__register_nosave_regiongister_nosave_region - Register a region of unsaveable memory.* Register a range of page frames the contents of which should not be saved* during hibernation (to be used in the early initialization code).
swsusp_header_init
rcu_init_oneHelper function for rcu_init() that initializes the rcu_state structure.
swiotlb_init_with_tbl
swiotlb_tbl_map_single
audit_panic
audit_initInitialize audit support at boot time.
kgdb_reenter_check
check_hung_uninterruptible_tasksCheck whether a TASK_UNINTERRUPTIBLE does not get woken up for* a really long time (120 seconds). If that happens, print out* a warning.
setup_command_lineWe need to store the untouched command line for future reference.* We also need to store the touched command line since the parameter* parsing is performed in place, and we should allow a component to* store reference of name/value for future reference.
start_kernel
kernel_init
find_link
dir_add
unpack_to_rootfs
populate_rootfs
mount_block_root
crd_load
out_of_memory_of_memory - kill the "best" process when we run out of memory*@oc: pointer to struct oom_control* If we run out of memory, we have the choice between either* killing a random task (bad), letting the system crash (worse)
pcpu_alloc_first_chunkpcpu_alloc_first_chunk - creates chunks that serve the first chunk*@tmp_addr: the start of the region served*@map_size: size of the region served* This is responsible for creating the chunks that serve the first chunk
pcpu_setup_first_chunkpcpu_setup_first_chunk - initialize the first percpu chunk*@ai: pcpu_alloc_info describing how to percpu area is shaped*@base_addr: mapped address* Initialize the first percpu chunk which contains the kernel static* percpu area
setup_per_cpu_areasUP percpu area setup.* UP always uses km-based percpu allocator with identity mapping.* Static percpu variables are indistinguishable from the usual static* variables and don't require any special preparation.
kmem_cache_create_usercopykmem_cache_create_usercopy - Create a cache with a region suitable* for copying to userspace*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.
setup_usemap
alloc_large_system_hashallocate a large system hash table from bootmem* - it is assumed that the hash table must contain an exact power-of-2* quantity of entries* - limit is the number of hash buckets, not the total allocation size
early_alloc
end_report
memory_failurememory_failure - Handle memory failure of a page.*@pfn: Page Number of the corrupted page*@flags: fine tune action taken* This function is called by the low level machine check code* of an architecture when it detects hardware memory corruption* of a page
page_ext_init_flatmem
init_bio
blk_dev_init
throtl_init
bio_integrity_init
key_proc_initDeclare the /proc files.
security_add_hookssecurity_add_hooks - Add a modules hooks to the hook lists.*@hooks: the hooks to add*@count: the number of hooks to add*@lsm: the name of the security module* Each LSM has to register its hooks with the infrastructure.
lsm_early_cred
lsm_early_task
selinux_init
selnl_init
smk_cipso_doismk_cipso_doi - initialize the CIPSO domain
tomoyo_check_profilemoyo_check_profile - Check all profiles currently assigned to domains are defined.
tomoyo_warn_oommoyo_warn_oom - Print out of memory warning message.*@function: Function's name.
aa_create_aafsaa_create_aafs - create the apparmor security filesystem* dentries created here are released by aa_destroy_aafs* Returns: error on failure
yama_init_sysctl
ima_mok_initAllocate the IMA blacklist keyring
init_mount_tree
mnt_init
nsfs_init
bdev_cache_init
fsnotify_init
dnotify_init
anon_inode_init
aio_setupaio_setup* Creates the slab caches used by the aio routines, panic on* failure as this is done early during the boot sequence.
dquot_init
__ubsan_handle_builtin_unreachable
do_double_faultRuns on an IST stack for x86_64 and on a special task stack for x86_32.* On x86_64, this is more or less a normal kernel entry. Notwithstanding the* SDM's warnings about double faults being unrecoverable, returning works as* expected