Yay ! Let's map everything uncached from now on! For great justice!

[I was tempted to write some stuff about how keyboard keycode translation
works in wscons, but it's not worth my time]

Miod

You don't have to map keyboard map uncached, just change the way code is written --- instead of
x = a[i]
you write something like
x = 0;
for (j = 0; j < sizeof a/sizeof *a; j++) x |= a[j] & (-(i ^ j) >> 31) - 1;

Keyboard reading code is in sys/dev/wscons/wskbdutil.c, function wskbd_get_mapentry. It scans the keymap linearly until it finds the key pressed. So, by amount of L2 cache lines eaten, an attacker could tell which class of keys was pressed.

Mikulas

Reply via email to