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
  • task_work.c
Find file BlameHistoryPermalink
  • Sebastian Andrzej Siewior's avatar
    task_work: Add TWA_NMI_CURRENT as an additional notify mode. · 466e4d80
    Sebastian Andrzej Siewior authored Jul 04, 2024
    
    
    Adding task_work from NMI context requires the following:
    - The kasan_record_aux_stack() is not NMU safe and must be avoided.
    - Using TWA_RESUME is NMI safe. If the NMI occurs while the CPU is in
      userland then it will continue in userland and not invoke the `work'
      callback.
    
    Add TWA_NMI_CURRENT as an additional notify mode. In this mode skip
    kasan and use irq_work in hardirq-mode to for needed interrupt. Set
    TIF_NOTIFY_RESUME within the irq_work callback due to k[ac]san
    instrumentation in test_and_set_bit() which does not look NMI safe in
    case of a report.
    
    Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20240704170424.1466941-3-bigeasy@linutronix.de
    466e4d80
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7