函数逻辑报告 |
Source Code:arch\x86\kernel\alternative.c |
Create Date:2022-07-27 08:45:00 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__text_poke
函数原型:static void *__text_poke(void *addr, const void *opcode, size_t len)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
void * | addr | |
const void * | opcode | |
size_t | len |
803 | BUG_ON(!after_bootmem) |
805 | 如果非core_kernel_text((unsignedlong)addr)则 |
809 | 否则 |
810 | pages[0]等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(addr) |
811 | WARN_ON(!PageReserved(pages[0])) |
819 | BUG_ON(!pages[0] || (cross_page_boundary && !pages[1])) |
821 | local_irq_save(flags) |
827 | pgprot等于__pgprot(pgprot_val(PAGE_KERNEL) & ~_PAGE_GLOBAL) |
832 | ptep等于get_locked_pte(poking_mm, poking_addr, & ptl) |
840 | set_pte_at(poking_mm, poking_addr, ptep, pte) |
842 | 如果cross_page_boundary则 |
844 | set_pte_at(poking_mm, poking_addr + PAGE_SIZE, ptep + 1, pte) |
851 | prev等于Using a temporary mm allows to set temporary mappings that are not accessible* by other CPUs |
854 | memcpy((u8 * )poking_addr + offset_in_page(addr), opcode, len) |
863 | pte_clear(poking_mm, poking_addr, ptep) |
864 | 如果cross_page_boundary则pte_clear(poking_mm, poking_addr + PAGE_SIZE, ptep + 1) |
872 | unuse_temporary_mm(prev) |
878 | flush_tlb_mm_range(poking_mm, poking_addr, poking_addr + (cross_page_boundary ? 2 : 1) * PAGE_SIZE, PAGE_SHIFT determines the page size , false) |
888 | pte_unmap_unlock(ptep, ptl) |
889 | local_irq_restore(flags) |
890 | 返回:addr |
名称 | 描述 |
---|---|
text_poke | xt_poke - Update instructions on a live kernel*@addr: address to modify*@opcode: source of the copy*@len: length to copy* Only atomic text poke/set should be allowed when not doing early patching |
text_poke_kgdb | xt_poke_kgdb - Update instructions on a live kernel by kgdb*@addr: address to modify*@opcode: source of the copy*@len: length to copy* Only atomic text poke/set should be allowed when not doing early patching |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |