cachepc

Prime+Probe cache-based side-channel attack on AMD SEV-SNP protected virtual machines
git clone https://git.sinitax.com/sinitax/cachepc
Log | Files | Refs | Submodules | README | sfeed.txt

commit af8e9be96ac096e97d3d34af3e5178fe3adf4dca
parent 4b49b8122c8c5c5ddc68df61057df0b94f46d66f
Author: Louis Burda <quent.burda@gmail.com>
Date:   Wed,  1 Feb 2023 11:24:26 -0600

Properly initialize locks

Diffstat:
MREADME | 2+-
Mcachepc/event.c | 1+
Mcachepc/kvm.c | 2++
3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/README b/README @@ -105,7 +105,7 @@ Advanced > North Bridge Configuration > SEV-SNP Support = Enabled Advanced > North Bridge Configuration > Memory Configuration > TSME = Disabled The host kernel is built using the AMDESE/AMDSEV repo on branch sev-snp-devel -at commmit a480a51. Build and install the the host kernel and qemu by running: +at commmit a480a51. Build and install the host kernel and qemu by running: # ./bulid.sh --package # cd snp-release-`date "+%Y-%m-%d"` diff --git a/cachepc/event.c b/cachepc/event.c @@ -36,6 +36,7 @@ cpc_events_init(void) cpc_eventbuf = NULL; cpc_eventbuf_len = 0; cpc_event_batching = false; + rwlock_init(&cpc_event_lock); cpc_events_reset(); } diff --git a/cachepc/kvm.c b/cachepc/kvm.c @@ -647,6 +647,8 @@ cpc_setup_test(void *p) spinlock_t lock; int cpu; + spin_lock_init(&lock); + cpu = get_cpu(); CPC_INFO("Running on core %i\n", cpu);