Hi Michael,

On 09/03/2019 08:46 AM, Michael Ellerman wrote:
Michael Neuling <mi...@neuling.org> writes:
From: Gustavo Romero <grom...@linux.ibm.com>

Add TM selftest to check if FP or VEC register values from one process
can leak into another process when both run on the same CPU.

This tests for CVE-2019-15030 and CVE-2019-15031.

Signed-off-by: Gustavo Romero <grom...@linux.ibm.com>
Signed-off-by: Michael Neuling <mi...@neuling.org>
---
  tools/testing/selftests/powerpc/tm/.gitignore |   1 +
  tools/testing/selftests/powerpc/tm/Makefile   |   2 +-
  .../testing/selftests/powerpc/tm/tm-poison.c  | 180 ++++++++++++++++++
  3 files changed, 182 insertions(+), 1 deletion(-)
  create mode 100644 tools/testing/selftests/powerpc/tm/tm-poison.c

This doesn't build on 64-bit big endian:

tm-poison.c: In function 'tm_poison_test':
tm-poison.c:118:10: error: format '%lx' expects argument of type 'long unsigned 
int', but argument 2 has type 'uint64_t {aka long long unsigned int}' 
[-Werror=format=]
    printf("Unknown value %#lx leaked into f31!\n", unknown);
           ^
tm-poison.c:166:10: error: format '%lx' expects argument of type 'long unsigned 
int', but argument 2 has type 'uint64_t {aka long long unsigned int}' 
[-Werror=format=]
    printf("Unknown value %#lx leaked into vr31!\n", unknown);
           ^

Sorry. I sent a v2 addressing it. Now I tested the fix against Travis CI.

Thank you.

Cheers,
Gustavo

Reply via email to