]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1da177e4 LT |
2 | #ifndef _LINUX_SIGNAL_H |
3 | #define _LINUX_SIGNAL_H | |
4 | ||
1c3bea0e | 5 | #include <linux/bug.h> |
e6d930b4 | 6 | #include <linux/signal_types.h> |
7994200c | 7 | #include <linux/string.h> |
1da177e4 | 8 | |
1477fcc2 SR |
9 | struct task_struct; |
10 | ||
d33ed52d DY |
11 | /* for sysctl */ |
12 | extern int print_fatal_signals; | |
1da177e4 | 13 | |
ae7795bc EB |
14 | static inline void copy_siginfo(kernel_siginfo_t *to, |
15 | const kernel_siginfo_t *from) | |
ca9eb49a | 16 | { |
8c36fdf5 | 17 | memcpy(to, from, sizeof(*to)); |
ca9eb49a JH |
18 | } |
19 | ||
ae7795bc | 20 | static inline void clear_siginfo(kernel_siginfo_t *info) |
8c5dbf2a EB |
21 | { |
22 | memset(info, 0, sizeof(*info)); | |
23 | } | |
24 | ||
4ce5f9c9 EB |
25 | #define SI_EXPANSION_SIZE (sizeof(struct siginfo) - sizeof(struct kernel_siginfo)) |
26 | ||
fa4751f4 EB |
27 | static inline void copy_siginfo_to_external(siginfo_t *to, |
28 | const kernel_siginfo_t *from) | |
29 | { | |
30 | memcpy(to, from, sizeof(*from)); | |
31 | memset(((char *)to) + sizeof(struct kernel_siginfo), 0, | |
32 | SI_EXPANSION_SIZE); | |
33 | } | |
34 | ||
ae7795bc EB |
35 | int copy_siginfo_to_user(siginfo_t __user *to, const kernel_siginfo_t *from); |
36 | int copy_siginfo_from_user(kernel_siginfo_t *to, const siginfo_t __user *from); | |
b9253a43 | 37 | |
cc731525 EB |
38 | enum siginfo_layout { |
39 | SIL_KILL, | |
40 | SIL_TIMER, | |
41 | SIL_POLL, | |
42 | SIL_FAULT, | |
9abcabe3 | 43 | SIL_FAULT_TRAPNO, |
31931c93 EB |
44 | SIL_FAULT_MCEERR, |
45 | SIL_FAULT_BNDERR, | |
46 | SIL_FAULT_PKUERR, | |
f4ac7302 | 47 | SIL_FAULT_PERF_EVENT, |
cc731525 EB |
48 | SIL_CHLD, |
49 | SIL_RT, | |
cc731525 | 50 | SIL_SYS, |
cc731525 EB |
51 | }; |
52 | ||
a3670058 | 53 | enum siginfo_layout siginfo_layout(unsigned sig, int si_code); |
cc731525 | 54 | |
1da177e4 LT |
55 | /* |
56 | * Define some primitives to manipulate sigset_t. | |
57 | */ | |
58 | ||
59 | #ifndef __HAVE_ARCH_SIG_BITOPS | |
60 | #include <linux/bitops.h> | |
61 | ||
62 | /* We don't use <linux/bitops.h> for these because there is no need to | |
63 | be atomic. */ | |
64 | static inline void sigaddset(sigset_t *set, int _sig) | |
65 | { | |
66 | unsigned long sig = _sig - 1; | |
67 | if (_NSIG_WORDS == 1) | |
68 | set->sig[0] |= 1UL << sig; | |
69 | else | |
70 | set->sig[sig / _NSIG_BPW] |= 1UL << (sig % _NSIG_BPW); | |
71 | } | |
72 | ||
73 | static inline void sigdelset(sigset_t *set, int _sig) | |
74 | { | |
75 | unsigned long sig = _sig - 1; | |
76 | if (_NSIG_WORDS == 1) | |
77 | set->sig[0] &= ~(1UL << sig); | |
78 | else | |
79 | set->sig[sig / _NSIG_BPW] &= ~(1UL << (sig % _NSIG_BPW)); | |
80 | } | |
81 | ||
82 | static inline int sigismember(sigset_t *set, int _sig) | |
83 | { | |
84 | unsigned long sig = _sig - 1; | |
85 | if (_NSIG_WORDS == 1) | |
86 | return 1 & (set->sig[0] >> sig); | |
87 | else | |
88 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); | |
89 | } | |
90 | ||
1da177e4 LT |
91 | #endif /* __HAVE_ARCH_SIG_BITOPS */ |
92 | ||
71fabd5e GA |
93 | static inline int sigisemptyset(sigset_t *set) |
94 | { | |
71fabd5e GA |
95 | switch (_NSIG_WORDS) { |
96 | case 4: | |
97 | return (set->sig[3] | set->sig[2] | | |
98 | set->sig[1] | set->sig[0]) == 0; | |
99 | case 2: | |
100 | return (set->sig[1] | set->sig[0]) == 0; | |
101 | case 1: | |
102 | return set->sig[0] == 0; | |
103 | default: | |
1c3bea0e | 104 | BUILD_BUG(); |
71fabd5e GA |
105 | return 0; |
106 | } | |
107 | } | |
108 | ||
c7be96af WL |
109 | static inline int sigequalsets(const sigset_t *set1, const sigset_t *set2) |
110 | { | |
111 | switch (_NSIG_WORDS) { | |
112 | case 4: | |
113 | return (set1->sig[3] == set2->sig[3]) && | |
114 | (set1->sig[2] == set2->sig[2]) && | |
115 | (set1->sig[1] == set2->sig[1]) && | |
116 | (set1->sig[0] == set2->sig[0]); | |
117 | case 2: | |
118 | return (set1->sig[1] == set2->sig[1]) && | |
119 | (set1->sig[0] == set2->sig[0]); | |
120 | case 1: | |
121 | return set1->sig[0] == set2->sig[0]; | |
122 | } | |
123 | return 0; | |
124 | } | |
125 | ||
1da177e4 LT |
126 | #define sigmask(sig) (1UL << ((sig) - 1)) |
127 | ||
128 | #ifndef __HAVE_ARCH_SIG_SETOPS | |
129 | #include <linux/string.h> | |
130 | ||
131 | #define _SIG_SET_BINOP(name, op) \ | |
132 | static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \ | |
133 | { \ | |
1da177e4 LT |
134 | unsigned long a0, a1, a2, a3, b0, b1, b2, b3; \ |
135 | \ | |
136 | switch (_NSIG_WORDS) { \ | |
1c3bea0e | 137 | case 4: \ |
1da177e4 LT |
138 | a3 = a->sig[3]; a2 = a->sig[2]; \ |
139 | b3 = b->sig[3]; b2 = b->sig[2]; \ | |
140 | r->sig[3] = op(a3, b3); \ | |
141 | r->sig[2] = op(a2, b2); \ | |
df561f66 | 142 | fallthrough; \ |
1c3bea0e | 143 | case 2: \ |
1da177e4 LT |
144 | a1 = a->sig[1]; b1 = b->sig[1]; \ |
145 | r->sig[1] = op(a1, b1); \ | |
df561f66 | 146 | fallthrough; \ |
1c3bea0e | 147 | case 1: \ |
1da177e4 LT |
148 | a0 = a->sig[0]; b0 = b->sig[0]; \ |
149 | r->sig[0] = op(a0, b0); \ | |
150 | break; \ | |
1c3bea0e ON |
151 | default: \ |
152 | BUILD_BUG(); \ | |
1da177e4 LT |
153 | } \ |
154 | } | |
155 | ||
156 | #define _sig_or(x,y) ((x) | (y)) | |
157 | _SIG_SET_BINOP(sigorsets, _sig_or) | |
158 | ||
159 | #define _sig_and(x,y) ((x) & (y)) | |
160 | _SIG_SET_BINOP(sigandsets, _sig_and) | |
161 | ||
702a5073 ON |
162 | #define _sig_andn(x,y) ((x) & ~(y)) |
163 | _SIG_SET_BINOP(sigandnsets, _sig_andn) | |
1da177e4 LT |
164 | |
165 | #undef _SIG_SET_BINOP | |
166 | #undef _sig_or | |
167 | #undef _sig_and | |
702a5073 | 168 | #undef _sig_andn |
1da177e4 LT |
169 | |
170 | #define _SIG_SET_OP(name, op) \ | |
171 | static inline void name(sigset_t *set) \ | |
172 | { \ | |
1da177e4 | 173 | switch (_NSIG_WORDS) { \ |
1c3bea0e ON |
174 | case 4: set->sig[3] = op(set->sig[3]); \ |
175 | set->sig[2] = op(set->sig[2]); \ | |
df561f66 | 176 | fallthrough; \ |
1c3bea0e | 177 | case 2: set->sig[1] = op(set->sig[1]); \ |
df561f66 | 178 | fallthrough; \ |
1c3bea0e | 179 | case 1: set->sig[0] = op(set->sig[0]); \ |
1da177e4 | 180 | break; \ |
1c3bea0e ON |
181 | default: \ |
182 | BUILD_BUG(); \ | |
1da177e4 LT |
183 | } \ |
184 | } | |
185 | ||
186 | #define _sig_not(x) (~(x)) | |
187 | _SIG_SET_OP(signotset, _sig_not) | |
188 | ||
189 | #undef _SIG_SET_OP | |
190 | #undef _sig_not | |
191 | ||
192 | static inline void sigemptyset(sigset_t *set) | |
193 | { | |
194 | switch (_NSIG_WORDS) { | |
195 | default: | |
196 | memset(set, 0, sizeof(sigset_t)); | |
197 | break; | |
198 | case 2: set->sig[1] = 0; | |
df561f66 | 199 | fallthrough; |
1da177e4 LT |
200 | case 1: set->sig[0] = 0; |
201 | break; | |
202 | } | |
203 | } | |
204 | ||
205 | static inline void sigfillset(sigset_t *set) | |
206 | { | |
207 | switch (_NSIG_WORDS) { | |
208 | default: | |
209 | memset(set, -1, sizeof(sigset_t)); | |
210 | break; | |
211 | case 2: set->sig[1] = -1; | |
df561f66 | 212 | fallthrough; |
1da177e4 LT |
213 | case 1: set->sig[0] = -1; |
214 | break; | |
215 | } | |
216 | } | |
217 | ||
218 | /* Some extensions for manipulating the low 32 signals in particular. */ | |
219 | ||
220 | static inline void sigaddsetmask(sigset_t *set, unsigned long mask) | |
221 | { | |
222 | set->sig[0] |= mask; | |
223 | } | |
224 | ||
225 | static inline void sigdelsetmask(sigset_t *set, unsigned long mask) | |
226 | { | |
227 | set->sig[0] &= ~mask; | |
228 | } | |
229 | ||
230 | static inline int sigtestsetmask(sigset_t *set, unsigned long mask) | |
231 | { | |
232 | return (set->sig[0] & mask) != 0; | |
233 | } | |
234 | ||
235 | static inline void siginitset(sigset_t *set, unsigned long mask) | |
236 | { | |
237 | set->sig[0] = mask; | |
238 | switch (_NSIG_WORDS) { | |
239 | default: | |
240 | memset(&set->sig[1], 0, sizeof(long)*(_NSIG_WORDS-1)); | |
241 | break; | |
242 | case 2: set->sig[1] = 0; | |
4169e889 | 243 | break; |
1da177e4 LT |
244 | case 1: ; |
245 | } | |
246 | } | |
247 | ||
248 | static inline void siginitsetinv(sigset_t *set, unsigned long mask) | |
249 | { | |
250 | set->sig[0] = ~mask; | |
251 | switch (_NSIG_WORDS) { | |
252 | default: | |
253 | memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1)); | |
254 | break; | |
255 | case 2: set->sig[1] = -1; | |
4169e889 | 256 | break; |
1da177e4 LT |
257 | case 1: ; |
258 | } | |
259 | } | |
260 | ||
261 | #endif /* __HAVE_ARCH_SIG_SETOPS */ | |
262 | ||
263 | static inline void init_sigpending(struct sigpending *sig) | |
264 | { | |
265 | sigemptyset(&sig->signal); | |
266 | INIT_LIST_HEAD(&sig->list); | |
267 | } | |
268 | ||
6a14c5c9 ON |
269 | extern void flush_sigqueue(struct sigpending *queue); |
270 | ||
e5bdd883 JJ |
271 | /* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */ |
272 | static inline int valid_signal(unsigned long sig) | |
273 | { | |
274 | return sig <= _NSIG ? 1 : 0; | |
275 | } | |
276 | ||
b2b07e4f ON |
277 | struct timespec; |
278 | struct pt_regs; | |
01024980 | 279 | enum pid_type; |
b2b07e4f | 280 | |
fba2afaa | 281 | extern int next_signal(struct sigpending *pending, sigset_t *mask); |
ae7795bc | 282 | extern int do_send_sig_info(int sig, struct kernel_siginfo *info, |
40b3b025 | 283 | struct task_struct *p, enum pid_type type); |
ae7795bc | 284 | extern int group_send_sig_info(int sig, struct kernel_siginfo *info, |
01024980 | 285 | struct task_struct *p, enum pid_type type); |
ae7795bc | 286 | extern int __group_send_sig_info(int, struct kernel_siginfo *, struct task_struct *); |
1da177e4 | 287 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
77097ae5 AV |
288 | extern void set_current_blocked(sigset_t *); |
289 | extern void __set_current_blocked(const sigset_t *); | |
abd4f750 | 290 | extern int show_unhandled_signals; |
1da177e4 | 291 | |
20ab7218 | 292 | extern bool get_signal(struct ksignal *ksig); |
2ce5da17 | 293 | extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping); |
d12619b5 | 294 | extern void exit_signals(struct task_struct *tsk); |
b4e74264 ON |
295 | extern void kernel_sigaction(int, __sighandler_t); |
296 | ||
33da8e7c EB |
297 | #define SIG_KTHREAD ((__force __sighandler_t)2) |
298 | #define SIG_KTHREAD_KERNEL ((__force __sighandler_t)3) | |
299 | ||
b4e74264 ON |
300 | static inline void allow_signal(int sig) |
301 | { | |
302 | /* | |
303 | * Kernel threads handle their own signals. Let the signal code | |
304 | * know it'll be handled, so that they don't get converted to | |
305 | * SIGKILL or just silently dropped. | |
306 | */ | |
33da8e7c EB |
307 | kernel_sigaction(sig, SIG_KTHREAD); |
308 | } | |
309 | ||
310 | static inline void allow_kernel_signal(int sig) | |
311 | { | |
312 | /* | |
313 | * Kernel threads handle their own signals. Let the signal code | |
314 | * know signals sent by the kernel will be handled, so that they | |
315 | * don't get silently dropped. | |
316 | */ | |
317 | kernel_sigaction(sig, SIG_KTHREAD_KERNEL); | |
b4e74264 ON |
318 | } |
319 | ||
320 | static inline void disallow_signal(int sig) | |
321 | { | |
322 | kernel_sigaction(sig, SIG_IGN); | |
323 | } | |
1da177e4 | 324 | |
298ec1e2 CL |
325 | extern struct kmem_cache *sighand_cachep; |
326 | ||
67a48a24 | 327 | extern bool unhandled_signal(struct task_struct *tsk, int sig); |
abd4f750 | 328 | |
55c0d1f8 RM |
329 | /* |
330 | * In POSIX a signal is sent either to a specific thread (Linux task) | |
331 | * or to the process as a whole (Linux thread group). How the signal | |
332 | * is sent determines whether it's to one thread or the whole group, | |
333 | * which determines which signal mask(s) are involved in blocking it | |
334 | * from being delivered until later. When the signal is delivered, | |
335 | * either it's caught or ignored by a user handler or it has a default | |
336 | * effect that applies to the whole thread group (POSIX process). | |
337 | * | |
338 | * The possible effects an unblocked signal set to SIG_DFL can have are: | |
339 | * ignore - Nothing Happens | |
340 | * terminate - kill the process, i.e. all threads in the group, | |
341 | * similar to exit_group. The group leader (only) reports | |
342 | * WIFSIGNALED status to its parent. | |
343 | * coredump - write a core dump file describing all threads using | |
344 | * the same mm and then kill all those threads | |
345 | * stop - stop all the threads in the group, i.e. TASK_STOPPED state | |
346 | * | |
347 | * SIGKILL and SIGSTOP cannot be caught, blocked, or ignored. | |
348 | * Other signals when not blocked and set to SIG_DFL behaves as follows. | |
349 | * The job control signals also have other special effects. | |
350 | * | |
351 | * +--------------------+------------------+ | |
352 | * | POSIX signal | default action | | |
353 | * +--------------------+------------------+ | |
354 | * | SIGHUP | terminate | | |
355 | * | SIGINT | terminate | | |
356 | * | SIGQUIT | coredump | | |
357 | * | SIGILL | coredump | | |
358 | * | SIGTRAP | coredump | | |
359 | * | SIGABRT/SIGIOT | coredump | | |
360 | * | SIGBUS | coredump | | |
361 | * | SIGFPE | coredump | | |
362 | * | SIGKILL | terminate(+) | | |
363 | * | SIGUSR1 | terminate | | |
364 | * | SIGSEGV | coredump | | |
365 | * | SIGUSR2 | terminate | | |
366 | * | SIGPIPE | terminate | | |
367 | * | SIGALRM | terminate | | |
368 | * | SIGTERM | terminate | | |
369 | * | SIGCHLD | ignore | | |
370 | * | SIGCONT | ignore(*) | | |
371 | * | SIGSTOP | stop(*)(+) | | |
372 | * | SIGTSTP | stop(*) | | |
373 | * | SIGTTIN | stop(*) | | |
374 | * | SIGTTOU | stop(*) | | |
375 | * | SIGURG | ignore | | |
376 | * | SIGXCPU | coredump | | |
377 | * | SIGXFSZ | coredump | | |
378 | * | SIGVTALRM | terminate | | |
379 | * | SIGPROF | terminate | | |
380 | * | SIGPOLL/SIGIO | terminate | | |
381 | * | SIGSYS/SIGUNUSED | coredump | | |
382 | * | SIGSTKFLT | terminate | | |
383 | * | SIGWINCH | ignore | | |
384 | * | SIGPWR | terminate | | |
385 | * | SIGRTMIN-SIGRTMAX | terminate | | |
386 | * +--------------------+------------------+ | |
387 | * | non-POSIX signal | default action | | |
388 | * +--------------------+------------------+ | |
389 | * | SIGEMT | coredump | | |
390 | * +--------------------+------------------+ | |
391 | * | |
392 | * (+) For SIGKILL and SIGSTOP the action is "always", not just "default". | |
393 | * (*) Special job control effects: | |
394 | * When SIGCONT is sent, it resumes the process (all threads in the group) | |
395 | * from TASK_STOPPED state and also clears any pending/queued stop signals | |
396 | * (any of those marked with "stop(*)"). This happens regardless of blocking, | |
397 | * catching, or ignoring SIGCONT. When any stop signal is sent, it clears | |
398 | * any pending/queued SIGCONT signals; this happens regardless of blocking, | |
399 | * catching, or ignored the stop signal, though (except for SIGSTOP) the | |
400 | * default action of stopping the process may happen later or never. | |
401 | */ | |
402 | ||
403 | #ifdef SIGEMT | |
404 | #define SIGEMT_MASK rt_sigmask(SIGEMT) | |
405 | #else | |
406 | #define SIGEMT_MASK 0 | |
407 | #endif | |
408 | ||
409 | #if SIGRTMIN > BITS_PER_LONG | |
410 | #define rt_sigmask(sig) (1ULL << ((sig)-1)) | |
411 | #else | |
412 | #define rt_sigmask(sig) sigmask(sig) | |
413 | #endif | |
5c8ccefd ON |
414 | |
415 | #define siginmask(sig, mask) \ | |
ee17e5d6 | 416 | ((sig) > 0 && (sig) < SIGRTMIN && (rt_sigmask(sig) & (mask))) |
55c0d1f8 RM |
417 | |
418 | #define SIG_KERNEL_ONLY_MASK (\ | |
419 | rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP)) | |
420 | ||
421 | #define SIG_KERNEL_STOP_MASK (\ | |
422 | rt_sigmask(SIGSTOP) | rt_sigmask(SIGTSTP) | \ | |
423 | rt_sigmask(SIGTTIN) | rt_sigmask(SIGTTOU) ) | |
424 | ||
425 | #define SIG_KERNEL_COREDUMP_MASK (\ | |
426 | rt_sigmask(SIGQUIT) | rt_sigmask(SIGILL) | \ | |
427 | rt_sigmask(SIGTRAP) | rt_sigmask(SIGABRT) | \ | |
428 | rt_sigmask(SIGFPE) | rt_sigmask(SIGSEGV) | \ | |
429 | rt_sigmask(SIGBUS) | rt_sigmask(SIGSYS) | \ | |
430 | rt_sigmask(SIGXCPU) | rt_sigmask(SIGXFSZ) | \ | |
431 | SIGEMT_MASK ) | |
432 | ||
433 | #define SIG_KERNEL_IGNORE_MASK (\ | |
434 | rt_sigmask(SIGCONT) | rt_sigmask(SIGCHLD) | \ | |
435 | rt_sigmask(SIGWINCH) | rt_sigmask(SIGURG) ) | |
436 | ||
d08477aa EB |
437 | #define SIG_SPECIFIC_SICODES_MASK (\ |
438 | rt_sigmask(SIGILL) | rt_sigmask(SIGFPE) | \ | |
439 | rt_sigmask(SIGSEGV) | rt_sigmask(SIGBUS) | \ | |
440 | rt_sigmask(SIGTRAP) | rt_sigmask(SIGCHLD) | \ | |
441 | rt_sigmask(SIGPOLL) | rt_sigmask(SIGSYS) | \ | |
442 | SIGEMT_MASK ) | |
443 | ||
5c8ccefd ON |
444 | #define sig_kernel_only(sig) siginmask(sig, SIG_KERNEL_ONLY_MASK) |
445 | #define sig_kernel_coredump(sig) siginmask(sig, SIG_KERNEL_COREDUMP_MASK) | |
446 | #define sig_kernel_ignore(sig) siginmask(sig, SIG_KERNEL_IGNORE_MASK) | |
447 | #define sig_kernel_stop(sig) siginmask(sig, SIG_KERNEL_STOP_MASK) | |
d08477aa | 448 | #define sig_specific_sicodes(sig) siginmask(sig, SIG_SPECIFIC_SICODES_MASK) |
55c0d1f8 | 449 | |
55c0d1f8 RM |
450 | #define sig_fatal(t, signr) \ |
451 | (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \ | |
452 | (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL) | |
453 | ||
a1c9eea9 AB |
454 | void signals_init(void); |
455 | ||
5c49574f | 456 | int restore_altstack(const stack_t __user *); |
c40702c4 | 457 | int __save_altstack(stack_t __user *, unsigned long); |
5c49574f | 458 | |
119cd59f | 459 | #define unsafe_save_altstack(uss, sp, label) do { \ |
bd1c149a AV |
460 | stack_t __user *__uss = uss; \ |
461 | struct task_struct *t = current; \ | |
119cd59f AV |
462 | unsafe_put_user((void __user *)t->sas_ss_sp, &__uss->ss_sp, label); \ |
463 | unsafe_put_user(t->sas_ss_flags, &__uss->ss_flags, label); \ | |
464 | unsafe_put_user(t->sas_ss_size, &__uss->ss_size, label); \ | |
bd1c149a AV |
465 | } while (0); |
466 | ||
2256cacf TG |
467 | #ifdef CONFIG_DYNAMIC_SIGFRAME |
468 | bool sigaltstack_size_valid(size_t ss_size); | |
469 | #else | |
470 | static inline bool sigaltstack_size_valid(size_t size) { return true; } | |
471 | #endif /* !CONFIG_DYNAMIC_SIGFRAME */ | |
472 | ||
34db8aaf DH |
473 | #ifdef CONFIG_PROC_FS |
474 | struct seq_file; | |
475 | extern void render_sigset_t(struct seq_file *, const char *, sigset_t *); | |
476 | #endif | |
477 | ||
6ac05e83 PC |
478 | #ifndef arch_untagged_si_addr |
479 | /* | |
480 | * Given a fault address and a signal and si_code which correspond to the | |
481 | * _sigfault union member, returns the address that must appear in si_addr if | |
482 | * the signal handler does not have SA_EXPOSE_TAGBITS enabled in sa_flags. | |
483 | */ | |
484 | static inline void __user *arch_untagged_si_addr(void __user *addr, | |
485 | unsigned long sig, | |
486 | unsigned long si_code) | |
487 | { | |
488 | return addr; | |
489 | } | |
490 | #endif | |
491 | ||
1da177e4 | 492 | #endif /* _LINUX_SIGNAL_H */ |