cregit-Linux how code gets into the kernel

Release 4.18 arch/x86/lib/error-inject.c

Directory: arch/x86/lib
// SPDX-License-Identifier: GPL-2.0

#include <linux/error-injection.h>
#include <linux/kprobes.h>

asmlinkage void just_return_func(void);

asm(
        ".type just_return_func, @function\n"
        ".globl just_return_func\n"
        "just_return_func:\n"
        "       ret\n"
        ".size just_return_func, .-just_return_func\n"
);


void override_function_with_return(struct pt_regs *regs) { regs->ip = (unsigned long)&just_return_func; }

Contributors

PersonTokensPropCommitsCommitProp
Masami Hiramatsu21100.00%1100.00%
Total21100.00%1100.00%

NOKPROBE_SYMBOL(override_function_with_return);

Overall Contributors

PersonTokensPropCommitsCommitProp
Masami Hiramatsu4097.56%150.00%
Arnd Bergmann12.44%150.00%
Total41100.00%2100.00%
Directory: arch/x86/lib
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.