]> granicus.if.org Git - strace/blob - rt_sigreturn.c
tests: workaround systemd-nspawn habit of disabling unimplemented syscalls
[strace] / rt_sigreturn.c
1 /*
2  * Copyright (c) 2017-2018 Dmitry V. Levin <ldv@altlinux.org>
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  */
7
8 #include "defs.h"
9
10 #include DEF_MPERS_TYPE(struct_rt_sigframe)
11
12 #include "rt_sigframe.h"
13
14 #include MPERS_DEFS
15
16 #ifndef OFFSETOF_SIGMASK_IN_RT_SIGFRAME
17 # define OFFSETOF_SIGMASK_IN_RT_SIGFRAME        \
18                 offsetof(struct_rt_sigframe, uc.uc_sigmask)
19 #endif
20
21 SYS_FUNC(rt_sigreturn)
22 {
23         const kernel_ulong_t sf_addr = get_rt_sigframe_addr(tcp);
24
25         if (sf_addr) {
26                 const kernel_ulong_t sm_addr =
27                         sf_addr + OFFSETOF_SIGMASK_IN_RT_SIGFRAME;
28                 tprints("{mask=");
29                 print_sigset_addr(tcp, sm_addr);
30                 tprints("}");
31         }
32
33         return RVAL_DECODED;
34 }