• Home
  • Raw
  • Download

Lines Matching refs:st

220 static void dump_prot(struct pg_state *st, const struct prot_bits *bits, size_t num)  in dump_prot()  argument
227 if ((st->current_prot & bits->mask) == bits->val) in dump_prot()
233 pt_dump_seq_printf(st->seq, " %s", s); in dump_prot()
237 static void note_prot_wx(struct pg_state *st, unsigned long addr) in note_prot_wx() argument
239 if (!st->check_wx) in note_prot_wx()
241 if ((st->current_prot & pg_level[st->level].ro_bit->mask) == in note_prot_wx()
242 pg_level[st->level].ro_bit->val) in note_prot_wx()
244 if ((st->current_prot & pg_level[st->level].nx_bit->mask) == in note_prot_wx()
245 pg_level[st->level].nx_bit->val) in note_prot_wx()
249 (void *)st->start_address); in note_prot_wx()
251 st->wx_pages += (addr - st->start_address) / PAGE_SIZE; in note_prot_wx()
254 static void note_page(struct pg_state *st, unsigned long addr, in note_page() argument
260 if (!st->level) { in note_page()
261 st->level = level; in note_page()
262 st->current_prot = prot; in note_page()
263 st->current_domain = domain; in note_page()
264 pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); in note_page()
265 } else if (prot != st->current_prot || level != st->level || in note_page()
266 domain != st->current_domain || in note_page()
267 addr >= st->marker[1].start_address) { in note_page()
271 if (st->current_prot) { in note_page()
272 note_prot_wx(st, addr); in note_page()
273 pt_dump_seq_printf(st->seq, "0x%08lx-0x%08lx ", in note_page()
274 st->start_address, addr); in note_page()
276 delta = (addr - st->start_address) >> 10; in note_page()
281 pt_dump_seq_printf(st->seq, "%9lu%c", delta, *unit); in note_page()
282 if (st->current_domain) in note_page()
283 pt_dump_seq_printf(st->seq, " %s", in note_page()
284 st->current_domain); in note_page()
285 if (pg_level[st->level].bits) in note_page()
286 dump_prot(st, pg_level[st->level].bits, pg_level[st->level].num); in note_page()
287 pt_dump_seq_printf(st->seq, "\n"); in note_page()
290 if (addr >= st->marker[1].start_address) { in note_page()
291 st->marker++; in note_page()
292 pt_dump_seq_printf(st->seq, "---[ %s ]---\n", in note_page()
293 st->marker->name); in note_page()
295 st->start_address = addr; in note_page()
296 st->current_prot = prot; in note_page()
297 st->current_domain = domain; in note_page()
298 st->level = level; in note_page()
302 static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start, in walk_pte() argument
311 note_page(st, addr, 5, pte_val(*pte), domain); in walk_pte()
334 static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) in walk_pmd() argument
345 note_page(st, addr, 4, pmd_val(*pmd), domain); in walk_pmd()
347 walk_pte(st, pmd, addr, domain); in walk_pmd()
353 note_page(st, addr, 4, pmd_val(*pmd), domain); in walk_pmd()
358 static void walk_pud(struct pg_state *st, p4d_t *p4d, unsigned long start) in walk_pud() argument
367 walk_pmd(st, pud, addr); in walk_pud()
369 note_page(st, addr, 3, pud_val(*pud), NULL); in walk_pud()
374 static void walk_p4d(struct pg_state *st, pgd_t *pgd, unsigned long start) in walk_p4d() argument
383 walk_pud(st, p4d, addr); in walk_p4d()
385 note_page(st, addr, 2, p4d_val(*p4d), NULL); in walk_p4d()
390 static void walk_pgd(struct pg_state *st, struct mm_struct *mm, in walk_pgd() argument
400 walk_p4d(st, pgd, addr); in walk_pgd()
402 note_page(st, addr, 1, pgd_val(*pgd), NULL); in walk_pgd()
409 struct pg_state st = { in ptdump_walk_pgd() local
415 walk_pgd(&st, info->mm, info->base_addr); in ptdump_walk_pgd()
416 note_page(&st, 0, 0, 0, NULL); in ptdump_walk_pgd()
444 struct pg_state st = { in ptdump_check_wx() local
453 walk_pgd(&st, &init_mm, 0); in ptdump_check_wx()
454 note_page(&st, 0, 0, 0, NULL); in ptdump_check_wx()
455 if (st.wx_pages) in ptdump_check_wx()
457 st.wx_pages); in ptdump_check_wx()