On 09/17/2012 06:02 PM, David Laight wrote:
  /* N.B. the only way to get here is from the beq following ret_from_except. */
  resume_kernel:
-       /* check current_thread_info->preempt_count */
+       /* check current_thread_info, _TIF_EMULATE_STACK_STORE */
        CURRENT_THREAD_INFO(r9, r1)
+       lwz     r8,TI_FLAGS(r9)
+       andis.  r8,r8,_TIF_EMULATE_STACK_STORE@h
+       beq+    1f
...
+1:

Does this add a statically mispredicted branch to every
return to userspace ?

Return usersapce? No, this is just follow 'resume_kernel'.

Note I add this 'unlikely' here since I assume often Kprobe is always disabled by default and especially its also rare to kprobe 'stwu' in many kprobe cases.

Tiejun
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to