When trying to execute from a misaligned address raise a SIGBUS with the

invalid address alignment code.

Obtained from:	EuroBSDCon
Sponsored by:	ABT Systems Ltd
This commit is contained in:
Andrew Turner 2015-10-04 21:16:45 +00:00
parent ab415c8307
commit 8bdcc09641
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288671

View File

@ -377,6 +377,11 @@ do_el0_sync(struct trapframe *frame)
case EXCP_UNKNOWN:
el0_excp_unknown(frame);
break;
case EXCP_PC_ALIGN:
td = curthread;
call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr);
userret(td, frame);
break;
case EXCP_BRK:
td = curthread;
call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_elr);