Skip to content

Commit

Permalink
lass: add test cases for LASS of BM
Browse files Browse the repository at this point in the history
add lass test cases for Bare-metal

[Test Components] lass
[Test Types] func

Signed-off-by: Xuelian Guo <[email protected]>
  • Loading branch information
gxl8483336 committed Sep 16, 2024
1 parent 54ecaf1 commit 7a4ccc9
Show file tree
Hide file tree
Showing 5 changed files with 878 additions and 0 deletions.
11 changes: 11 additions & 0 deletions BM/lass/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) 2024 Intel Corporation.

CC = gcc
TARGET = lass

$(TARGET): lass.c
$(CC) -o $@ $<

clean:
rm -f $(TARGET)
27 changes: 27 additions & 0 deletions BM/lass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#LASS

## Description
Linear Address Space Separation (LASS) aims to prevent side-channel attacks based that rely on timing memory accesses (cache hits will have shorter access times).

LASS achieves this by preventing memory loads/stores to user space memory in supervisor mode and vice versa (access to kernel memory in user mode).

## Usage
```
make
# To run a specific case
./lam -t <testcase_id>
(for example, cpuid) ./lass m
```
Test results (PASS or FAIL) will be printed out.

## Testcase ID
| Case ID | Case Name |
| ------ | ------------------------------------------------------------------- |
| m | Test get vsyscall address maps.[negative] |
| d | Test execute vsyscall addr 0xffffffffff600000.[negative] |
| g | Test call vsyscall |
| t | Test call vsyscall api gettimeofday |
| r | Test read vsyscall 0xffffffffff600000.[negative] |
| i | Test read random kernel space.[negative] |
| v | Test process_vm_readv read address 0xffffffffff600000.[negative] |
| e | Test vsyscall emulation. |
Loading

0 comments on commit 7a4ccc9

Please sign in to comment.