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
nexedi
linux
Commits
f5110cae
Commit
f5110cae
authored
Mar 26, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Patch by Andreas Schwab to fix sys32_ptrace().
parent
f3b19a5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
arch/ia64/ia32/sys_ia32.c
arch/ia64/ia32/sys_ia32.c
+12
-13
No files found.
arch/ia64/ia32/sys_ia32.c
View file @
f5110cae
...
...
@@ -2852,26 +2852,23 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
ret
=
-
ESRCH
;
read_lock
(
&
tasklist_lock
);
child
=
find_task_by_pid
(
pid
);
if
(
child
)
get_task_struct
(
child
);
read_unlock
(
&
tasklist_lock
);
if
(
!
child
)
goto
out
;
ret
=
-
EPERM
;
if
(
pid
==
1
)
/* no messing around with init! */
goto
out
;
goto
out
_tsk
;
if
(
request
==
PTRACE_ATTACH
)
{
ret
=
sys_ptrace
(
request
,
pid
,
addr
,
data
,
arg4
,
arg5
,
arg6
,
arg7
,
stack
);
goto
out
;
}
ret
=
-
ESRCH
;
if
(
!
(
child
->
ptrace
&
PT_PTRACED
))
goto
out
;
if
(
child
->
state
!=
TASK_STOPPED
)
{
if
(
request
!=
PTRACE_KILL
)
goto
out
;
goto
out_tsk
;
}
if
(
child
->
parent
!=
current
)
goto
out
;
ret
=
ptrace_check_attach
(
child
,
request
==
PTRACE_KILL
);
if
(
ret
<
0
)
goto
out_tsk
;
switch
(
request
)
{
case
PTRACE_PEEKTEXT
:
...
...
@@ -2881,12 +2878,12 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
ret
=
put_user
(
value
,
(
unsigned
int
*
)
A
(
data
));
else
ret
=
-
EIO
;
goto
out
;
goto
out
_tsk
;
case
PTRACE_POKETEXT
:
case
PTRACE_POKEDATA
:
/* write the word at location addr */
ret
=
ia32_poke
(
regs
,
child
,
addr
,
data
);
goto
out
;
goto
out
_tsk
;
case
PTRACE_PEEKUSR
:
/* read word at addr in USER area */
ret
=
-
EIO
;
...
...
@@ -2961,6 +2958,8 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
break
;
}
out_tsk:
free_task_struct
(
child
);
out:
unlock_kernel
();
return
ret
;
...
...
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