Commit ec7dca6
committed
arm64: debug: split hardware watchpoint exception entry
JIRA: https://issues.redhat.com/browse/RHEL-65658
commit 413f0bb
Author: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Date: Mon Jul 7 12:41:06 2025 +0100
arm64: debug: split hardware watchpoint exception entry
Currently all debug exceptions share common entry code and are routed
to `do_debug_exception()`, which calls dynamically-registered
handlers for each specific debug exception. This is unfortunate as
different debug exceptions have different entry handling requirements,
and it would be better to handle these distinct requirements earlier.
Hardware watchpoints are the only debug exceptions that will write
FAR_EL1, so we need to preserve it and pass it down.
However, they cannot be used to maliciously train branch predictors, so
we can omit calling `arm64_bp_hardening()`, nor do they need to handle
the Cortex-A76 erratum #1463225, as it only applies to single stepping
exceptions.
As the hardware watchpoint handler only returns 0 and never triggers
the call to `arm64_notify_die()`, we can call it directly from
`entry-common.c`.
Split the hardware watchpoint exception entry and adjust the behaviour
to match the lack of needed mitigations.
Signed-off-by: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Tested-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Reviewed-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250707114109.35672-11-ada.coupriediaz@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>1 parent b06bed7 commit ec7dca6
File tree
3 files changed
+40
-12
lines changed- arch/arm64
- include/asm
- kernel
3 files changed
+40
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
515 | 527 | | |
516 | 528 | | |
517 | 529 | | |
| |||
561 | 573 | | |
562 | 574 | | |
563 | 575 | | |
| 576 | + | |
| 577 | + | |
564 | 578 | | |
565 | 579 | | |
566 | 580 | | |
| |||
777 | 791 | | |
778 | 792 | | |
779 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
780 | 807 | | |
781 | 808 | | |
782 | 809 | | |
| |||
858 | 885 | | |
859 | 886 | | |
860 | 887 | | |
| 888 | + | |
| 889 | + | |
861 | 890 | | |
862 | 891 | | |
863 | 892 | | |
| |||
982 | 1011 | | |
983 | 1012 | | |
984 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
985 | 1016 | | |
986 | 1017 | | |
987 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
754 | | - | |
| 753 | + | |
755 | 754 | | |
756 | 755 | | |
757 | 756 | | |
| |||
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
809 | | - | |
| 808 | + | |
810 | 809 | | |
811 | 810 | | |
812 | 811 | | |
| |||
819 | 818 | | |
820 | 819 | | |
821 | 820 | | |
822 | | - | |
| 821 | + | |
823 | 822 | | |
824 | 823 | | |
825 | 824 | | |
| |||
830 | 829 | | |
831 | 830 | | |
832 | 831 | | |
833 | | - | |
| 832 | + | |
834 | 833 | | |
835 | 834 | | |
836 | 835 | | |
| |||
839 | 838 | | |
840 | 839 | | |
841 | 840 | | |
842 | | - | |
843 | | - | |
844 | 841 | | |
845 | | - | |
| 842 | + | |
846 | 843 | | |
847 | 844 | | |
848 | 845 | | |
| |||
984 | 981 | | |
985 | 982 | | |
986 | 983 | | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | 984 | | |
992 | 985 | | |
993 | 986 | | |
| |||
0 commit comments