0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "test_signals_utils.h"
0011 #include "testcases.h"
0012
0013 static int mangle_invalid_pstate_run(struct tdescr *td, siginfo_t *si,
0014 ucontext_t *uc)
0015 {
0016 ASSERT_GOOD_CONTEXT(uc);
0017
0018
0019 uc->uc_mcontext.pstate ^= PSR_MODE32_BIT;
0020
0021 return 1;
0022 }
0023
0024 struct tdescr tde = {
0025 .sanity_disabled = true,
0026 .name = "MANGLE_PSTATE_INVALID_STATE_TOGGLE",
0027 .descr = "Mangling uc_mcontext with INVALID STATE_TOGGLE",
0028 .sig_trig = SIGUSR1,
0029 .sig_ok = SIGSEGV,
0030 .run = mangle_invalid_pstate_run,
0031 };