common/grant_table: harden helpers
authorNorbert Manthey <nmanthey@amazon.de>
Fri, 24 May 2019 08:28:26 +0000 (10:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 May 2019 08:28:26 +0000 (10:28 +0200)
commit7e69db644a8138ea28953df88060b6826ec425de
treeeccc85d0327c1f8a091e51fc4dd48ed4e1611708
parent2f44d1b3a2c73c89450ccba9e4205a1583348265
common/grant_table: harden helpers

Guests can issue grant table operations and provide guest controlled
data to them. This data is used for memory loads in helper functions
and macros. To avoid speculative out-of-bound accesses, we use the
array_index_nospec macro where applicable, or the block_speculation
macro.

This is part of the speculative hardening effort.

Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/grant_table.c