]> git.baikalelectronics.ru Git - kernel.git/commit
csky: kprobe: Fixup code in simulate without 'long'
authorGuo Ren <guoren@linux.alibaba.com>
Thu, 14 Jan 2021 07:54:37 +0000 (07:54 +0000)
committerGuo Ren <guoren@linux.alibaba.com>
Sat, 27 Feb 2021 08:34:50 +0000 (16:34 +0800)
commitcecdaddacd5d01235de8ccb6f196edb56c966677
tree36ffa14dadd0aac44c9c69a44c81752e0c3334cb
parenta360d2c09957667e4da19e975939e18a7b023274
csky: kprobe: Fixup code in simulate without 'long'

The type of 'val' is 'unsigned long' in simulate_blz32, so 'val < 0'
can't be true.

Cast 'val' to 'long' here to determine branch token or not,

Fixup instructions: bnezad32, bhsz32, bhz32, blsz32, blz32

Link: https://lore.kernel.org/linux-csky/CAJF2gTQjKXR9gpo06WAWG1aquiT87mATiMGorXs6ChxOxoe90Q@mail.gmail.com/T/#t
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Co-developed-by: Menglong Dong <dong.menglong@zte.com.cn>
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
arch/csky/kernel/probes/simulate-insn.c