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
  • kernel
  • static_call_inline.c
Find file BlameHistoryPermalink
  • Christophe Leroy's avatar
    static_call: Don't make __static_call_return0 static · 8fd4ddda
    Christophe Leroy authored Mar 14, 2022
    System.map shows that vmlinux contains several instances of
    __static_call_return0():
    
    	c0004fc0 t __static_call_return0
    	c0011518 t __static_call_return0
    	c00d8160 t __static_call_return0
    
    arch_static_call_transform() uses the middle one to check whether we are
    setting a call to __static_call_return0 or not:
    
    	c0011520 <arch_static_call_transform>:
    	c0011520:       3d 20 c0 01     lis     r9,-16383	<== r9 =  0xc001 << 16
    	c0011524:       39 29 15 18     addi    r9,r9,5400	<== r9 += 0x1518
    	c0011528:       7c 05 48 00     cmpw    r5,r9		<== r9 has value 0xc0011518 here
    
    So if static_call_update() is called with one of the other instances of
    __static_call_return0(), arch_static_call_transform() won't recognise it.
    
    In order to work properly, global single instance of __static_call_return0() is required.
    
    Fixes: 3f2a8fc4
    
     ("static_call/x86: Add __static_call_return0()")
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
    Link: https://lkml.kernel.org/r/30821468a0e7d28251954b578e5051dc09300d04.1647258493.git.christophe.leroy@csgroup.eu
    8fd4ddda
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7