提交 df1bdc06 编写于 作者: N Nick Piggin 提交者: Linus Torvalds

x86: fence oostores on 64-bit

movnt* instructions are not strongly ordered with respect to other stores,
so if we are to assume stores are strongly ordered in the rest of the 64
bit code, we must fence these off (see similar examples in 32 bit code).

[ The AMD memory ordering document seems to say that nontemporal stores can
  also pass earlier regular stores, so maybe we need sfences _before_
  movnt* everywhere too? ]
Signed-off-by: NNick Piggin <npiggin@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2b9e0aae
...@@ -117,6 +117,7 @@ ENTRY(__copy_user_nocache) ...@@ -117,6 +117,7 @@ ENTRY(__copy_user_nocache)
popq %rbx popq %rbx
CFI_ADJUST_CFA_OFFSET -8 CFI_ADJUST_CFA_OFFSET -8
CFI_RESTORE rbx CFI_RESTORE rbx
sfence
ret ret
CFI_RESTORE_STATE CFI_RESTORE_STATE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册