~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sparc/kernel/syscalls.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/sparc/kernel/syscalls.S (Version linux-6.12-rc7) and /arch/sparc/kernel/syscalls.S (Version linux-4.14.336)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2         /* SunOS's execv() call only specifies      2         /* SunOS's execv() call only specifies the argv argument, the
  3          * environment settings are the same a      3          * environment settings are the same as the calling processes.
  4          */                                         4          */
  5 sys64_execve:                                       5 sys64_execve:
  6         set     sys_execve, %g1                     6         set     sys_execve, %g1
  7         jmpl    %g1, %g0                            7         jmpl    %g1, %g0
  8          flushw                                     8          flushw
  9                                                     9 
 10 sys64_execveat:                                    10 sys64_execveat:
 11         set     sys_execveat, %g1                  11         set     sys_execveat, %g1
 12         jmpl    %g1, %g0                           12         jmpl    %g1, %g0
 13          flushw                                    13          flushw
 14                                                    14 
 15 #ifdef CONFIG_COMPAT                               15 #ifdef CONFIG_COMPAT
 16 sunos_execv:                                       16 sunos_execv:
 17         mov     %g0, %o2                           17         mov     %g0, %o2
 18 sys32_execve:                                      18 sys32_execve:
 19         set     compat_sys_execve, %g1             19         set     compat_sys_execve, %g1
 20         jmpl    %g1, %g0                           20         jmpl    %g1, %g0
 21          flushw                                    21          flushw
 22                                                    22 
 23 sys32_execveat:                                    23 sys32_execveat:
 24         set     compat_sys_execveat, %g1           24         set     compat_sys_execveat, %g1
 25         jmpl    %g1, %g0                           25         jmpl    %g1, %g0
 26          flushw                                    26          flushw
 27 #endif                                             27 #endif
 28                                                    28 
 29         .align  32                                 29         .align  32
                                                   >>  30 sys_sparc_pipe:
                                                   >>  31         ba,pt   %xcc, sys_sparc_pipe_real
                                                   >>  32          add    %sp, PTREGS_OFF, %o0
                                                   >>  33 sys_nis_syscall:
                                                   >>  34         ba,pt   %xcc, c_sys_nis_syscall
                                                   >>  35          add    %sp, PTREGS_OFF, %o0
                                                   >>  36 sys_memory_ordering:
                                                   >>  37         ba,pt   %xcc, sparc_memory_ordering
                                                   >>  38          add    %sp, PTREGS_OFF, %o1
 30 #ifdef CONFIG_COMPAT                               39 #ifdef CONFIG_COMPAT
 31 sys32_sigstack:                                    40 sys32_sigstack:
 32         ba,pt   %xcc, do_sys32_sigstack            41         ba,pt   %xcc, do_sys32_sigstack
 33          mov    %i6, %o2                           42          mov    %i6, %o2
 34 #endif                                             43 #endif
 35         .align  32                                 44         .align  32
 36 #ifdef CONFIG_COMPAT                               45 #ifdef CONFIG_COMPAT
 37 sys32_sigreturn:                                   46 sys32_sigreturn:
 38         add     %sp, PTREGS_OFF, %o0               47         add     %sp, PTREGS_OFF, %o0
 39         call    do_sigreturn32                     48         call    do_sigreturn32
 40          add    %o7, 1f-.-4, %o7                   49          add    %o7, 1f-.-4, %o7
 41         nop                                        50         nop
 42 #endif                                             51 #endif
 43 sys_rt_sigreturn:                                  52 sys_rt_sigreturn:
 44         add     %sp, PTREGS_OFF, %o0               53         add     %sp, PTREGS_OFF, %o0
 45         call    do_rt_sigreturn                    54         call    do_rt_sigreturn
 46          add    %o7, 1f-.-4, %o7                   55          add    %o7, 1f-.-4, %o7
 47         nop                                        56         nop
 48 #ifdef CONFIG_COMPAT                               57 #ifdef CONFIG_COMPAT
 49 sys32_rt_sigreturn:                                58 sys32_rt_sigreturn:
 50         add     %sp, PTREGS_OFF, %o0               59         add     %sp, PTREGS_OFF, %o0
 51         call    do_rt_sigreturn32                  60         call    do_rt_sigreturn32
 52          add    %o7, 1f-.-4, %o7                   61          add    %o7, 1f-.-4, %o7
 53         nop                                        62         nop
 54 #endif                                             63 #endif
 55         .align  32                                 64         .align  32
 56 1:      ldx     [%g6 + TI_FLAGS], %l5              65 1:      ldx     [%g6 + TI_FLAGS], %l5
 57         andcc   %l5, (_TIF_SYSCALL_TRACE|_TIF_     66         andcc   %l5, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0
 58         be,pt   %icc, rtrap                        67         be,pt   %icc, rtrap
 59          nop                                       68          nop
 60         call    syscall_trace_leave                69         call    syscall_trace_leave
 61          add    %sp, PTREGS_OFF, %o0               70          add    %sp, PTREGS_OFF, %o0
 62         ba,pt   %xcc, rtrap                        71         ba,pt   %xcc, rtrap
 63          nop                                       72          nop
 64                                                    73 
 65         /* This is how fork() was meant to be      74         /* This is how fork() was meant to be done, 8 instruction entry.
 66          *                                         75          *
 67          * I questioned the following code bri     76          * I questioned the following code briefly, let me clear things
 68          * up so you must not reason on it lik     77          * up so you must not reason on it like I did.
 69          *                                         78          *
 70          * Know the fork_kpsr etc. we use in t     79          * Know the fork_kpsr etc. we use in the sparc32 port?  We don't
 71          * need it here because the only piece     80          * need it here because the only piece of window state we copy to
 72          * the child is the CWP register.  Eve     81          * the child is the CWP register.  Even if the parent sleeps,
 73          * we are safe because we stuck it int     82          * we are safe because we stuck it into pt_regs of the parent
 74          * so it will not change.                  83          * so it will not change.
 75          *                                         84          *
 76          * XXX This raises the question, wheth     85          * XXX This raises the question, whether we can do the same on
 77          * XXX sparc32 to get rid of fork_kpsr     86          * XXX sparc32 to get rid of fork_kpsr _and_ fork_kwim.  The
 78          * XXX answer is yes.  We stick fork_k     87          * XXX answer is yes.  We stick fork_kpsr in UREG_G0 and
 79          * XXX fork_kwim in UREG_G1 (global re     88          * XXX fork_kwim in UREG_G1 (global registers are considered
 80          * XXX volatile across a system call i     89          * XXX volatile across a system call in the sparc ABI I think
 81          * XXX if it isn't we can use regs->y      90          * XXX if it isn't we can use regs->y instead, anyone who depends
 82          * XXX upon the Y register being prese     91          * XXX upon the Y register being preserved across a fork deserves
 83          * XXX to lose).                           92          * XXX to lose).
 84          *                                         93          *
 85          * In fact we should take advantage of     94          * In fact we should take advantage of that fact for other things
 86          * during system calls...                  95          * during system calls...
 87          */                                        96          */
 88         .align  32                                 97         .align  32
 89 sys_vfork:                                     !!  98 sys_vfork: /* Under Linux, vfork and fork are just special cases of clone. */
 90         flushw                                 !!  99         sethi   %hi(0x4000 | 0x0100 | SIGCHLD), %o0
 91         ba,pt   %xcc, sparc_vfork              !! 100         or      %o0, %lo(0x4000 | 0x0100 | SIGCHLD), %o0
 92          add    %sp, PTREGS_OFF, %o0           !! 101         ba,pt   %xcc, sys_clone
 93                                                << 
 94         .align  32                             << 
 95 sys_fork:                                         102 sys_fork:
 96         flushw                                 !! 103          clr    %o1
 97         ba,pt   %xcc, sparc_fork               !! 104         mov     SIGCHLD, %o0
 98          add    %sp, PTREGS_OFF, %o0           << 
 99                                                << 
100         .align  32                             << 
101 sys_clone:                                        105 sys_clone:
102         flushw                                    106         flushw
103         ba,pt   %xcc, sparc_clone              !! 107         movrz   %o1, %fp, %o1
104          add    %sp, PTREGS_OFF, %o0           !! 108         mov     0, %o3
                                                   >> 109         ba,pt   %xcc, sparc_do_fork
                                                   >> 110          add    %sp, PTREGS_OFF, %o2
105                                                   111 
106         .globl  ret_from_fork                     112         .globl  ret_from_fork
107 ret_from_fork:                                    113 ret_from_fork:
108         /* Clear current_thread_info()->new_ch    114         /* Clear current_thread_info()->new_child. */
109         stb     %g0, [%g6 + TI_NEW_CHILD]         115         stb     %g0, [%g6 + TI_NEW_CHILD]
110         call    schedule_tail                     116         call    schedule_tail
111          mov    %g7, %o0                          117          mov    %g7, %o0
112         ldx     [%sp + PTREGS_OFF + PT_V9_I0],    118         ldx     [%sp + PTREGS_OFF + PT_V9_I0], %o0
113         brnz,pt %o0, ret_sys_call                 119         brnz,pt %o0, ret_sys_call
114          ldx    [%g6 + TI_FLAGS], %l0             120          ldx    [%g6 + TI_FLAGS], %l0
115         ldx     [%sp + PTREGS_OFF + PT_V9_G1],    121         ldx     [%sp + PTREGS_OFF + PT_V9_G1], %l1
116         call    %l1                               122         call    %l1
117          ldx    [%sp + PTREGS_OFF + PT_V9_G2],    123          ldx    [%sp + PTREGS_OFF + PT_V9_G2], %o0
118         ba,pt   %xcc, ret_sys_call                124         ba,pt   %xcc, ret_sys_call
119          mov    0, %o0                            125          mov    0, %o0
120                                                   126 
121         .globl  sparc_exit_group                  127         .globl  sparc_exit_group
122         .type   sparc_exit_group,#function        128         .type   sparc_exit_group,#function
123 sparc_exit_group:                                 129 sparc_exit_group:
124         sethi   %hi(sys_exit_group), %g7          130         sethi   %hi(sys_exit_group), %g7
125         ba,pt   %xcc, 1f                          131         ba,pt   %xcc, 1f
126          or     %g7, %lo(sys_exit_group), %g7     132          or     %g7, %lo(sys_exit_group), %g7
127         .size   sparc_exit_group,.-sparc_exit_    133         .size   sparc_exit_group,.-sparc_exit_group
128                                                   134 
129         .globl  sparc_exit                        135         .globl  sparc_exit
130         .type   sparc_exit,#function              136         .type   sparc_exit,#function
131 sparc_exit:                                       137 sparc_exit:
132         sethi   %hi(sys_exit), %g7                138         sethi   %hi(sys_exit), %g7
133         or      %g7, %lo(sys_exit), %g7           139         or      %g7, %lo(sys_exit), %g7
134 1:      rdpr    %pstate, %g2                      140 1:      rdpr    %pstate, %g2
135         wrpr    %g2, PSTATE_IE, %pstate           141         wrpr    %g2, PSTATE_IE, %pstate
136         rdpr    %otherwin, %g1                    142         rdpr    %otherwin, %g1
137         rdpr    %cansave, %g3                     143         rdpr    %cansave, %g3
138         add     %g3, %g1, %g3                     144         add     %g3, %g1, %g3
139         wrpr    %g3, 0x0, %cansave                145         wrpr    %g3, 0x0, %cansave
140         wrpr    %g0, 0x0, %otherwin               146         wrpr    %g0, 0x0, %otherwin
141         wrpr    %g2, 0x0, %pstate                 147         wrpr    %g2, 0x0, %pstate
142         jmpl    %g7, %g0                          148         jmpl    %g7, %g0
143          stb    %g0, [%g6 + TI_WSAVED]            149          stb    %g0, [%g6 + TI_WSAVED]
144         .size   sparc_exit,.-sparc_exit           150         .size   sparc_exit,.-sparc_exit
145                                                   151 
146 linux_sparc_ni_syscall:                           152 linux_sparc_ni_syscall:
147         sethi   %hi(sys_ni_syscall), %l7          153         sethi   %hi(sys_ni_syscall), %l7
148         ba,pt   %xcc, 4f                          154         ba,pt   %xcc, 4f
149          or     %l7, %lo(sys_ni_syscall), %l7     155          or     %l7, %lo(sys_ni_syscall), %l7
150                                                   156 
151 linux_syscall_trace32:                            157 linux_syscall_trace32:
152         call    syscall_trace_enter               158         call    syscall_trace_enter
153          add    %sp, PTREGS_OFF, %o0              159          add    %sp, PTREGS_OFF, %o0
154         brnz,pn %o0, 3f                           160         brnz,pn %o0, 3f
155          mov    -ENOSYS, %o0                      161          mov    -ENOSYS, %o0
156                                                   162 
157         /* Syscall tracing can modify the regi    163         /* Syscall tracing can modify the registers.  */
158         ldx     [%sp + PTREGS_OFF + PT_V9_G1],    164         ldx     [%sp + PTREGS_OFF + PT_V9_G1], %g1
159         sethi   %hi(sys_call_table32), %l7        165         sethi   %hi(sys_call_table32), %l7
160         ldx     [%sp + PTREGS_OFF + PT_V9_I0],    166         ldx     [%sp + PTREGS_OFF + PT_V9_I0], %i0
161         or      %l7, %lo(sys_call_table32), %l    167         or      %l7, %lo(sys_call_table32), %l7
162         ldx     [%sp + PTREGS_OFF + PT_V9_I1],    168         ldx     [%sp + PTREGS_OFF + PT_V9_I1], %i1
163         ldx     [%sp + PTREGS_OFF + PT_V9_I2],    169         ldx     [%sp + PTREGS_OFF + PT_V9_I2], %i2
164         ldx     [%sp + PTREGS_OFF + PT_V9_I3],    170         ldx     [%sp + PTREGS_OFF + PT_V9_I3], %i3
165         ldx     [%sp + PTREGS_OFF + PT_V9_I4],    171         ldx     [%sp + PTREGS_OFF + PT_V9_I4], %i4
166         ldx     [%sp + PTREGS_OFF + PT_V9_I5],    172         ldx     [%sp + PTREGS_OFF + PT_V9_I5], %i5
167                                                   173 
168         cmp     %g1, NR_syscalls                  174         cmp     %g1, NR_syscalls
169         bgeu,pn %xcc, 3f                          175         bgeu,pn %xcc, 3f
170          mov    -ENOSYS, %o0                      176          mov    -ENOSYS, %o0
171                                                   177 
172         sll     %g1, 2, %l4                       178         sll     %g1, 2, %l4
173         srl     %i0, 0, %o0                       179         srl     %i0, 0, %o0
174         lduw    [%l7 + %l4], %l7                  180         lduw    [%l7 + %l4], %l7
175         srl     %i4, 0, %o4                       181         srl     %i4, 0, %o4
176         srl     %i1, 0, %o1                       182         srl     %i1, 0, %o1
177         srl     %i2, 0, %o2                       183         srl     %i2, 0, %o2
178         ba,pt   %xcc, 5f                          184         ba,pt   %xcc, 5f
179          srl    %i3, 0, %o3                       185          srl    %i3, 0, %o3
180                                                   186 
181 linux_syscall_trace:                              187 linux_syscall_trace:
182         call    syscall_trace_enter               188         call    syscall_trace_enter
183          add    %sp, PTREGS_OFF, %o0              189          add    %sp, PTREGS_OFF, %o0
184         brnz,pn %o0, 3f                           190         brnz,pn %o0, 3f
185          mov    -ENOSYS, %o0                      191          mov    -ENOSYS, %o0
186                                                   192 
187         /* Syscall tracing can modify the regi    193         /* Syscall tracing can modify the registers.  */
188         ldx     [%sp + PTREGS_OFF + PT_V9_G1],    194         ldx     [%sp + PTREGS_OFF + PT_V9_G1], %g1
189         sethi   %hi(sys_call_table64), %l7        195         sethi   %hi(sys_call_table64), %l7
190         ldx     [%sp + PTREGS_OFF + PT_V9_I0],    196         ldx     [%sp + PTREGS_OFF + PT_V9_I0], %i0
191         or      %l7, %lo(sys_call_table64), %l    197         or      %l7, %lo(sys_call_table64), %l7
192         ldx     [%sp + PTREGS_OFF + PT_V9_I1],    198         ldx     [%sp + PTREGS_OFF + PT_V9_I1], %i1
193         ldx     [%sp + PTREGS_OFF + PT_V9_I2],    199         ldx     [%sp + PTREGS_OFF + PT_V9_I2], %i2
194         ldx     [%sp + PTREGS_OFF + PT_V9_I3],    200         ldx     [%sp + PTREGS_OFF + PT_V9_I3], %i3
195         ldx     [%sp + PTREGS_OFF + PT_V9_I4],    201         ldx     [%sp + PTREGS_OFF + PT_V9_I4], %i4
196         ldx     [%sp + PTREGS_OFF + PT_V9_I5],    202         ldx     [%sp + PTREGS_OFF + PT_V9_I5], %i5
197                                                   203 
198         cmp     %g1, NR_syscalls                  204         cmp     %g1, NR_syscalls
199         bgeu,pn %xcc, 3f                          205         bgeu,pn %xcc, 3f
200          mov    -ENOSYS, %o0                      206          mov    -ENOSYS, %o0
201                                                   207 
202         sll     %g1, 2, %l4                       208         sll     %g1, 2, %l4
203         mov     %i0, %o0                          209         mov     %i0, %o0
204         lduw    [%l7 + %l4], %l7                  210         lduw    [%l7 + %l4], %l7
205         mov     %i1, %o1                          211         mov     %i1, %o1
206         mov     %i2, %o2                          212         mov     %i2, %o2
207         mov     %i3, %o3                          213         mov     %i3, %o3
208         b,pt    %xcc, 2f                          214         b,pt    %xcc, 2f
209          mov    %i4, %o4                          215          mov    %i4, %o4
210                                                   216 
211                                                   217 
212         /* Linux 32-bit system calls enter her    218         /* Linux 32-bit system calls enter here... */
213         .align  32                                219         .align  32
214         .globl  linux_sparc_syscall32             220         .globl  linux_sparc_syscall32
215 linux_sparc_syscall32:                            221 linux_sparc_syscall32:
216         /* Direct access to user regs, much fa    222         /* Direct access to user regs, much faster. */
217         cmp     %g1, NR_syscalls                  223         cmp     %g1, NR_syscalls                        ! IEU1  Group
218         bgeu,pn %xcc, linux_sparc_ni_syscall      224         bgeu,pn %xcc, linux_sparc_ni_syscall            ! CTI
219          srl    %i0, 0, %o0                       225          srl    %i0, 0, %o0                             ! IEU0
220         sll     %g1, 2, %l4                       226         sll     %g1, 2, %l4                             ! IEU0  Group
221         srl     %i4, 0, %o4                       227         srl     %i4, 0, %o4                             ! IEU1
222         lduw    [%l7 + %l4], %l7                  228         lduw    [%l7 + %l4], %l7                        ! Load
223         srl     %i1, 0, %o1                       229         srl     %i1, 0, %o1                             ! IEU0  Group
224         ldx     [%g6 + TI_FLAGS], %l0             230         ldx     [%g6 + TI_FLAGS], %l0           ! Load
225                                                   231 
226         srl     %i3, 0, %o3                       232         srl     %i3, 0, %o3                             ! IEU0
227         srl     %i2, 0, %o2                       233         srl     %i2, 0, %o2                             ! IEU0  Group
228         andcc   %l0, (_TIF_SYSCALL_TRACE|_TIF_    234         andcc   %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0
229         bne,pn  %icc, linux_syscall_trace32       235         bne,pn  %icc, linux_syscall_trace32             ! CTI
230          mov    %i0, %l5                          236          mov    %i0, %l5                                ! IEU1
231 5:      call    %l7                               237 5:      call    %l7                                     ! CTI   Group brk forced
232          srl    %i5, 0, %o5                       238          srl    %i5, 0, %o5                             ! IEU1
233         ba,pt   %xcc, 3f                          239         ba,pt   %xcc, 3f
234          sra    %o0, 0, %o0                       240          sra    %o0, 0, %o0
235                                                   241 
236         /* Linux native system calls enter her    242         /* Linux native system calls enter here... */
237         .align  32                                243         .align  32
238         .globl  linux_sparc_syscall               244         .globl  linux_sparc_syscall
239 linux_sparc_syscall:                              245 linux_sparc_syscall:
240         /* Direct access to user regs, much fa    246         /* Direct access to user regs, much faster. */
241         cmp     %g1, NR_syscalls                  247         cmp     %g1, NR_syscalls                        ! IEU1  Group
242         bgeu,pn %xcc, linux_sparc_ni_syscall      248         bgeu,pn %xcc, linux_sparc_ni_syscall            ! CTI
243          mov    %i0, %o0                          249          mov    %i0, %o0                                ! IEU0
244         sll     %g1, 2, %l4                       250         sll     %g1, 2, %l4                             ! IEU0  Group
245         mov     %i1, %o1                          251         mov     %i1, %o1                                ! IEU1
246         lduw    [%l7 + %l4], %l7                  252         lduw    [%l7 + %l4], %l7                        ! Load
247 4:      mov     %i2, %o2                          253 4:      mov     %i2, %o2                                ! IEU0  Group
248         ldx     [%g6 + TI_FLAGS], %l0             254         ldx     [%g6 + TI_FLAGS], %l0           ! Load
249                                                   255 
250         mov     %i3, %o3                          256         mov     %i3, %o3                                ! IEU1
251         mov     %i4, %o4                          257         mov     %i4, %o4                                ! IEU0  Group
252         andcc   %l0, (_TIF_SYSCALL_TRACE|_TIF_    258         andcc   %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0
253         bne,pn  %icc, linux_syscall_trace         259         bne,pn  %icc, linux_syscall_trace               ! CTI   Group
254          mov    %i0, %l5                          260          mov    %i0, %l5                                ! IEU0
255 2:      call    %l7                               261 2:      call    %l7                                     ! CTI   Group brk forced
256          mov    %i5, %o5                          262          mov    %i5, %o5                                ! IEU0
257         nop                                       263         nop
258                                                   264 
259 3:      stx     %o0, [%sp + PTREGS_OFF + PT_V9    265 3:      stx     %o0, [%sp + PTREGS_OFF + PT_V9_I0]
260 ret_sys_call:                                     266 ret_sys_call:
261         ldx     [%sp + PTREGS_OFF + PT_V9_TSTA    267         ldx     [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3
262         mov     %ulo(TSTATE_XCARRY | TSTATE_IC    268         mov     %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2
263         sllx    %g2, 32, %g2                      269         sllx    %g2, 32, %g2
264                                                   270 
265         cmp     %o0, -ERESTART_RESTARTBLOCK       271         cmp     %o0, -ERESTART_RESTARTBLOCK
266         bgeu,pn %xcc, 1f                          272         bgeu,pn %xcc, 1f
267          andcc  %l0, (_TIF_SYSCALL_TRACE|_TIF_    273          andcc  %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT|_TIF_SYSCALL_TRACEPOINT|_TIF_NOHZ), %g0
268         ldx     [%sp + PTREGS_OFF + PT_V9_TNPC    274         ldx     [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc
269                                                   275 
270 2:                                                276 2:
271         /* System call success, clear Carry co    277         /* System call success, clear Carry condition code. */
272         andn    %g3, %g2, %g3                     278         andn    %g3, %g2, %g3
273 3:                                                279 3:
274         stx     %g3, [%sp + PTREGS_OFF + PT_V9    280         stx     %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE]  
275         bne,pn  %icc, linux_syscall_trace2        281         bne,pn  %icc, linux_syscall_trace2
276          add    %l1, 0x4, %l2                     282          add    %l1, 0x4, %l2                   ! npc = npc+4
277         stx     %l1, [%sp + PTREGS_OFF + PT_V9    283         stx     %l1, [%sp + PTREGS_OFF + PT_V9_TPC]
278         ba,pt   %xcc, rtrap                       284         ba,pt   %xcc, rtrap
279          stx    %l2, [%sp + PTREGS_OFF + PT_V9    285          stx    %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]
280                                                   286 
281 1:                                                287 1:
282         /* Check if force_successful_syscall_r    288         /* Check if force_successful_syscall_return()
283          * was invoked.                           289          * was invoked.
284          */                                       290          */
285         ldub    [%g6 + TI_SYS_NOERROR], %l2       291         ldub    [%g6 + TI_SYS_NOERROR], %l2
286         brnz,pn %l2, 2b                           292         brnz,pn %l2, 2b
287          ldx    [%sp + PTREGS_OFF + PT_V9_TNPC    293          ldx    [%sp + PTREGS_OFF + PT_V9_TNPC], %l1 ! pc = npc
288         /* System call failure, set Carry cond    294         /* System call failure, set Carry condition code.
289          * Also, get abs(errno) to return to t    295          * Also, get abs(errno) to return to the process.
290          */                                       296          */
291         sub     %g0, %o0, %o0                     297         sub     %g0, %o0, %o0
292         stx     %o0, [%sp + PTREGS_OFF + PT_V9    298         stx     %o0, [%sp + PTREGS_OFF + PT_V9_I0]
293         ba,pt   %xcc, 3b                          299         ba,pt   %xcc, 3b
294          or     %g3, %g2, %g3                     300          or     %g3, %g2, %g3
295                                                   301 
296 linux_syscall_trace2:                             302 linux_syscall_trace2:
297         call    syscall_trace_leave               303         call    syscall_trace_leave
298          add    %sp, PTREGS_OFF, %o0              304          add    %sp, PTREGS_OFF, %o0
299         stx     %l1, [%sp + PTREGS_OFF + PT_V9    305         stx     %l1, [%sp + PTREGS_OFF + PT_V9_TPC]
300         ba,pt   %xcc, rtrap                       306         ba,pt   %xcc, rtrap
301          stx    %l2, [%sp + PTREGS_OFF + PT_V9    307          stx    %l2, [%sp + PTREGS_OFF + PT_V9_TNPC]
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php