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
5576c776
Commit
5576c776
authored
Jul 11, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Implement force_successful_syscall().
parent
4be5bd85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/entry.S
+13
-1
include/asm-sparc64/ptrace.h
include/asm-sparc64/ptrace.h
+2
-0
include/asm-sparc64/thread_info.h
include/asm-sparc64/thread_info.h
+7
-1
No files found.
arch/sparc64/kernel/entry.S
View file @
5576c776
...
@@ -1749,8 +1749,8 @@ ret_sys_call:
...
@@ -1749,8 +1749,8 @@ ret_sys_call:
cmp
%
o0
,
-
ENOIOCTLCMD
cmp
%
o0
,
-
ENOIOCTLCMD
sllx
%
g2
,
32
,
%
g2
sllx
%
g2
,
32
,
%
g2
bgeu
,
pn
%
xcc
,
1
f
bgeu
,
pn
%
xcc
,
1
f
andcc
%
l0
,
_TIF_SYSCALL_TRACE
,
%
l6
andcc
%
l0
,
_TIF_SYSCALL_TRACE
,
%
l6
80
:
andn
%
g3
,
%
g2
,
%
g3
/*
System
call
success
,
clear
Carry
condition
code
.
*/
andn
%
g3
,
%
g2
,
%
g3
/*
System
call
success
,
clear
Carry
condition
code
.
*/
stx
%
g3
,
[%
sp
+
PTREGS_OFF
+
PT_V9_TSTATE
]
stx
%
g3
,
[%
sp
+
PTREGS_OFF
+
PT_V9_TSTATE
]
bne
,
pn
%
icc
,
linux_syscall_trace2
bne
,
pn
%
icc
,
linux_syscall_trace2
...
@@ -1760,9 +1760,21 @@ ret_sys_call:
...
@@ -1760,9 +1760,21 @@ ret_sys_call:
stx
%
l2
,
[%
sp
+
PTREGS_OFF
+
PT_V9_TNPC
]
stx
%
l2
,
[%
sp
+
PTREGS_OFF
+
PT_V9_TNPC
]
1
:
1
:
/
*
Really
a
failure
?
Check
if
force_successful_syscall_return
()
*
was
invoked
.
*/
ldx
[%
curptr
+
TI_FLAGS
],
%
l0
!
Load
andcc
%
l0
,
_TIF_SYSCALL_SUCCESS
,
%
g0
be
,
pt
%
icc
,
1
f
andcc
%
l0
,
_TIF_SYSCALL_TRACE
,
%
l6
andn
%
l0
,
_TIF_SYSCALL_SUCCESS
,
%
l0
ba
,
pt
%
xcc
,
80
b
stx
%
l0
,
[%
curptr
+
TI_FLAGS
]
/
*
System
call
failure
,
set
Carry
condition
code
.
/
*
System
call
failure
,
set
Carry
condition
code
.
*
Also
,
get
abs
(
errno
)
to
return
to
the
process
.
*
Also
,
get
abs
(
errno
)
to
return
to
the
process
.
*/
*/
1
:
sub
%
g0
,
%
o0
,
%
o0
sub
%
g0
,
%
o0
,
%
o0
or
%
g3
,
%
g2
,
%
g3
or
%
g3
,
%
g2
,
%
g3
stx
%
o0
,
[%
sp
+
PTREGS_OFF
+
PT_V9_I0
]
stx
%
o0
,
[%
sp
+
PTREGS_OFF
+
PT_V9_I0
]
...
...
include/asm-sparc64/ptrace.h
View file @
5576c776
...
@@ -94,6 +94,8 @@ struct sparc_trapf {
...
@@ -94,6 +94,8 @@ struct sparc_trapf {
#define STACKFRAME32_SZ sizeof(struct sparc_stackf32)
#define STACKFRAME32_SZ sizeof(struct sparc_stackf32)
#ifdef __KERNEL__
#ifdef __KERNEL__
#define force_successful_syscall_return() \
set_thread_flag(TIF_SYSCALL_SUCCESS)
#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
#define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
#define instruction_pointer(regs) ((regs)->tpc)
#define instruction_pointer(regs) ((regs)->tpc)
extern
void
show_regs
(
struct
pt_regs
*
);
extern
void
show_regs
(
struct
pt_regs
*
);
...
...
include/asm-sparc64/thread_info.h
View file @
5576c776
...
@@ -205,7 +205,12 @@ register struct thread_info *current_thread_info_reg asm("g6");
...
@@ -205,7 +205,12 @@ register struct thread_info *current_thread_info_reg asm("g6");
#define TIF_BLKCOMMIT 9
/* use ASI_BLK_COMMIT_* in copy_user_page */
#define TIF_BLKCOMMIT 9
/* use ASI_BLK_COMMIT_* in copy_user_page */
#define TIF_POLLING_NRFLAG 10
#define TIF_POLLING_NRFLAG 10
#define TIF_ABI_PENDING 11
#define TIF_SYSCALL_SUCCESS 11
/* NOTE: Thread flags >= 12 should be ones we have no interest
* in using in assembly, else we can't use the mask as
* an immediate value in instructions such as andcc.
*/
#define TIF_ABI_PENDING 12
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
...
@@ -219,6 +224,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
...
@@ -219,6 +224,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
#define _TIF_BLKCOMMIT (1<<TIF_BLKCOMMIT)
#define _TIF_BLKCOMMIT (1<<TIF_BLKCOMMIT)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_SYSCALL_SUCCESS (1<<TIF_SYSCALL_SUCCESS)
#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
#define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
(_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \
...
...
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