Skip to content

Instantly share code, notes, and snippets.

View dayeol's full-sized avatar
🏠
Working from home

Dayeol Lee dayeol

🏠
Working from home
View GitHub Profile
@dayeol
dayeol / uarchvsinst.md
Created November 10, 2020 16:33
RISC-V uArch vs. instructions

uArch Components

TLB, PTW, I-Cache, D-Cache, Shared Cache, BP, RAS, Load-Store Queue (LSQ)

Load/Store
lb(u), lh(u), lw
sb(u), sh(u), sw
Arithmetic

Keystone

  • keystone
    • BSD 3-Clause
    • bootrom
    • linux-keystone-driver
      • BSD 3-Clause
  • riscv-pk
@dayeol
dayeol / Fall2020Projects.md
Created September 2, 2020 18:56
Fall 2020 Research Projects

Research Projects

Preventing Iago attacks on Keystone

Iago attack uses an attacker's ability of choosing return value of a procedure call, especially system calls. If the attacker is somehow proxying the procedure, and/or can inject arbitrary return value, she can use this to break confidentiality or integrity of the program. One example is getpid() in Apache. Apache uses the return value of getpid() system call to get non-repeating nonce for its child process. However, if the attacker can choose the return value, it means that she can choose an arbitrary nonce.

The original scenario introduced by the paper was based on a network adversary during remote procedure call (RPC).

#!/bin/bash
set -e
NOW=$(date +"%Y-%m-%d-%H:%M:%S")
PERFDATA="perf.script"
INDIR=$1
NAME=$2
OUTDIR="$(pwd)/results/$2.$NOW"
@dayeol
dayeol / pytorch.manifest.template
Created July 20, 2020 19:27
Graphene manifest file for the Intel SGX PPML Tutorial
# PyTorch manifest template
#
# This manifest was tested on Ubuntu 16.04 and 18.04.
#
# Run the application with:
#
# ./pal_loader pytorch.manifest pytorchexample.py
# The executable to load in Graphene
loader.exec = file:/usr/bin/python3