lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/alternatives: Fix optimize_nops() checking
On Wed, Jan 10, 2018 at 12:20:40PM -0800, Linus Torvalds wrote:
> No, that's not valid. That could never work anyway. The ".long 2f"
> would be the absolute address in the alternative section, but opcode
> E9 takes a relative 32-bit offset.

Ah, right, doh. I remember now. We used to do those jmps by computing the
relative offset:

From: 090a3f615524c3f75d09fdb37f15ea1868d79f7e
- .section .altinstr_replacement,"ax"
-1: .byte 0xeb /* jmp <disp8> */
- .byte (copy_page_rep - copy_page) - (2f - 1b) /* offset */

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2018-01-14 23:22    [W:0.272 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site