函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kasan\report.c Create Date:2022-07-27 17:26:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_address_stack_frame_info

函数原型:static bool __must_check get_address_stack_frame_info(const void *addr, unsigned long *offset, const char **frame_descr, const void **frame_pc)

返回类型:bool

参数:

类型参数名称
const void *addr
unsigned long *offset
const char **frame_descr
const void **frame_pc
301  BUILD_BUG_ON - break compile if a condition is true(IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_STACK_GROWSUP))
307  如果非object_is_on_stack(addr)则返回:false
310  aligned_addr等于und_down - round down to next specified power of 2*@x: the value to round*@y: multiple to round down to (must be a power of 2)* Rounds @x down to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding down, use rounddown() below.((unsignedlong)addr, sizeof(long))
311  mem_ptr等于und_down - round down to next specified power of 2*@x: the value to round*@y: multiple to round down to (must be a power of 2)* Rounds @x down to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding down, use rounddown() below.(aligned_addr, KASAN_SHADOW_SCALE_SIZE)
312  shadow_ptr等于kasan_mem_to_shadow((void * )aligned_addr)
313  shadow_bottom等于kasan_mem_to_shadow(Return the address of the last usable long on the stack.* When the stack grows down, this is just above the thread* info struct. Going any lower will corrupt the threadinfo.* When the stack grows up, this is the highest address.)
315 shadow_ptr大于等于shadow_bottomshadow_ptr不等于Stack redzone shadow values* (Those are compiler's ABI, don't change them)循环
316  shadow_ptr自减
317  mem_ptr减等于KASAN_SHADOW_SCALE_SIZE
320 shadow_ptr大于等于shadow_bottomshadow_ptr恒等于Stack redzone shadow values* (Those are compiler's ABI, don't change them)循环
321  shadow_ptr自减
322  mem_ptr减等于KASAN_SHADOW_SCALE_SIZE
325  如果shadow_ptr小于shadow_bottom则返回:false
328  frame等于mem_ptrKASAN_SHADOW_SCALE_SIZE
329  如果frame[0]不等于Stack frame marker (compiler ABI).
330  打印错误信息("KASAN internal error: frame info validation failed; invalid marker: %lu\n", frame[0])
332  返回:false
335  offset等于addrframe
336  frame_descr等于frame[1]
337  frame_pc等于frame[2]
339  返回:true
调用者
名称描述
print_address_stack_frame