Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165059426
D55619.id173021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55619.id173021.diff
View Options
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
@@ -262,6 +262,7 @@
{
struct vm_map *map;
struct pcb *pcb;
+ vm_offset_t fault_va;
vm_prot_t ftype;
int error, sig, ucode;
#ifdef KDB
@@ -282,8 +283,11 @@
}
#endif
+ fault_va = far;
if (lower) {
map = &td->td_proc->p_vmspace->vm_map;
+ if ((td->td_proc->p_md.md_tcr & TCR_TBI0) != 0)
+ fault_va = ADDR_MAKE_CANONICAL(far);
} else if (!ADDR_IS_CANONICAL(far)) {
/* We received a TBI/PAC/etc. fault from the kernel */
error = KERN_INVALID_ADDRESS;
@@ -338,7 +342,7 @@
* or pmap_fault() will recurse on that lock.
*/
if ((lower || map == kernel_map || pcb->pcb_onfault != 0) &&
- pmap_fault(map->pmap, esr, far) == KERN_SUCCESS)
+ pmap_fault(map->pmap, esr, fault_va) == KERN_SUCCESS)
return;
#ifdef INVARIANTS
@@ -379,7 +383,8 @@
}
/* Fault in the page. */
- error = vm_fault_trap(map, far, ftype, VM_FAULT_NORMAL, &sig, &ucode);
+ error = vm_fault_trap(map, fault_va, ftype, VM_FAULT_NORMAL, &sig,
+ &ucode);
if (error != KERN_SUCCESS) {
if (lower) {
call_trapsignal(td, sig, ucode, (void *)far,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 6, 3:59 PM (9 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36124610
Default Alt Text
D55619.id173021.diff (1 KB)
Attached To
Mode
D55619: arm64: Use a canonical address when TBI is enabled
Attached
Detach File
Event Timeline
Log In to Comment