mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 21:38:16 +00:00
mips: fix fail when run zdtm test pthread01.c
k_rtsigset_t is 16Bytes in mips architecture but not 8Bytes. so blk_sigset_extended be added in TaskCoreEntry and ThreadCoreEntry for dumping extern 8Bytes data in parasite-syscall.c, restore extern 8Bytes data in cr-restore.c Signed-off-by: Guoyun Sun <sunguoyun@loongson.cn>
This commit is contained in:
parent
be13941221
commit
277b0b69fa
@ -3551,8 +3551,12 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
|
|||||||
for (i = 0; i < current->nr_threads; i++) {
|
for (i = 0; i < current->nr_threads; i++) {
|
||||||
CoreEntry *tcore;
|
CoreEntry *tcore;
|
||||||
struct rt_sigframe *sigframe;
|
struct rt_sigframe *sigframe;
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
k_rtsigset_t mips_blkset;
|
||||||
|
#else
|
||||||
k_rtsigset_t *blkset = NULL;
|
k_rtsigset_t *blkset = NULL;
|
||||||
|
|
||||||
|
#endif
|
||||||
thread_args[i].pid = current->threads[i].ns[0].virt;
|
thread_args[i].pid = current->threads[i].ns[0].virt;
|
||||||
thread_args[i].siginfo_n = siginfo_priv_nr[i];
|
thread_args[i].siginfo_n = siginfo_priv_nr[i];
|
||||||
thread_args[i].siginfo = task_args->siginfo;
|
thread_args[i].siginfo = task_args->siginfo;
|
||||||
@ -3563,11 +3567,22 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
|
|||||||
if (thread_args[i].pid == pid) {
|
if (thread_args[i].pid == pid) {
|
||||||
task_args->t = thread_args + i;
|
task_args->t = thread_args + i;
|
||||||
tcore = core;
|
tcore = core;
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
mips_blkset.sig[0] = tcore->tc->blk_sigset;
|
||||||
|
mips_blkset.sig[1] = tcore->tc->blk_sigset_extended;
|
||||||
|
#else
|
||||||
blkset = (void *)&tcore->tc->blk_sigset;
|
blkset = (void *)&tcore->tc->blk_sigset;
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
tcore = current->core[i];
|
tcore = current->core[i];
|
||||||
if (tcore->thread_core->has_blk_sigset)
|
if (tcore->thread_core->has_blk_sigset) {
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
mips_blkset.sig[0] = tcore->thread_core->blk_sigset;
|
||||||
|
mips_blkset.sig[1] = tcore->thread_core->blk_sigset_extended;
|
||||||
|
#else
|
||||||
blkset = (void *)&tcore->thread_core->blk_sigset;
|
blkset = (void *)&tcore->thread_core->blk_sigset;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tcore->tc || tcore->ids) && thread_args[i].pid != pid) {
|
if ((tcore->tc || tcore->ids) && thread_args[i].pid != pid) {
|
||||||
@ -3607,7 +3622,11 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
|
|||||||
thread_args[i].mz = mz + i;
|
thread_args[i].mz = mz + i;
|
||||||
sigframe = (struct rt_sigframe *)&mz[i].rt_sigframe;
|
sigframe = (struct rt_sigframe *)&mz[i].rt_sigframe;
|
||||||
|
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
if (construct_sigframe(sigframe, sigframe, &mips_blkset, tcore))
|
||||||
|
#else
|
||||||
if (construct_sigframe(sigframe, sigframe, blkset, tcore))
|
if (construct_sigframe(sigframe, sigframe, blkset, tcore))
|
||||||
|
#endif
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (tcore->thread_core->comm)
|
if (tcore->thread_core->comm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user