arm: Fix handling of undefined instructions in kernel mode

Only panic if no undefined instruction handler matched the exception.
This can arise in practice if the VFP is enabled lazily.

While here, fix the panic string to not include a newline.

Reviewed by:	andrew
Obtained from:	Stormshield
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D42970

(cherry picked from commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69)
This commit is contained in:
Mark Johnston 2023-12-11 09:08:08 -05:00
parent 1126dcdf40
commit bc394ad824

View file

@ -343,11 +343,11 @@ undefinedinstruction(struct trapframe *frame)
#else
printf("No debugger in kernel.\n");
#endif
return;
}
else
panic("Undefined instruction in kernel (0x%08x).\n",
} else if (uh == NULL) {
panic("Undefined instruction in kernel (0x%08x)",
fault_instruction);
}
return;
}
userret(td, frame);