.. | .. |
---|
18 | 18 | } |
---|
19 | 19 | |
---|
20 | 20 | static inline void syscall_get_arguments(struct task_struct *tsk, |
---|
21 | | - struct pt_regs *regs, unsigned int i, |
---|
22 | | - unsigned int n, unsigned long *args) |
---|
| 21 | + struct pt_regs *regs, |
---|
| 22 | + unsigned long *args) |
---|
23 | 23 | { |
---|
24 | | - BUG_ON(i); |
---|
| 24 | + args[5] = regs->gr[21]; |
---|
| 25 | + args[4] = regs->gr[22]; |
---|
| 26 | + args[3] = regs->gr[23]; |
---|
| 27 | + args[2] = regs->gr[24]; |
---|
| 28 | + args[1] = regs->gr[25]; |
---|
| 29 | + args[0] = regs->gr[26]; |
---|
| 30 | +} |
---|
25 | 31 | |
---|
26 | | - switch (n) { |
---|
27 | | - case 6: |
---|
28 | | - args[5] = regs->gr[21]; |
---|
29 | | - case 5: |
---|
30 | | - args[4] = regs->gr[22]; |
---|
31 | | - case 4: |
---|
32 | | - args[3] = regs->gr[23]; |
---|
33 | | - case 3: |
---|
34 | | - args[2] = regs->gr[24]; |
---|
35 | | - case 2: |
---|
36 | | - args[1] = regs->gr[25]; |
---|
37 | | - case 1: |
---|
38 | | - args[0] = regs->gr[26]; |
---|
39 | | - case 0: |
---|
40 | | - break; |
---|
41 | | - default: |
---|
42 | | - BUG(); |
---|
43 | | - } |
---|
| 32 | +static inline long syscall_get_error(struct task_struct *task, |
---|
| 33 | + struct pt_regs *regs) |
---|
| 34 | +{ |
---|
| 35 | + unsigned long error = regs->gr[28]; |
---|
| 36 | + return IS_ERR_VALUE(error) ? error : 0; |
---|
44 | 37 | } |
---|
45 | 38 | |
---|
46 | 39 | static inline long syscall_get_return_value(struct task_struct *task, |
---|
.. | .. |
---|
62 | 55 | /* do nothing */ |
---|
63 | 56 | } |
---|
64 | 57 | |
---|
65 | | -static inline int syscall_get_arch(void) |
---|
| 58 | +static inline int syscall_get_arch(struct task_struct *task) |
---|
66 | 59 | { |
---|
67 | 60 | int arch = AUDIT_ARCH_PARISC; |
---|
68 | 61 | #ifdef CONFIG_64BIT |
---|
69 | | - if (!is_compat_task()) |
---|
| 62 | + if (!__is_compat_task(task)) |
---|
70 | 63 | arch = AUDIT_ARCH_PARISC64; |
---|
71 | 64 | #endif |
---|
72 | 65 | return arch; |
---|