]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/inst: Avoid pointer dereferencing in ppc_inst_equal()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 20 May 2021 13:50:41 +0000 (13:50 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Jun 2021 13:35:57 +0000 (23:35 +1000)
commit2d4cadfd74a6aa896bc9eb19a862f1590f5a91d4
tree226eb46aff1b3c15de1c718e7b89864e55126ae9
parent8d72dc915b2982e31ea392c116f209527b81d22b
powerpc/inst: Avoid pointer dereferencing in ppc_inst_equal()

Avoid casting/dereferencing ppc_inst() as u64* , check each member
of the struct when relevant.

And remove the 0xff initialisation of the suffix for non
prefixed instruction. An instruction with 0xff as a suffix
might be invalid, but still is a prefixed instruction and
has to be considered as this.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/d8b155e930b7a9708ca110e8ff0ace6713a7af75.1621516826.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/inst.h