cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/mm/pgtable_32.c

Directory: arch/x86/mm
// SPDX-License-Identifier: GPL-2.0
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/nmi.h>
#include <linux/swap.h>
#include <linux/smp.h>
#include <linux/highmem.h>
#include <linux/pagemap.h>
#include <linux/spinlock.h>

#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/fixmap.h>
#include <asm/e820/api.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
#include <asm/io.h>


unsigned int __VMALLOC_RESERVE = 128 << 20;

/*
 * Associate a virtual page frame with a given physical page frame 
 * and protection flags for that frame.
 */ 

void set_pte_vaddr(unsigned long vaddr, pte_t pteval) { pgd_t *pgd; p4d_t *p4d; pud_t *pud; pmd_t *pmd; pte_t *pte; pgd = swapper_pg_dir + pgd_index(vaddr); if (pgd_none(*pgd)) { BUG(); return; } p4d = p4d_offset(pgd, vaddr); if (p4d_none(*p4d)) { BUG(); return; } pud = pud_offset(p4d, vaddr); if (pud_none(*pud)) { BUG(); return; } pmd = pmd_offset(pud, vaddr); if (pmd_none(*pmd)) { BUG(); return; } pte = pte_offset_kernel(pmd, vaddr); if (!pte_none(pteval)) set_pte_at(&init_mm, vaddr, pte, pteval); else pte_clear(&init_mm, vaddr, pte); /* * It's enough to flush this one mapping. * (PGE mappings get flushed as well) */ __flush_tlb_one(vaddr); }

Contributors

PersonTokensPropCommitsCommitProp
Dan Aloni7644.71%110.00%
Kirill A. Shutemov2816.47%110.00%
Andi Kleen2715.88%110.00%
Jan Beulich2112.35%220.00%
Andrew Morton105.88%220.00%
Jeremy Fitzhardinge63.53%220.00%
Dave Hansen21.18%110.00%
Total170100.00%10100.00%

unsigned long __FIXADDR_TOP = 0xfffff000; EXPORT_SYMBOL(__FIXADDR_TOP); /* * vmalloc=size forces the vmalloc area to be exactly 'size' * bytes. This can be used to increase (or decrease) the * vmalloc area - the default is 128m. */
static int __init parse_vmalloc(char *arg) { if (!arg) return -EINVAL; /* Add VMALLOC_OFFSET to the parsed value due to vm area guard hole*/ __VMALLOC_RESERVE = memparse(arg, &arg) + VMALLOC_OFFSET; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu3391.67%150.00%
Dave Young38.33%150.00%
Total36100.00%2100.00%

early_param("vmalloc", parse_vmalloc); /* * reservetop=size reserves a hole at the top of the kernel address space which * a hypervisor can load into later. Needed for dynamically loaded hypervisors, * so relocating the fixmap can be done before paging initialization. */
static int __init parse_reservetop(char *arg) { unsigned long address; if (!arg) return -EINVAL; address = memparse(arg, &arg); reserve_top_address(address); early_ioremap_init(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Yinghai Lu4293.33%133.33%
Liang Li24.44%133.33%
Mark Salter12.22%133.33%
Total45100.00%3100.00%

early_param("reservetop", parse_reservetop);

Overall Contributors

PersonTokensPropCommitsCommitProp
Dan Aloni11533.92%14.55%
Yinghai Lu9126.84%14.55%
Kirill A. Shutemov288.26%14.55%
Andi Kleen277.96%14.55%
Jan Beulich216.19%29.09%
Jeremy Fitzhardinge175.01%313.64%
Andrew Morton164.72%418.18%
Pekka J Enberg82.36%14.55%
Ingo Molnar41.18%29.09%
Dave Young30.88%14.55%
Prarit Bhargava30.88%14.55%
Liang Li20.59%14.55%
Dave Hansen20.59%14.55%
Mark Salter10.29%14.55%
Greg Kroah-Hartman10.29%14.55%
Total339100.00%22100.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.