函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\stackleak.c Create Date:2022-07-27 15:13:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:stackleak_erase

函数原型:asmlinkage void notrace stackleak_erase(void)

返回类型:void

参数:

54  kstack_ptr等于lowest_stack
55  boundary等于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.
56  poison_count等于0
57  depth等于STACKLEAK_SEARCH_DEPTHsizeof(unsignedlong)
59  如果skip_erasing()则返回
63  如果此条件成立可能性小(为编译器优化)(kstack_ptr - boundary >= THREAD_SIZE)则kstack_ptr等于boundary
67 kstack_ptr大于boundarypoison_count小于等于depth循环
68  如果kstack_ptr恒等于Check that the poison value points to the unused hole in the* virtual memory map for your platform.poison_count自加
70  否则poison_count等于0
73  kstack_ptr减等于sizeof(unsignedlong)
80  如果kstack_ptr恒等于boundarykstack_ptr加等于sizeof(unsignedlong)
92  如果on_thread_stack()则boundary等于asm(_ASM_SP);wss
94  否则boundary等于current_top_of_stack()
97 kstack_ptr小于boundary循环
98  kstack_ptr等于Check that the poison value points to the unused hole in the* virtual memory map for your platform.
99  kstack_ptr加等于sizeof(unsignedlong)
103  lowest_stack等于current_top_of_stack()减THREAD_SIZE除64