|
@@ -194,6 +194,16 @@ static int setup_sigframe(struct rt_sigframe __user *sf,
|
|
|
aux += sizeof(*fpsimd_ctx);
|
|
|
}
|
|
|
|
|
|
+ /* fault information, if valid */
|
|
|
+ if (current->thread.fault_code) {
|
|
|
+ struct esr_context *esr_ctx =
|
|
|
+ container_of(aux, struct esr_context, head);
|
|
|
+ __put_user_error(ESR_MAGIC, &esr_ctx->head.magic, err);
|
|
|
+ __put_user_error(sizeof(*esr_ctx), &esr_ctx->head.size, err);
|
|
|
+ __put_user_error(current->thread.fault_code, &esr_ctx->esr, err);
|
|
|
+ aux += sizeof(*esr_ctx);
|
|
|
+ }
|
|
|
+
|
|
|
/* set the "end" magic */
|
|
|
end = aux;
|
|
|
__put_user_error(0, &end->magic, err);
|