Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\livepatch\core.c Create Date:2022-07-28 10:30:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:klp_write_object_relocations

Proto:static int klp_write_object_relocations(struct module *pmod, struct klp_object *obj)

Type:int

Parameter:

TypeParameterName
struct module *pmod
struct klp_object *obj
252  ret = 0
255  Elf_Shdr * sec
257  If WARN_ON(!klp_is_object_loaded(obj)) Then Return -EINVAL
260  objname = If klp_is_module(obj) Then external Else "vmlinux"
263  When i < e_shnum cycle
264  sec = sechdrs + i
265  secname = secstrings + sh_name
266  If Not (sh_flags & SHF_RELA_LIVEPATCH) Then Continue
274  cnt = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments
275  If cnt != 1 Then
276  pr_err("section %s has an incorrectly formatted name\n", secname)
278  ret = -EINVAL
279  Break
282  If strcmp(objname, sec_objname) Then Continue
285  ret = klp_resolve_symbols(sec, pmod)
286  If ret Then Break
289  ret = apply_relocate_add(sechdrs, strtab, symndx, i, pmod)
292  If ret Then Break
296  Return ret
Caller
NameDescribe
klp_init_object_loadedparts of the initialization that is done only when the object is loaded