riscv: Implement thread_struct whitelist for hardened usercopy