x86/alternatives: Make JMPs more robust
[pandora-kernel.git] / arch / x86 / lib / copy_user_64.S
index a9aedd6..dad718c 100644 (file)
  */
        .macro ALTERNATIVE_JUMP feature1,feature2,orig,alt1,alt2
 0:
-       .byte 0xe9      /* 32bit jump */
-       .long \orig-1f  /* by default jump to orig */
+       jmp \orig
 1:
        .section .altinstr_replacement,"ax"
-2:     .byte 0xe9                      /* near jump with 32bit immediate */
-       .long \alt1-1b /* offset */   /* or alternatively to alt1 */
-3:     .byte 0xe9                      /* near jump with 32bit immediate */
-       .long \alt2-1b /* offset */   /* or alternatively to alt2 */
+2:
+       jmp \alt1
+3:
+       jmp \alt2
        .previous
 
        .section .altinstructions,"a"