Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1cc4805a
Commit
1cc4805a
authored
May 19, 2003
by
Pete Zaitcev
Committed by
David S. Miller
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Fix ptracing of syscalls.
parent
4165cb26
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
51 deletions
+19
-51
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/asm-offsets.c
+0
-2
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+16
-24
arch/sparc/kernel/ptrace.c
arch/sparc/kernel/ptrace.c
+3
-4
arch/sparc/kernel/sclow.S
arch/sparc/kernel/sclow.S
+0
-21
No files found.
arch/sparc/kernel/asm-offsets.c
View file @
1cc4805a
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
int
foo
(
void
)
int
foo
(
void
)
{
{
DEFINE
(
AOFF_task_thread
,
offsetof
(
struct
task_struct
,
thread
));
DEFINE
(
AOFF_task_thread
,
offsetof
(
struct
task_struct
,
thread
));
DEFINE
(
AOFF_task_ptrace
,
offsetof
(
struct
task_struct
,
ptrace
));
DEFINE
(
AOFF_task_blocked
,
offsetof
(
struct
task_struct
,
blocked
));
BLANK
();
BLANK
();
/* XXX This is the stuff for sclow.S, kill it. */
/* XXX This is the stuff for sclow.S, kill it. */
DEFINE
(
AOFF_task_pid
,
offsetof
(
struct
task_struct
,
pid
));
DEFINE
(
AOFF_task_pid
,
offsetof
(
struct
task_struct
,
pid
));
...
...
arch/sparc/kernel/entry.S
View file @
1cc4805a
...
@@ -1246,9 +1246,8 @@ C_LABEL(sys_ptrace):
...
@@ -1246,9 +1246,8 @@ C_LABEL(sys_ptrace):
call
C_LABEL
(
do_ptrace
)
call
C_LABEL
(
do_ptrace
)
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1297,9 +1296,8 @@ C_LABEL(sys_sigpause):
...
@@ -1297,9 +1296,8 @@ C_LABEL(sys_sigpause):
call
C_LABEL
(
do_sigpause
)
call
C_LABEL
(
do_sigpause
)
add
%
sp
,
STACKFRAME_SZ
,
%
o1
add
%
sp
,
STACKFRAME_SZ
,
%
o1
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1316,9 +1314,8 @@ C_LABEL(sys_sigsuspend):
...
@@ -1316,9 +1314,8 @@ C_LABEL(sys_sigsuspend):
call
C_LABEL
(
do_sigsuspend
)
call
C_LABEL
(
do_sigsuspend
)
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1336,9 +1333,8 @@ C_LABEL(sys_rt_sigsuspend):
...
@@ -1336,9 +1333,8 @@ C_LABEL(sys_rt_sigsuspend):
call
C_LABEL
(
do_rt_sigsuspend
)
call
C_LABEL
(
do_rt_sigsuspend
)
add
%
sp
,
STACKFRAME_SZ
,
%
o2
add
%
sp
,
STACKFRAME_SZ
,
%
o2
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1355,9 +1351,8 @@ C_LABEL(sys_sigreturn):
...
@@ -1355,9 +1351,8 @@ C_LABEL(sys_sigreturn):
call
C_LABEL
(
do_sigreturn
)
call
C_LABEL
(
do_sigreturn
)
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1376,9 +1371,8 @@ C_LABEL(sys_rt_sigreturn):
...
@@ -1376,9 +1371,8 @@ C_LABEL(sys_rt_sigreturn):
call
C_LABEL
(
do_rt_sigreturn
)
call
C_LABEL
(
do_rt_sigreturn
)
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
andcc
%
l5
,
0x02
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -1512,10 +1506,9 @@ syscall_is_too_hard:
...
@@ -1512,10 +1506,9 @@ syscall_is_too_hard:
mov
%
i1
,
%
o1
mov
%
i1
,
%
o1
mov
%
i2
,
%
o2
mov
%
i2
,
%
o2
ld
[%
curptr
+
TI_TASK
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
l5
+
AOFF_task_ptrace
],
%
l5
mov
%
i3
,
%
o3
mov
%
i3
,
%
o3
andcc
%
l5
,
0x02
,
%
g0
andcc
%
l5
,
_TIF_SYSCALL_TRACE
,
%
g0
mov
%
i4
,
%
o4
mov
%
i4
,
%
o4
bne
linux_syscall_trace
bne
linux_syscall_trace
mov
%
i0
,
%
l5
mov
%
i0
,
%
l5
...
@@ -1527,13 +1520,12 @@ syscall_is_too_hard:
...
@@ -1527,13 +1520,12 @@ syscall_is_too_hard:
.
globl
C_LABEL
(
ret_sys_call
)
.
globl
C_LABEL
(
ret_sys_call
)
C_LABEL
(
ret_sys_call
):
C_LABEL
(
ret_sys_call
):
ld
[%
curptr
+
TI_TASK
],
%
l6
ld
[%
curptr
+
TI_FLAGS
],
%
l6
ld
[%
l6
+
AOFF_task_ptrace
],
%
l6
cmp
%
o0
,
-
ENOIOCTLCMD
cmp
%
o0
,
-
ENOIOCTLCMD
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
g3
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
g3
set
PSR_C
,
%
g2
set
PSR_C
,
%
g2
bgeu
1
f
bgeu
1
f
andcc
%
l6
,
0x02
,
%
l6
andcc
%
l6
,
_TIF_SYSCALL_TRACE
,
%
g0
/
*
System
call
success
,
clear
Carry
condition
code
.
*/
/
*
System
call
success
,
clear
Carry
condition
code
.
*/
andn
%
g3
,
%
g2
,
%
g3
andn
%
g3
,
%
g2
,
%
g3
...
...
arch/sparc/kernel/ptrace.c
View file @
1cc4805a
...
@@ -521,7 +521,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
...
@@ -521,7 +521,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
addr
=
1
;
addr
=
1
;
case
PTRACE_CONT
:
{
/* restart after signal. */
case
PTRACE_CONT
:
{
/* restart after signal. */
if
(
(
unsigned
long
)
data
>
_NSIG
)
{
if
(
data
>
_NSIG
)
{
pt_error_return
(
regs
,
EIO
);
pt_error_return
(
regs
,
EIO
);
goto
out_tsk
;
goto
out_tsk
;
}
}
...
@@ -545,11 +545,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
...
@@ -545,11 +545,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
child
->
exit_code
=
data
;
child
->
exit_code
=
data
;
#ifdef DEBUG_PTRACE
#ifdef DEBUG_PTRACE
printk
(
"CONT: %s [%d]: set exit_code = %x %
x %x
\n
"
,
child
->
comm
,
printk
(
"CONT: %s [%d]: set exit_code = %x %
lx %lx
\n
"
,
child
->
pid
,
child
->
exit_code
,
child
->
comm
,
child
->
pid
,
child
->
exit_code
,
child
->
thread
.
kregs
->
pc
,
child
->
thread
.
kregs
->
pc
,
child
->
thread
.
kregs
->
npc
);
child
->
thread
.
kregs
->
npc
);
#endif
#endif
wake_up_process
(
child
);
wake_up_process
(
child
);
pt_succ_return
(
regs
,
0
);
pt_succ_return
(
regs
,
0
);
...
...
arch/sparc/kernel/sclow.S
View file @
1cc4805a
...
@@ -67,27 +67,6 @@ LABEL(sunosgdtsize):
...
@@ -67,27 +67,6 @@ LABEL(sunosgdtsize):
mov
256
,
%
i0
mov
256
,
%
i0
CC_AND_RETT
CC_AND_RETT
.
globl
LABEL
(
sunossblock
)
LABEL
(
sunossblock
):
LOAD_CURRENT
(
l4
,
l5
)
ld
[%
l4
+
TI_TASK
],
%
l4
set
-
65793
,
%
l5
and
%
i0
,
%
l5
,
%
l5
ld
[%
l4
+
AOFF_task_blocked
],
%
i0
or
%
i0
,
%
l5
,
%
l5
st
%
l5
,
[%
l4
+
AOFF_task_blocked
]
CC_AND_RETT
.
globl
LABEL
(
sunossmask
)
LABEL
(
sunossmask
):
LOAD_CURRENT
(
l4
,
l5
)
ld
[%
l4
+
TI_TASK
],
%
l4
set
-
65793
,
%
l5
and
%
i0
,
%
l5
,
%
l5
ld
[%
l4
+
AOFF_task_blocked
],
%
i0
st
%
l5
,
[%
l4
+
AOFF_task_blocked
]
CC_AND_RETT
.
globl
LABEL
(
getpagesize
)
.
globl
LABEL
(
getpagesize
)
LABEL
(
getpagesize
):
LABEL
(
getpagesize
):
set
PAGE_SIZE
,
%
i0
set
PAGE_SIZE
,
%
i0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment