Commit 1f7018a1 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Update fsindex and fs base in sake of TLS

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 8a8850d1
......@@ -330,6 +330,19 @@ self_len_end:
CPREG1(gs);
CPREG1(fs);
/*
* To update fsindex reload TLS segment
* (otherwise TLS area might not be updated
* once program restored).
*/
ret = sys_arch_prctl(ARCH_SET_FS,
&core_entry.u.arch.tls_array[0].base_addr);
if (ret) {
write_hex_n(__LINE__);
write_hex_n(ret);
goto core_restore_end;
}
/*
* sigframe is on stack.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment