Skip to content
Snippets Groups Projects

[sh4]: Check for kprobe trap number before trying to handle a kprobe trap

Merged John Paul Adrian Glaubitz requested to merge glaubitz/linux:sh4-sid into sid
1 unresolved thread

The DIE_TRAP notifier chain is run both for kprobe traps and for BUG/WARN traps. The kprobe code assumes to be only called for BREAKPOINT_INSTRUCTION, and concludes to have hit a concurrently removed kprobe if it finds anything else at the faulting locations. This includes TRAPA_BUG_OPCODE used for BUG and WARN.

The consequence is that kprobe_handler returns 1. This makes kprobe_exceptions_notify return NOTIFY_STOP, and prevents handling the BUG statement. This also prevents moving $pc away from the trap instruction, so the system locks up in an endless loop.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 From 6d7cc74d8aad33589c6cc6f38e33c4284abc07b8 Mon Sep 17 00:00:00 2001
2 From: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
3 Date: Wed, 12 Jun 2019 15:08:37 +0200
4 Subject: [PATCH 1/1] arch/sh: Check for kprobe trap number before trying to
5 handle a kprobe trap
6
  • added 5 commits

    • 453e25ad...e2cc6dfe - 4 commits from branch kernel-team:sid
    • c342a968 - [sh4]: Check for kprobe trap number before trying to handle a kprobe trap

    Compare with previous version

  • merged

  • Ben Hutchings mentioned in commit 2a02d306

    mentioned in commit 2a02d306

  • Please register or sign in to reply
    Loading