cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/mm/debug_pagetables.c

Directory: arch/x86/mm
#include <linux/debugfs.h>
#include <linux/module.h>
#include <linux/seq_file.h>
#include <asm/pgtable.h>


static int ptdump_show(struct seq_file *m, void *v) { ptdump_walk_pgd_level(m, NULL); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook25100.00%1100.00%
Total25100.00%1100.00%


static int ptdump_open(struct inode *inode, struct file *filp) { return single_open(filp, ptdump_show, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook26100.00%1100.00%
Total26100.00%1100.00%

static const struct file_operations ptdump_fops = { .owner = THIS_MODULE, .open = ptdump_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static struct dentry *pe;
static int __init pt_dump_debug_init(void) { pe = debugfs_create_file("kernel_page_tables", S_IRUSR, NULL, NULL, &ptdump_fops); if (!pe) return -ENOMEM; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook3697.30%150.00%
Borislav Petkov12.70%150.00%
Total37100.00%2100.00%


static void __exit pt_dump_debug_exit(void) { debugfs_remove_recursive(pe); }

Contributors

PersonTokensPropCommitsCommitProp
Kees Cook14100.00%1100.00%
Total14100.00%1100.00%

module_init(pt_dump_debug_init); module_exit(pt_dump_debug_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>"); MODULE_DESCRIPTION("Kernel debugging helper that dumps pagetables");

Overall Contributors

PersonTokensPropCommitsCommitProp
Kees Cook17799.44%150.00%
Borislav Petkov10.56%150.00%
Total178100.00%2100.00%
Directory: arch/x86/mm
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.