Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • arch
  • x86
  • kernel
  • static_call.c
Find file BlameHistoryPermalink
  • Peter Zijlstra's avatar
    x86,static_call: Fix __static_call_return0 for i386 · 1cd5f059
    Peter Zijlstra authored Mar 18, 2022
    Paolo reported that the instruction sequence that is used to replace:
    
        call __static_call_return0
    
    namely:
    
        66 66 48 31 c0	data16 data16 xor %rax,%rax
    
    decodes to something else on i386, namely:
    
        66 66 48		data16 dec %ax
        31 c0		xor    %eax,%eax
    
    Which is a nonsensical sequence that happens to have the same outcome.
    *However* an important distinction is that it consists of 2
    instructions which is a problem when the thing needs to be overwriten
    with a regular call instruction again.
    
    As such, replace the instruction with something that decodes the same
    on both i386 and x86_64.
    
    Fixes: 3f2a8fc4
    
     ("static_call/x86: Add __static_call_return0()")
    Reported-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20220318204419.GT8939@worktop.programming.kicks-ass.net
    1cd5f059
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7