Merge tag 'for-4.6' of git://git.osdn.jp/gitroot/uclinux-h8/linux
[deliverable/linux.git] / arch / x86 / um / signal.c
CommitLineData
1da177e4 1/*
f67aa2ff
AV
2 * Copyright (C) 2003 PathScale, Inc.
3 * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
1da177e4
LT
4 * Licensed under the GPL
5 */
6
f67aa2ff
AV
7
8#include <linux/personality.h>
7796931f 9#include <linux/ptrace.h>
f67aa2ff 10#include <linux/kernel.h>
7796931f
JD
11#include <asm/unistd.h>
12#include <asm/uaccess.h>
13#include <asm/ucontext.h>
37185b33
AV
14#include <frame_kern.h>
15#include <skas.h>
1da177e4 16
f67aa2ff
AV
17#ifdef CONFIG_X86_32
18
a5f6096c
JD
19/*
20 * FPU tag word conversions.
21 */
22
23static inline unsigned short twd_i387_to_fxsr(unsigned short twd)
24{
25 unsigned int tmp; /* to avoid 16 bit prefixes in the code */
26
27 /* Transform each pair of bits into 01 (valid) or 00 (empty) */
28 tmp = ~twd;
29 tmp = (tmp | (tmp>>1)) & 0x5555; /* 0V0V0V0V0V0V0V0V */
30 /* and move the valid bits to the lower byte. */
31 tmp = (tmp | (tmp >> 1)) & 0x3333; /* 00VV00VV00VV00VV */
32 tmp = (tmp | (tmp >> 2)) & 0x0f0f; /* 0000VVVV0000VVVV */
33 tmp = (tmp | (tmp >> 4)) & 0x00ff; /* 00000000VVVVVVVV */
34 return tmp;
35}
36
37static inline unsigned long twd_fxsr_to_i387(struct user_fxsr_struct *fxsave)
38{
39 struct _fpxreg *st = NULL;
40 unsigned long twd = (unsigned long) fxsave->twd;
41 unsigned long tag;
42 unsigned long ret = 0xffff0000;
43 int i;
44
497888cf 45#define FPREG_ADDR(f, n) ((char *)&(f)->st_space + (n) * 16)
a5f6096c
JD
46
47 for (i = 0; i < 8; i++) {
48 if (twd & 0x1) {
49 st = (struct _fpxreg *) FPREG_ADDR(fxsave, i);
50
51 switch (st->exponent & 0x7fff) {
52 case 0x7fff:
53 tag = 2; /* Special */
54 break;
55 case 0x0000:
56 if ( !st->significand[0] &&
57 !st->significand[1] &&
58 !st->significand[2] &&
59 !st->significand[3] ) {
60 tag = 1; /* Zero */
61 } else {
62 tag = 2; /* Special */
63 }
64 break;
65 default:
66 if (st->significand[3] & 0x8000) {
67 tag = 0; /* Valid */
68 } else {
69 tag = 2; /* Special */
70 }
71 break;
72 }
73 } else {
74 tag = 3; /* Empty */
75 }
76 ret |= (tag << (2 * i));
77 twd = twd >> 1;
78 }
79 return ret;
80}
81
82static int convert_fxsr_to_user(struct _fpstate __user *buf,
83 struct user_fxsr_struct *fxsave)
84{
85 unsigned long env[7];
86 struct _fpreg __user *to;
87 struct _fpxreg *from;
88 int i;
89
90 env[0] = (unsigned long)fxsave->cwd | 0xffff0000ul;
91 env[1] = (unsigned long)fxsave->swd | 0xffff0000ul;
92 env[2] = twd_fxsr_to_i387(fxsave);
93 env[3] = fxsave->fip;
94 env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16);
95 env[5] = fxsave->foo;
96 env[6] = fxsave->fos;
97
98 if (__copy_to_user(buf, env, 7 * sizeof(unsigned long)))
99 return 1;
100
101 to = &buf->_st[0];
102 from = (struct _fpxreg *) &fxsave->st_space[0];
103 for (i = 0; i < 8; i++, to++, from++) {
104 unsigned long __user *t = (unsigned long __user *)to;
105 unsigned long *f = (unsigned long *)from;
106
107 if (__put_user(*f, t) ||
108 __put_user(*(f + 1), t + 1) ||
109 __put_user(from->exponent, &to->exponent))
110 return 1;
111 }
112 return 0;
113}
114
115static int convert_fxsr_from_user(struct user_fxsr_struct *fxsave,
116 struct _fpstate __user *buf)
117{
118 unsigned long env[7];
119 struct _fpxreg *to;
120 struct _fpreg __user *from;
121 int i;
122
123 if (copy_from_user( env, buf, 7 * sizeof(long)))
124 return 1;
125
126 fxsave->cwd = (unsigned short)(env[0] & 0xffff);
127 fxsave->swd = (unsigned short)(env[1] & 0xffff);
128 fxsave->twd = twd_i387_to_fxsr((unsigned short)(env[2] & 0xffff));
129 fxsave->fip = env[3];
130 fxsave->fop = (unsigned short)((env[4] & 0xffff0000ul) >> 16);
131 fxsave->fcs = (env[4] & 0xffff);
132 fxsave->foo = env[5];
133 fxsave->fos = env[6];
134
135 to = (struct _fpxreg *) &fxsave->st_space[0];
136 from = &buf->_st[0];
137 for (i = 0; i < 8; i++, to++, from++) {
138 unsigned long *t = (unsigned long *)to;
139 unsigned long __user *f = (unsigned long __user *)from;
140
141 if (__get_user(*t, f) ||
142 __get_user(*(t + 1), f + 1) ||
143 __get_user(to->exponent, &from->exponent))
144 return 1;
145 }
146 return 0;
147}
148
149extern int have_fpx_regs;
150
f67aa2ff
AV
151#endif
152
77bf4400
JD
153static int copy_sc_from_user(struct pt_regs *regs,
154 struct sigcontext __user *from)
1da177e4 155{
a5f6096c 156 struct sigcontext sc;
a5a678c8 157 int err, pid;
1da177e4 158
3b7d15bd 159 /* Always make any pending restarted system calls return -EINTR */
f56141e3 160 current->restart_block.fn = do_no_restart_syscall;
3b7d15bd 161
1da177e4 162 err = copy_from_user(&sc, from, sizeof(sc));
ba180fd4 163 if (err)
5d86456d 164 return err;
1da177e4 165
a955bd61
AV
166#define GETREG(regno, regname) regs->regs.gp[HOST_##regno] = sc.regname
167
f67aa2ff 168#ifdef CONFIG_X86_32
a955bd61
AV
169 GETREG(GS, gs);
170 GETREG(FS, fs);
171 GETREG(ES, es);
172 GETREG(DS, ds);
f67aa2ff 173#endif
3579a389
AV
174 GETREG(DI, di);
175 GETREG(SI, si);
176 GETREG(BP, bp);
a955bd61 177 GETREG(SP, sp);
3579a389
AV
178 GETREG(BX, bx);
179 GETREG(DX, dx);
180 GETREG(CX, cx);
181 GETREG(AX, ax);
a955bd61 182 GETREG(IP, ip);
f67aa2ff
AV
183
184#ifdef CONFIG_X86_64
185 GETREG(R8, r8);
186 GETREG(R9, r9);
187 GETREG(R10, r10);
188 GETREG(R11, r11);
189 GETREG(R12, r12);
190 GETREG(R13, r13);
191 GETREG(R14, r14);
192 GETREG(R15, r15);
193#endif
194
a955bd61
AV
195 GETREG(CS, cs);
196 GETREG(EFLAGS, flags);
f67aa2ff 197#ifdef CONFIG_X86_32
a955bd61 198 GETREG(SS, ss);
f67aa2ff 199#endif
a955bd61
AV
200
201#undef GETREG
f67aa2ff
AV
202
203 pid = userspace_pid[current_thread_info()->cpu];
204#ifdef CONFIG_X86_32
a5f6096c
JD
205 if (have_fpx_regs) {
206 struct user_fxsr_struct fpx;
1da177e4 207
966c8079
WC
208 err = copy_from_user(&fpx,
209 &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
a5f6096c
JD
210 sizeof(struct user_fxsr_struct));
211 if (err)
212 return 1;
213
8090bfd2 214 err = convert_fxsr_from_user(&fpx, (void *)sc.fpstate);
a5f6096c
JD
215 if (err)
216 return 1;
217
a5a678c8 218 err = restore_fpx_registers(pid, (unsigned long *) &fpx);
a5f6096c
JD
219 if (err < 0) {
220 printk(KERN_ERR "copy_sc_from_user - "
221 "restore_fpx_registers failed, errno = %d\n",
222 -err);
223 return 1;
224 }
f67aa2ff
AV
225 } else
226#endif
227 {
a5f6096c
JD
228 struct user_i387_struct fp;
229
8090bfd2 230 err = copy_from_user(&fp, (void *)sc.fpstate,
a5f6096c
JD
231 sizeof(struct user_i387_struct));
232 if (err)
233 return 1;
234
a5a678c8 235 err = restore_fp_registers(pid, (unsigned long *) &fp);
a5f6096c
JD
236 if (err < 0) {
237 printk(KERN_ERR "copy_sc_from_user - "
238 "restore_fp_registers failed, errno = %d\n",
239 -err);
240 return 1;
241 }
1da177e4 242 }
5d86456d 243 return 0;
1da177e4
LT
244}
245
77bf4400 246static int copy_sc_to_user(struct sigcontext __user *to,
f67aa2ff
AV
247 struct _fpstate __user *to_fp, struct pt_regs *regs,
248 unsigned long mask)
1da177e4 249{
ba180fd4 250 struct sigcontext sc;
c578455a 251 struct faultinfo * fi = &current->thread.arch.faultinfo;
a5a678c8 252 int err, pid;
a955bd61 253 memset(&sc, 0, sizeof(struct sigcontext));
1da177e4 254
f67aa2ff
AV
255#define PUTREG(regno, regname) sc.regname = regs->regs.gp[HOST_##regno]
256
257#ifdef CONFIG_X86_32
258 PUTREG(GS, gs);
259 PUTREG(FS, fs);
260 PUTREG(ES, es);
261 PUTREG(DS, ds);
262#endif
263 PUTREG(DI, di);
264 PUTREG(SI, si);
265 PUTREG(BP, bp);
266 PUTREG(SP, sp);
267 PUTREG(BX, bx);
268 PUTREG(DX, dx);
269 PUTREG(CX, cx);
270 PUTREG(AX, ax);
271#ifdef CONFIG_X86_64
272 PUTREG(R8, r8);
273 PUTREG(R9, r9);
274 PUTREG(R10, r10);
275 PUTREG(R11, r11);
276 PUTREG(R12, r12);
277 PUTREG(R13, r13);
278 PUTREG(R14, r14);
279 PUTREG(R15, r15);
280#endif
281
ba180fd4
JD
282 sc.cr2 = fi->cr2;
283 sc.err = fi->error_code;
284 sc.trapno = fi->trap_no;
f67aa2ff
AV
285 PUTREG(IP, ip);
286 PUTREG(CS, cs);
287 PUTREG(EFLAGS, flags);
288#ifdef CONFIG_X86_32
289 PUTREG(SP, sp_at_signal);
290 PUTREG(SS, ss);
291#endif
292#undef PUTREG
293 sc.oldmask = mask;
8090bfd2 294 sc.fpstate = (unsigned long)to_fp;
1da177e4 295
f67aa2ff
AV
296 err = copy_to_user(to, &sc, sizeof(struct sigcontext));
297 if (err)
298 return 1;
299
a5a678c8 300 pid = userspace_pid[current_thread_info()->cpu];
f67aa2ff
AV
301
302#ifdef CONFIG_X86_32
a5f6096c
JD
303 if (have_fpx_regs) {
304 struct user_fxsr_struct fpx;
305
a5a678c8 306 err = save_fpx_registers(pid, (unsigned long *) &fpx);
a5f6096c
JD
307 if (err < 0){
308 printk(KERN_ERR "copy_sc_to_user - save_fpx_registers "
309 "failed, errno = %d\n", err);
310 return 1;
311 }
312
313 err = convert_fxsr_to_user(to_fp, &fpx);
314 if (err)
315 return 1;
316
317 err |= __put_user(fpx.swd, &to_fp->status);
318 err |= __put_user(X86_FXSR_MAGIC, &to_fp->magic);
319 if (err)
320 return 1;
321
322 if (copy_to_user(&to_fp->_fxsr_env[0], &fpx,
323 sizeof(struct user_fxsr_struct)))
324 return 1;
f67aa2ff
AV
325 } else
326#endif
327 {
a5f6096c
JD
328 struct user_i387_struct fp;
329
a5a678c8 330 err = save_fp_registers(pid, (unsigned long *) &fp);
a5f6096c
JD
331 if (copy_to_user(to_fp, &fp, sizeof(struct user_i387_struct)))
332 return 1;
333 }
1da177e4 334
f67aa2ff 335 return 0;
1da177e4 336}
1da177e4 337
f67aa2ff 338#ifdef CONFIG_X86_32
ba180fd4
JD
339static int copy_ucontext_to_user(struct ucontext __user *uc,
340 struct _fpstate __user *fp, sigset_t *set,
341 unsigned long sp)
1da177e4
LT
342{
343 int err = 0;
344
c40702c4 345 err |= __save_altstack(&uc->uc_stack, sp);
f67aa2ff 346 err |= copy_sc_to_user(&uc->uc_mcontext, fp, &current->thread.regs, 0);
1da177e4 347 err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set));
5d86456d 348 return err;
1da177e4
LT
349}
350
351struct sigframe
352{
4d338e1a 353 char __user *pretcode;
1da177e4
LT
354 int sig;
355 struct sigcontext sc;
356 struct _fpstate fpstate;
357 unsigned long extramask[_NSIG_WORDS-1];
358 char retcode[8];
359};
360
361struct rt_sigframe
362{
4d338e1a 363 char __user *pretcode;
1da177e4 364 int sig;
4d338e1a
AV
365 struct siginfo __user *pinfo;
366 void __user *puc;
1da177e4
LT
367 struct siginfo info;
368 struct ucontext uc;
369 struct _fpstate fpstate;
370 char retcode[8];
371};
372
307627ee
RW
373int setup_signal_stack_sc(unsigned long stack_top, struct ksignal *ksig,
374 struct pt_regs *regs, sigset_t *mask)
1da177e4
LT
375{
376 struct sigframe __user *frame;
4d338e1a 377 void __user *restorer;
307627ee 378 int err = 0, sig = ksig->sig;
1da177e4 379
3896625d
JD
380 /* This is the same calculation as i386 - ((sp + 4) & 15) == 0 */
381 stack_top = ((stack_top + 4) & -16UL) - 4;
4d338e1a 382 frame = (struct sigframe __user *) stack_top - 1;
1da177e4
LT
383 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
384 return 1;
385
4d338e1a 386 restorer = frame->retcode;
307627ee
RW
387 if (ksig->ka.sa.sa_flags & SA_RESTORER)
388 restorer = ksig->ka.sa.sa_restorer;
1da177e4
LT
389
390 err |= __put_user(restorer, &frame->pretcode);
391 err |= __put_user(sig, &frame->sig);
f67aa2ff 392 err |= copy_sc_to_user(&frame->sc, &frame->fpstate, regs, mask->sig[0]);
1da177e4
LT
393 if (_NSIG_WORDS > 1)
394 err |= __copy_to_user(&frame->extramask, &mask->sig[1],
395 sizeof(frame->extramask));
396
397 /*
398 * This is popl %eax ; movl $,%eax ; int $0x80
399 *
400 * WE DO NOT USE IT ANY MORE! It's only left here for historical
401 * reasons and because gdb uses it as a signature to notice
402 * signal handler stack frames.
403 */
404 err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
405 err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
406 err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
407
ba180fd4 408 if (err)
fbe98686 409 return err;
1da177e4
LT
410
411 PT_REGS_SP(regs) = (unsigned long) frame;
307627ee 412 PT_REGS_IP(regs) = (unsigned long) ksig->ka.sa.sa_handler;
243412be
AV
413 PT_REGS_AX(regs) = (unsigned long) sig;
414 PT_REGS_DX(regs) = (unsigned long) 0;
415 PT_REGS_CX(regs) = (unsigned long) 0;
98c18238 416 return 0;
1da177e4
LT
417}
418
307627ee
RW
419int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
420 struct pt_regs *regs, sigset_t *mask)
1da177e4
LT
421{
422 struct rt_sigframe __user *frame;
4d338e1a 423 void __user *restorer;
307627ee 424 int err = 0, sig = ksig->sig;
1da177e4
LT
425
426 stack_top &= -8UL;
4d338e1a 427 frame = (struct rt_sigframe __user *) stack_top - 1;
1da177e4
LT
428 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
429 return 1;
430
4d338e1a 431 restorer = frame->retcode;
307627ee
RW
432 if (ksig->ka.sa.sa_flags & SA_RESTORER)
433 restorer = ksig->ka.sa.sa_restorer;
1da177e4
LT
434
435 err |= __put_user(restorer, &frame->pretcode);
436 err |= __put_user(sig, &frame->sig);
437 err |= __put_user(&frame->info, &frame->pinfo);
438 err |= __put_user(&frame->uc, &frame->puc);
307627ee 439 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
1da177e4 440 err |= copy_ucontext_to_user(&frame->uc, &frame->fpstate, mask,
fbe98686 441 PT_REGS_SP(regs));
1da177e4
LT
442
443 /*
444 * This is movl $,%eax ; int $0x80
445 *
446 * WE DO NOT USE IT ANY MORE! It's only left here for historical
447 * reasons and because gdb uses it as a signature to notice
448 * signal handler stack frames.
449 */
450 err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
451 err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
452 err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
453
ba180fd4 454 if (err)
fbe98686 455 return err;
1da177e4 456
fbe98686 457 PT_REGS_SP(regs) = (unsigned long) frame;
307627ee 458 PT_REGS_IP(regs) = (unsigned long) ksig->ka.sa.sa_handler;
243412be
AV
459 PT_REGS_AX(regs) = (unsigned long) sig;
460 PT_REGS_DX(regs) = (unsigned long) &frame->info;
461 PT_REGS_CX(regs) = (unsigned long) &frame->uc;
98c18238 462 return 0;
1da177e4
LT
463}
464
3fe26fa3 465long sys_sigreturn(void)
1da177e4
LT
466{
467 unsigned long sp = PT_REGS_SP(&current->thread.regs);
4d338e1a 468 struct sigframe __user *frame = (struct sigframe __user *)(sp - 8);
1da177e4
LT
469 sigset_t set;
470 struct sigcontext __user *sc = &frame->sc;
1da177e4
LT
471 int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
472
de379379 473 if (copy_from_user(&set.sig[0], &sc->oldmask, sizeof(set.sig[0])) ||
8090bfd2 474 copy_from_user(&set.sig[1], frame->extramask, sig_size))
1da177e4
LT
475 goto segfault;
476
78722a44 477 set_current_blocked(&set);
1da177e4 478
ba180fd4 479 if (copy_sc_from_user(&current->thread.regs, sc))
1da177e4
LT
480 goto segfault;
481
482 /* Avoid ERESTART handling */
483 PT_REGS_SYSCALL_NR(&current->thread.regs) = -1;
5d86456d 484 return PT_REGS_SYSCALL_RET(&current->thread.regs);
1da177e4
LT
485
486 segfault:
487 force_sig(SIGSEGV, current);
488 return 0;
489}
490
f67aa2ff
AV
491#else
492
493struct rt_sigframe
494{
495 char __user *pretcode;
496 struct ucontext uc;
497 struct siginfo info;
498 struct _fpstate fpstate;
499};
500
307627ee
RW
501int setup_signal_stack_si(unsigned long stack_top, struct ksignal *ksig,
502 struct pt_regs *regs, sigset_t *set)
f67aa2ff
AV
503{
504 struct rt_sigframe __user *frame;
307627ee 505 int err = 0, sig = ksig->sig;
8090bfd2 506 unsigned long fp_to;
f67aa2ff
AV
507
508 frame = (struct rt_sigframe __user *)
509 round_down(stack_top - sizeof(struct rt_sigframe), 16);
510 /* Subtract 128 for a red zone and 8 for proper alignment */
511 frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128 - 8);
512
513 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
514 goto out;
515
307627ee
RW
516 if (ksig->ka.sa.sa_flags & SA_SIGINFO) {
517 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
f67aa2ff
AV
518 if (err)
519 goto out;
520 }
521
522 /* Create the ucontext. */
523 err |= __put_user(0, &frame->uc.uc_flags);
524 err |= __put_user(0, &frame->uc.uc_link);
c40702c4 525 err |= __save_altstack(&frame->uc.uc_stack, PT_REGS_SP(regs));
f67aa2ff
AV
526 err |= copy_sc_to_user(&frame->uc.uc_mcontext, &frame->fpstate, regs,
527 set->sig[0]);
8090bfd2
RW
528
529 fp_to = (unsigned long)&frame->fpstate;
530
531 err |= __put_user(fp_to, &frame->uc.uc_mcontext.fpstate);
f67aa2ff 532 if (sizeof(*set) == 16) {
ffc51be8
AV
533 err |= __put_user(set->sig[0], &frame->uc.uc_sigmask.sig[0]);
534 err |= __put_user(set->sig[1], &frame->uc.uc_sigmask.sig[1]);
f67aa2ff
AV
535 }
536 else
537 err |= __copy_to_user(&frame->uc.uc_sigmask, set,
538 sizeof(*set));
539
540 /*
541 * Set up to return from userspace. If provided, use a stub
542 * already in userspace.
543 */
544 /* x86-64 should always use SA_RESTORER. */
307627ee 545 if (ksig->ka.sa.sa_flags & SA_RESTORER)
6c684465
RW
546 err |= __put_user((void *)ksig->ka.sa.sa_restorer,
547 &frame->pretcode);
f67aa2ff
AV
548 else
549 /* could use a vstub here */
550 return err;
551
552 if (err)
553 return err;
554
f67aa2ff 555 PT_REGS_SP(regs) = (unsigned long) frame;
243412be 556 PT_REGS_DI(regs) = sig;
f67aa2ff 557 /* In case the signal handler was declared without prototypes */
243412be 558 PT_REGS_AX(regs) = 0;
f67aa2ff
AV
559
560 /*
561 * This also works for non SA_SIGINFO handlers because they expect the
562 * next argument after the signal number on the stack.
563 */
243412be
AV
564 PT_REGS_SI(regs) = (unsigned long) &frame->info;
565 PT_REGS_DX(regs) = (unsigned long) &frame->uc;
307627ee 566 PT_REGS_IP(regs) = (unsigned long) ksig->ka.sa.sa_handler;
f67aa2ff
AV
567 out:
568 return err;
569}
570#endif
571
3fe26fa3 572long sys_rt_sigreturn(void)
1da177e4 573{
4d338e1a 574 unsigned long sp = PT_REGS_SP(&current->thread.regs);
ba180fd4 575 struct rt_sigframe __user *frame =
f67aa2ff 576 (struct rt_sigframe __user *)(sp - sizeof(long));
1da177e4 577 struct ucontext __user *uc = &frame->uc;
f67aa2ff 578 sigset_t set;
1da177e4 579
f67aa2ff 580 if (copy_from_user(&set, &uc->uc_sigmask, sizeof(set)))
1da177e4
LT
581 goto segfault;
582
78722a44 583 set_current_blocked(&set);
1da177e4 584
ba180fd4 585 if (copy_sc_from_user(&current->thread.regs, &uc->uc_mcontext))
1da177e4
LT
586 goto segfault;
587
588 /* Avoid ERESTART handling */
589 PT_REGS_SYSCALL_NR(&current->thread.regs) = -1;
5d86456d 590 return PT_REGS_SYSCALL_RET(&current->thread.regs);
1da177e4
LT
591
592 segfault:
593 force_sig(SIGSEGV, current);
594 return 0;
595}
This page took 0.774885 seconds and 5 git commands to generate.