函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_klp_shadow_vars_init

函数原型:static int test_klp_shadow_vars_init(void)

返回类型:int

参数:

129  obj等于THIS_MODULE
130  id等于0x1234
131  size等于*的长度
132  gfp_flags等于GFP_KERNEL
139  ptr_id(NULL)
140  ptr_id( & var1)
141  ptr_id( & var2)
142  ptr_id( & var3)
143  ptr_id( & var4)
149  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
150  如果非ret打印信息(" got expected NULL result\n")
156  sv1等于shadow_alloc(obj, id, size, gfp_flags, Shadow variable constructor - remember simple pointer data , & var1)
157  如果非sv1则返回:负ENOMEM
160  sv2等于shadow_alloc(obj + 1, id, size, gfp_flags, Shadow variable constructor - remember simple pointer data , & var2)
161  如果非sv2则返回:负ENOMEM
164  sv3等于shadow_alloc(obj, id + 1, size, gfp_flags, Shadow variable constructor - remember simple pointer data , & var3)
165  如果非sv3则返回:负ENOMEM
172  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
173  如果非ret则返回:负EINVAL
175  如果ret恒等于sv1sv1恒等于var1打印信息(" got expected PTR%d -> PTR%d result\n", ptr_id(sv1), ptr_id( * sv1))
179  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
180  如果非ret则返回:负EINVAL
182  如果ret恒等于sv2sv2恒等于var2打印信息(" got expected PTR%d -> PTR%d result\n", ptr_id(sv2), ptr_id( * sv2))
185  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
186  如果非ret则返回:负EINVAL
188  如果ret恒等于sv3sv3恒等于var3打印信息(" got expected PTR%d -> PTR%d result\n", ptr_id(sv3), ptr_id( * sv3))
196  sv4等于shadow_get_or_alloc(obj + 2, id, size, gfp_flags, Shadow variable constructor - remember simple pointer data , & var4)
197  如果非sv4则返回:负ENOMEM
200  ret等于shadow_get_or_alloc(obj + 2, id, size, gfp_flags, Shadow variable constructor - remember simple pointer data , & var4)
201  如果非ret则返回:负EINVAL
203  如果ret恒等于sv4sv4恒等于var4打印信息(" got expected PTR%d -> PTR%d result\n", ptr_id(sv4), ptr_id( * sv4))
211  shadow_free(obj, id, shadow_dtor)
212  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
213  如果非ret打印信息(" got expected NULL result\n")
216  shadow_free(obj + 1, id, shadow_dtor)
217  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
218  如果非ret打印信息(" got expected NULL result\n")
221  shadow_free(obj + 2, id, shadow_dtor)
222  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
223  如果非ret打印信息(" got expected NULL result\n")
229  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
230  如果非ret则返回:负EINVAL
232  如果ret恒等于sv3sv3恒等于var3打印信息(" got expected PTR%d -> PTR%d result\n", ptr_id(sv3), ptr_id( * sv3))
239  shadow_free_all(id + 1, shadow_dtor)
240  ret等于Shadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
241  如果非ret打印信息(" shadow_get() got expected NULL result\n")
245  free_ptr_list()
247  返回:0