diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-09-06 14:30:25 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-09-06 14:30:25 +0200 |
| commit | d4ca1bb9a12e64e8b0a09f7a4316eda628f4edf1 (patch) | |
| tree | 460813f60890216aabdcbfa1af1cb77e51170653 /kmod | |
| parent | 24d7c448e49e3dc2abbf3bc804247fb30410775a (diff) | |
| download | cachepc-d4ca1bb9a12e64e8b0a09f7a4316eda628f4edf1.tar.gz cachepc-d4ca1bb9a12e64e8b0a09f7a4316eda628f4edf1.zip | |
Improve register saving and restoring for prime & probe around vmrun
Diffstat (limited to 'kmod')
| -rw-r--r--[-rwxr-xr-x] | kmod/asm.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/cache_types.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/cachepc.c | 2 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/cachepc.h | 3 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/cachepc_user.h | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/device_conf.h | 0 | ||||
| -rw-r--r-- | kmod/kvm.c | 5 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/util.c | 0 | ||||
| -rw-r--r--[-rwxr-xr-x] | kmod/util.h | 0 |
9 files changed, 8 insertions, 2 deletions
diff --git a/kmod/asm.h b/kmod/asm.h index 9e9385a..9e9385a 100755..100644 --- a/kmod/asm.h +++ b/kmod/asm.h diff --git a/kmod/cache_types.h b/kmod/cache_types.h index b337d55..b337d55 100755..100644 --- a/kmod/cache_types.h +++ b/kmod/cache_types.h diff --git a/kmod/cachepc.c b/kmod/cachepc.c index 63500a5..9b2b59c 100755..100644 --- a/kmod/cachepc.c +++ b/kmod/cachepc.c @@ -16,8 +16,6 @@ static void build_randomized_list_for_cache_set(cache_ctx *ctx, cacheline **cach static cacheline **allocate_cache_ds(cache_ctx *ctx); static uint16_t get_virt_cache_set(cache_ctx *ctx, void *ptr); -cacheline *cachepc_prime_cl = NULL; - void cachepc_prime_vcall(uintptr_t ret, cacheline *cl) { diff --git a/kmod/cachepc.h b/kmod/cachepc.h index eff4661..6237eba 100755..100644 --- a/kmod/cachepc.h +++ b/kmod/cachepc.h @@ -45,6 +45,9 @@ extern size_t cachepc_msrmts_count; extern cache_ctx *cachepc_ctx; extern cacheline *cachepc_ds; +extern uint64_t cachepc_regs_tmp[16]; +extern uint64_t cachepc_regs_vm[16]; + /* * Prime phase: fill the target cache (encoded in the size of the data structure) * with the prepared data structure, i.e. with attacker data. diff --git a/kmod/cachepc_user.h b/kmod/cachepc_user.h index f815839..f815839 100755..100644 --- a/kmod/cachepc_user.h +++ b/kmod/cachepc_user.h diff --git a/kmod/device_conf.h b/kmod/device_conf.h index e24d681..e24d681 100755..100644 --- a/kmod/device_conf.h +++ b/kmod/device_conf.h @@ -18,6 +18,11 @@ cacheline *cachepc_ds; EXPORT_SYMBOL(cachepc_ctx); EXPORT_SYMBOL(cachepc_ds); +uint64_t cachepc_regs_tmp[16]; +uint64_t cachepc_regs_vm[16]; +EXPORT_SYMBOL(cachepc_regs_tmp); +EXPORT_SYMBOL(cachepc_regs_vm); + int cachepc_kvm_proc_open(struct inode *inode, struct file *file) { diff --git a/kmod/util.c b/kmod/util.c index de87d3b..de87d3b 100755..100644 --- a/kmod/util.c +++ b/kmod/util.c diff --git a/kmod/util.h b/kmod/util.h index a0ff8be..a0ff8be 100755..100644 --- a/kmod/util.h +++ b/kmod/util.h |
