Page MenuHomeFreeBSD

D38196.1790156899.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D38196.1790156899.diff

diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S
--- a/sys/arm64/arm64/exception.S
+++ b/sys/arm64/arm64/exception.S
@@ -212,6 +212,7 @@
END(handle_el1h_irq)
ENTRY(handle_el0_sync)
+ mrs x2, far_el1
save_registers 0
ldr x0, [x18, #PC_CURTHREAD]
mov x1, sp
diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -76,7 +76,7 @@
/* Called from exception.S */
void do_el1h_sync(struct thread *, struct trapframe *);
-void do_el0_sync(struct thread *, struct trapframe *);
+void do_el0_sync(struct thread *, struct trapframe *, uint64_t far);
void do_el0_error(struct trapframe *);
void do_serror(struct trapframe *);
void unhandled_exception(struct trapframe *);
@@ -559,11 +559,11 @@
}
void
-do_el0_sync(struct thread *td, struct trapframe *frame)
+do_el0_sync(struct thread *td, struct trapframe *frame, uint64_t far)
{
pcpu_bp_harden bp_harden;
uint32_t exception;
- uint64_t esr, far;
+ uint64_t esr;
int dfsc;
/* Check we have a sane environment when entering from userland */
@@ -575,8 +575,6 @@
exception = ESR_ELx_EXCEPTION(esr);
switch (exception) {
case EXCP_INSN_ABORT_L:
- far = READ_SPECIALREG(far_el1);
-
/*
* Userspace may be trying to train the branch predictor to
* attack the kernel. If we are on a CPU affected by this
@@ -588,12 +586,6 @@
bp_harden();
}
break;
- case EXCP_UNKNOWN:
- case EXCP_DATA_ABORT_L:
- case EXCP_DATA_ABORT:
- case EXCP_WATCHPT_EL0:
- far = READ_SPECIALREG(far_el1);
- break;
}
intr_enable();

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 23, 9:48 AM (2 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29878113
Default Alt Text
D38196.1790156899.diff (1 KB)

Event Timeline