qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Instruction concurrent modification issue of direct jump in AArch64
@ 2022-11-19  8:19 hev
  2022-11-19 21:25 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: hev @ 2022-11-19  8:19 UTC (permalink / raw)
  To: Richard Henderson, Pranith Kumar, Qi Hu; +Cc: qemu-devel

Hello,

I talked with Hu Qi about the risk of instruction concurrent
modification in TCG direct jump for LoongArch, and the conclusion is
that the implementation is correct.

Similarly, the AArch64 implementation doesn't seem to be quite
correct. IIUC, multiple instructions paired with an atomic write does
not guarantee atomic effects on the execution side.

For example, the issue in AArch64 is:

Instruction concurrent modification:

* Before:
  adrp
  addi
  br

* After
  b
  nop
  br

* May actually execution:
  adrp
  nop
  br

That will cause the jump to an unexpected address to execute, What do you think?

Regards,
Ray


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-19 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-19  8:19 Instruction concurrent modification issue of direct jump in AArch64 hev
2022-11-19 21:25 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).