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
  • extable.c
Find file BlameHistoryPermalink
  • Christophe Leroy's avatar
    lkdtm: Really write into kernel text in WRITE_KERN · b6491339
    Christophe Leroy authored Feb 15, 2022
    
    
    WRITE_KERN is supposed to overwrite some kernel text, namely
    do_overwritten() function.
    
    But at the time being it overwrites do_overwritten() function
    descriptor, not function text.
    
    Fix it by dereferencing the function descriptor to obtain
    function text pointer. Export dereference_function_descriptor()
    for when LKDTM is built as a module.
    
    And make do_overwritten() noinline so that it is really
    do_overwritten() which is called by lkdtm_WRITE_KERN().
    
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
    Acked-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/31e58eaffb5bc51c07d8d4891d1982100ade8cfc.1644928018.git.christophe.leroy@csgroup.eu
    b6491339
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7