]> git.baikalelectronics.ru Git - kernel.git/commit
s390/traps: add struct to access transactional diagnostic block
authorSven Schnelle <svens@linux.ibm.com>
Wed, 5 May 2021 20:01:16 +0000 (22:01 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 7 Jun 2021 15:06:58 +0000 (17:06 +0200)
commit8a003695bfccf626142c0faa34729d273a0cc94e
tree1fccb79e91182ed6693bc5308e3f6e7f86a70610
parentb2655d3011d14738060edd5148c3ba6e77484733
s390/traps: add struct to access transactional diagnostic block

gcc-11 warns:

arch/s390/kernel/traps.c: In function __do_pgm_check:
arch/s390/kernel/traps.c:319:17: warning: memcpy reading 256 bytes from a region of size 0 [-Wstringop-overread]
  319 |                 memcpy(&current->thread.trap_tdb, &S390_lowcore.pgm_tdb, 256);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by adding a struct pgm_tdb to struct lowcore and copy that.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/lowcore.h
arch/s390/include/asm/processor.h
arch/s390/kernel/ptrace.c
arch/s390/kernel/traps.c