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
2e5003f2
Commit
2e5003f2
authored
Jul 01, 2003
by
Martin Schwidefsky
Committed by
Linus Torvalds
Jul 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] s390: ptrace.
Fix ptrace system call number replacement code.
parent
a214c047
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
arch/s390/kernel/entry.S
arch/s390/kernel/entry.S
+4
-2
arch/s390/kernel/entry64.S
arch/s390/kernel/entry64.S
+12
-10
No files found.
arch/s390/kernel/entry.S
View file @
2e5003f2
...
...
@@ -267,7 +267,7 @@ sysc_tracesys:
st
%
r7
,
SP_R2
(%
r15
)
basr
%
r14
,%
r1
clc
SP_R2
(
4
,%
r15
),
BASED
(
.
Lnr_syscalls
)
b
l
BASED
(
sysc_trace
go
)
b
nl
BASED
(
sysc_traceno
go
)
l
%
r7
,
SP_R2
(%
r15
)
#
strace
might
have
changed
the
sll
%
r7
,
2
#
system
call
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
...
...
@@ -276,6 +276,7 @@ sysc_tracego:
l
%
r2
,
SP_ORIG_R2
(%
r15
)
basr
%
r14
,%
r8
#
call
sys_xxx
st
%
r2
,
SP_R2
(%
r15
)
#
store
return
value
sysc_tracenogo
:
tm
__TI_flags
+
3
(%
r9
),
_TIF_SYSCALL_TRACE
bno
BASED
(
sysc_return
)
l
%
r1
,
BASED
(
.
Ltrace
)
...
...
@@ -486,7 +487,7 @@ pgm_tracesys:
st
%
r7
,
SP_R2
(%
r15
)
basr
%
r14
,%
r1
clc
SP_R2
(
4
,%
r15
),
BASED
(
.
Lnr_syscalls
)
b
l
BASED
(
pgm_svc_
go
)
b
nl
BASED
(
pgm_svc_no
go
)
l
%
r7
,
SP_R2
(%
r15
)
#
strace
changed
the
syscall
sll
%
r7
,
2
l
%
r8
,
sys_call_table
-
entry_base
(%
r7
,%
r13
)
...
...
@@ -495,6 +496,7 @@ pgm_svc_go:
l
%
r2
,
SP_ORIG_R2
(%
r15
)
basr
%
r14
,%
r8
#
call
sys_xxx
st
%
r2
,
SP_R2
(%
r15
)
#
store
return
value
pgm_svc_nogo
:
tm
__TI_flags
+
3
(%
r9
),
_TIF_SYSCALL_TRACE
bno
BASED
(
pgm_svcret
)
l
%
r1
,
BASED
(
.
Ltrace
)
...
...
arch/s390/kernel/entry64.S
View file @
2e5003f2
...
...
@@ -254,7 +254,7 @@ sysc_tracesys:
brasl
%
r14
,
syscall_trace
larl
%
r1
,
.
Lnr_syscalls
clc
SP_R2
(
8
,%
r15
),
0
(%
r1
)
j
l
sysc_trace
go
j
nl
sysc_traceno
go
lg
%
r7
,
SP_R2
(%
r15
)
#
strace
might
have
changed
the
sll
%
r7
,
2
#
system
call
lgf
%
r8
,
0
(%
r7
,%
r10
)
...
...
@@ -263,6 +263,7 @@ sysc_tracego:
lg
%
r2
,
SP_ORIG_R2
(%
r15
)
basr
%
r14
,%
r8
#
call
sys_xxx
stg
%
r2
,
SP_R2
(%
r15
)
#
store
return
value
sysc_tracenogo
:
tm
__TI_flags
+
7
(%
r9
),
_TIF_SYSCALL_TRACE
jno
sysc_return
larl
%
r14
,
sysc_return
#
return
point
is
sysc_return
...
...
@@ -481,7 +482,7 @@ pgm_per_only:
#
pgm_svcper
:
SAVE_ALL
__LC_SVC_OLD_PSW
,
1
llgh
%
r
8
,
__LC_SVC_INT_CODE
#
get
svc
number
from
lowcore
llgh
%
r
7
,
__LC_SVC_INT_CODE
#
get
svc
number
from
lowcore
stosm
48
(%
r15
),
0x03
#
reenable
interrupts
GET_THREAD_INFO
#
load
pointer
to
task_struct
to
R9
slag
%
r7
,%
r7
,
2
#
*
4
and
test
for
svc
0
...
...
@@ -490,15 +491,15 @@ pgm_svcper:
clg
%
r1
,
.
Lnr_syscalls
-
.
Lconst
(%
r14
)
slag
%
r7
,%
r1
,
2
pgm_svcstd
:
larl
%
r
7
,
sys_call_table
larl
%
r
10
,
sys_call_table
#ifdef CONFIG_S390_SUPPORT
tm
SP_PSW
+
3
(%
r15
),
0x01
#
are
we
running
in
31
bit
mode
?
jo
pgm_svcper_noemu
larl
%
r
7
,
sys_call_table_emu
#
use
31
bit
emulation
system
calls
larl
%
r
10
,
sys_call_table_emu
#
use
31
bit
emulation
system
calls
pgm_svcper_noemu
:
#endif
tm
__TI_flags
+
3
(%
r9
),
_TIF_SYSCALL_TRACE
lgf
%
r8
,
0
(%
r
8
,%
r7
)
#
load
address
of
system
call
routine
lgf
%
r8
,
0
(%
r
7
,%
r10
)
#
load
address
of
system
call
routine
jo
pgm_tracesys
basr
%
r14
,%
r8
#
call
sys_xxxx
stg
%
r2
,
SP_R2
(%
r15
)
#
store
return
value
(
change
R2
on
stack
)
...
...
@@ -522,19 +523,20 @@ pgm_svcper_nosig:
#
call
trace
before
and
after
sys_call
#
pgm_tracesys
:
lgfr
%
r7
,%
r7
srlg
%
r7
,%
r7
,
2
stg
%
r7
,
SP_R2
(%
r15
)
brasl
%
r14
,
syscall_trace
clc
SP_R2
(
8
,%
r15
),
.
Lnr_syscalls
jnl
pgm_svc_go
lg
%
r
2
,
SP_R2
(%
r15
)
sllg
%
r
2
,%
r2
,
3
#
strace
wants
to
change
the
syscall
lgf
%
r8
,
0
(%
r
2
,%
r7
)
jnl
pgm_svc_
no
go
lg
%
r
7
,
SP_R2
(%
r15
)
sllg
%
r
7
,%
r7
,
2
#
strace
wants
to
change
the
syscall
lgf
%
r8
,
0
(%
r
7
,%
r10
)
pgm_svc_go
:
lmg
%
r3
,%
r6
,
SP_R3
(%
r15
)
lg
%
r2
,
SP_ORIG_R2
(%
r15
)
basr
%
r14
,%
r8
#
call
sys_xxx
stg
%
r2
,
SP_R2
(%
r15
)
#
store
return
value
pgm_svc_nogo
:
tm
__TI_flags
+
7
(%
r9
),
_TIF_SYSCALL_TRACE
jno
pgm_svcret
larl
%
r14
,
pgm_svcret
#
return
point
is
sysc_return
...
...
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