Exception-Driven Security: A Risk-Aware Permission Adjustment for High-Availability Embedded Systems