Skip to content
Permalink
Browse files
hack in a debug output in freeinitmem
  • Loading branch information
mmind authored and guoren83 committed Jan 18, 2022
1 parent 2894557 commit a8a0c8f014166b1e95e223240632fd0baac50ea7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
@@ -320,6 +320,14 @@ subsys_initcall(topology_init);

void free_initmem(void)
{
unsigned long prot_val = pgprot_val(PAGE_KERNEL);

printk("%s: _PAGE_KERNEL-orig: 0x%lx\n", __func__, prot_val);
ALT_THEAD_PMA(prot_val);
printk("%s: _PAGE_KERNEL: 0x%lx\n", __func__, prot_val);
printk("%s: _PAGE_IO: 0x%lx\n", __func__, _PAGE_IO);
printk("%s: _PAGE_NOCACHE: 0x%lx\n", __func__, _PAGE_NOCACHE);

if (IS_ENABLED(CONFIG_STRICT_KERNEL_RWX))
set_kernel_memory(lm_alias(__init_begin), lm_alias(__init_end),
IS_ENABLED(CONFIG_64BIT) ?
@@ -914,6 +914,11 @@ static int __init lock_torture_init(void)
&percpu_rwsem_lock_ops,
};


printk("%s: -----> %llx\n", __func__, _PAGE_MTMASK);


return -EINVAL;
if (!torture_init_begin(torture_type, verbose))
return -EBUSY;

0 comments on commit a8a0c8f

Please sign in to comment.