/tools/testing/selftests/x86/ |
D | vdso_restorer.c | 48 struct real_sigaction sa; in main() local 60 memset(&sa, 0, sizeof(sa)); in main() 61 sa.handler = handler_with_siginfo; in main() 62 sa.flags = SA_SIGINFO; in main() 63 sa.restorer = NULL; /* request kernel-provided restorer */ in main() 67 if (syscall(SYS_rt_sigaction, SIGUSR1, &sa, NULL, 8) != 0) in main() 81 sa.flags = 0; in main() 82 sa.handler = handler_without_siginfo; in main() 83 if (syscall(SYS_sigaction, SIGUSR1, &sa, 0) != 0) in main()
|
D | sigaltstack.c | 33 struct sigaction sa; in sethandler() local 35 memset(&sa, 0, sizeof(sa)); in sethandler() 36 sa.sa_sigaction = handler; in sethandler() 37 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 38 sigemptyset(&sa.sa_mask); in sethandler() 39 if (sigaction(sig, &sa, 0)) in sethandler() 45 struct sigaction sa; in clearhandler() local 47 memset(&sa, 0, sizeof(sa)); in clearhandler() 48 sa.sa_handler = SIG_DFL; in clearhandler() 49 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
D | ioperm.c | 28 struct sigaction sa; in sethandler() local 29 memset(&sa, 0, sizeof(sa)); in sethandler() 30 sa.sa_sigaction = handler; in sethandler() 31 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 32 sigemptyset(&sa.sa_mask); in sethandler() 33 if (sigaction(sig, &sa, 0)) in sethandler() 40 struct sigaction sa; in clearhandler() local 41 memset(&sa, 0, sizeof(sa)); in clearhandler() 42 sa.sa_handler = SIG_DFL; in clearhandler() 43 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
D | sysret_rip.c | 45 struct sigaction sa; in sethandler() local 46 memset(&sa, 0, sizeof(sa)); in sethandler() 47 sa.sa_sigaction = handler; in sethandler() 48 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 49 sigemptyset(&sa.sa_mask); in sethandler() 50 if (sigaction(sig, &sa, 0)) in sethandler() 56 struct sigaction sa; in clearhandler() local 57 memset(&sa, 0, sizeof(sa)); in clearhandler() 58 sa.sa_handler = SIG_DFL; in clearhandler() 59 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
D | iopl.c | 28 struct sigaction sa; in sethandler() local 29 memset(&sa, 0, sizeof(sa)); in sethandler() 30 sa.sa_sigaction = handler; in sethandler() 31 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 32 sigemptyset(&sa.sa_mask); in sethandler() 33 if (sigaction(sig, &sa, 0)) in sethandler() 40 struct sigaction sa; in clearhandler() local 41 memset(&sa, 0, sizeof(sa)); in clearhandler() 42 sa.sa_handler = SIG_DFL; in clearhandler() 43 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
D | single_step_syscall.c | 39 struct sigaction sa; in sethandler() local 40 memset(&sa, 0, sizeof(sa)); in sethandler() 41 sa.sa_sigaction = handler; in sethandler() 42 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 43 sigemptyset(&sa.sa_mask); in sethandler() 44 if (sigaction(sig, &sa, 0)) in sethandler() 50 struct sigaction sa; in clearhandler() local 51 memset(&sa, 0, sizeof(sa)); in clearhandler() 52 sa.sa_handler = SIG_DFL; in clearhandler() 53 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
D | syscall_nt.c | 24 struct sigaction sa; in sethandler() local 25 memset(&sa, 0, sizeof(sa)); in sethandler() 26 sa.sa_sigaction = handler; in sethandler() 27 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 28 sigemptyset(&sa.sa_mask); in sethandler() 29 if (sigaction(sig, &sa, 0)) in sethandler()
|
D | corrupt_xstate_header.c | 47 struct sigaction sa; in sethandler() local 49 memset(&sa, 0, sizeof(sa)); in sethandler() 50 sa.sa_sigaction = handler; in sethandler() 51 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 52 sigemptyset(&sa.sa_mask); in sethandler() 53 if (sigaction(sig, &sa, 0)) in sethandler()
|
D | ptrace_syscall.c | 99 struct sigaction sa; in sethandler() local 100 memset(&sa, 0, sizeof(sa)); in sethandler() 101 sa.sa_sigaction = handler; in sethandler() 102 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 103 sigemptyset(&sa.sa_mask); in sethandler() 104 if (sigaction(sig, &sa, 0)) in sethandler() 110 struct sigaction sa; in setsigign() local 111 memset(&sa, 0, sizeof(sa)); in setsigign() 112 sa.sa_sigaction = (void *)SIG_IGN; in setsigign() 113 sa.sa_flags = flags; in setsigign() [all …]
|
D | syscall_arg_fault.c | 23 struct sigaction sa; in sethandler() local 24 memset(&sa, 0, sizeof(sa)); in sethandler() 25 sa.sa_sigaction = handler; in sethandler() 26 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 27 sigemptyset(&sa.sa_mask); in sethandler() 28 if (sigaction(sig, &sa, 0)) in sethandler()
|
D | unwind_vdso.c | 49 struct sigaction sa; in sethandler() local 50 memset(&sa, 0, sizeof(sa)); in sethandler() 51 sa.sa_sigaction = handler; in sethandler() 52 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 53 sigemptyset(&sa.sa_mask); in sethandler() 54 if (sigaction(sig, &sa, 0)) in sethandler()
|
D | entry_from_vm86.c | 33 struct sigaction sa; in sethandler() local 34 memset(&sa, 0, sizeof(sa)); in sethandler() 35 sa.sa_sigaction = handler; in sethandler() 36 sa.sa_flags = SA_SIGINFO | flags; in sethandler() 37 sigemptyset(&sa.sa_mask); in sethandler() 38 if (sigaction(sig, &sa, 0)) in sethandler() 44 struct sigaction sa; in clearhandler() local 45 memset(&sa, 0, sizeof(sa)); in clearhandler() 46 sa.sa_handler = SIG_DFL; in clearhandler() 47 sigemptyset(&sa.sa_mask); in clearhandler() [all …]
|
/tools/perf/trace/beauty/ |
D | sockaddr.c | 13 static size_t af_inet__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet__scnprintf() argument 15 struct sockaddr_in *sin = (struct sockaddr_in *)sa; in af_inet__scnprintf() 21 static size_t af_inet6__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_inet6__scnprintf() argument 23 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa; in af_inet6__scnprintf() 36 static size_t af_local__scnprintf(struct sockaddr *sa, char *bf, size_t size) in af_local__scnprintf() argument 38 struct sockaddr_un *sun = (struct sockaddr_un *)sa; in af_local__scnprintf() 42 static size_t (*af_scnprintfs[])(struct sockaddr *sa, char *bf, size_t size) = { 50 struct sockaddr *sa = (struct sockaddr *)arg->augmented.args; in syscall_arg__scnprintf_augmented_sockaddr() local 54 …(&strarray__socket_families, family, sizeof(family), "%d", arg->show_string_prefix, sa->sa_family); in syscall_arg__scnprintf_augmented_sockaddr() 57 if (sa->sa_family < ARRAY_SIZE(af_scnprintfs) && af_scnprintfs[sa->sa_family]) in syscall_arg__scnprintf_augmented_sockaddr() [all …]
|
D | pkey_alloc.c | 12 size_t strarray__scnprintf_flags(struct strarray *sa, char *bf, size_t size, bool show_prefix, unsi… in strarray__scnprintf_flags() argument 17 const char *s = sa->entries[0]; in strarray__scnprintf_flags() 19 return scnprintf(bf, size, "%s%s", show_prefix ? sa->prefix : "", s); in strarray__scnprintf_flags() 23 for (i = 1; i < sa->nr_entries; ++i) { in strarray__scnprintf_flags() 32 if (sa->entries[i] != NULL) in strarray__scnprintf_flags() 33 …printed += scnprintf(bf + printed, size - printed, "%s%s", show_prefix ? sa->prefix : "", sa->entr… in strarray__scnprintf_flags()
|
/tools/testing/selftests/bpf/progs/ |
D | connect6_prog.c | 33 struct sockaddr_in6 sa; in connect_v6_prog() local 79 memset(&sa, 0, sizeof(sa)); in connect_v6_prog() 81 sa.sin6_family = AF_INET6; in connect_v6_prog() 82 sa.sin6_port = bpf_htons(0); in connect_v6_prog() 84 sa.sin6_addr.s6_addr32[0] = bpf_htonl(SRC_REWRITE_IP6_0); in connect_v6_prog() 85 sa.sin6_addr.s6_addr32[1] = bpf_htonl(SRC_REWRITE_IP6_1); in connect_v6_prog() 86 sa.sin6_addr.s6_addr32[2] = bpf_htonl(SRC_REWRITE_IP6_2); in connect_v6_prog() 87 sa.sin6_addr.s6_addr32[3] = bpf_htonl(SRC_REWRITE_IP6_3); in connect_v6_prog() 89 if (bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)) != 0) in connect_v6_prog()
|
D | connect_force_port4.c | 33 struct sockaddr_in sa = {}; in connect4() local 37 sa.sin_family = AF_INET; in connect4() 38 sa.sin_port = bpf_htons(22222); in connect4() 39 sa.sin_addr.s_addr = bpf_htonl(0x7f000001); in connect4() 41 if (bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)) != 0) in connect4()
|
D | freplace_connect4.c | 12 struct sockaddr_in sa = {}; in new_do_bind() local 14 bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)); in new_do_bind()
|
D | connect_force_port6.c | 32 struct sockaddr_in6 sa = {}; in connect6() local 36 sa.sin6_family = AF_INET6; in connect6() 37 sa.sin6_port = bpf_htons(22223); in connect6() 38 sa.sin6_addr.s6_addr32[3] = bpf_htonl(1); in connect6() 40 if (bpf_bind(ctx, (struct sockaddr *)&sa, sizeof(sa)) != 0) in connect6()
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-sigreturn.c | 54 struct sigaction sa; in tm_sigreturn() local 61 memset(&sa, 0, sizeof(sa)); in tm_sigreturn() 62 sa.sa_handler = handler; in tm_sigreturn() 63 sigemptyset(&sa.sa_mask); in tm_sigreturn() 65 if (sigaction(SIGSEGV, &sa, NULL)) in tm_sigreturn()
|
/tools/testing/selftests/powerpc/security/ |
D | flush_utils.c | 71 struct sigaction sa; in set_dscr() local 74 memset(&sa, 0, sizeof(sa)); in set_dscr() 75 sa.sa_sigaction = sigill_handler; in set_dscr() 76 sa.sa_flags = SA_SIGINFO; in set_dscr() 77 if (sigaction(SIGILL, &sa, NULL)) in set_dscr()
|
/tools/firewire/ |
D | nosy-dump.c | 136 struct subaction *sa; in subaction_create() local 139 sa = malloc(sizeof *sa - sizeof sa->packet + length); in subaction_create() 140 if (!sa) in subaction_create() 142 sa->ack = data[length / 4 - 1]; in subaction_create() 143 sa->length = length; in subaction_create() 144 memcpy(&sa->packet, data, length); in subaction_create() 146 return sa; in subaction_create() 150 subaction_destroy(struct subaction *sa) in subaction_destroy() argument 152 free(sa); in subaction_destroy() 188 struct subaction *sa; in link_transaction_destroy() local [all …]
|
/tools/testing/selftests/arm64/bti/ |
D | test.c | 162 struct sigaction sa; in start() local 212 sa.sa_handler = (sighandler_t)(void *)handler; in start() 213 sa.sa_flags = SA_SIGINFO; in start() 214 sigemptyset(&sa.sa_mask); in start() 215 sigaction(SIGILL, &sa, NULL); in start() 216 sigaddset(&sa.sa_mask, SIGILL); in start() 217 sigprocmask(SIG_UNBLOCK, &sa.sa_mask, NULL); in start()
|
D | signal.c | 29 int sigaction(int n, struct sigaction *sa, const struct sigaction *old) in sigaction() argument 31 return syscall(__NR_rt_sigaction, n, sa, old, sizeof(sa->sa_mask)); in sigaction()
|
/tools/perf/tests/ |
D | bp_signal_overflow.c | 65 struct sigaction sa; in test__bp_signal_overflow() local 70 memset(&sa, 0, sizeof(struct sigaction)); in test__bp_signal_overflow() 71 sa.sa_sigaction = (void *) sig_handler; in test__bp_signal_overflow() 72 sa.sa_flags = SA_SIGINFO; in test__bp_signal_overflow() 74 if (sigaction(SIGIO, &sa, NULL) < 0) { in test__bp_signal_overflow()
|
D | bp_signal.c | 166 struct sigaction sa; in test__bp_signal() local 170 memset(&sa, 0, sizeof(struct sigaction)); in test__bp_signal() 171 sa.sa_sigaction = (void *) sig_handler; in test__bp_signal() 172 sa.sa_flags = SA_SIGINFO; in test__bp_signal() 174 if (sigaction(SIGIO, &sa, NULL) < 0) { in test__bp_signal() 179 sa.sa_sigaction = (void *) sig_handler_2; in test__bp_signal() 180 if (sigaction(SIGUSR1, &sa, NULL) < 0) { in test__bp_signal()
|