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
be13f508
Commit
be13f508
authored
Sep 18, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: fix handling of sigaltstack
parent
279f849b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal.c
+4
-5
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/signal32.c
+8
-3
No files found.
arch/ppc64/kernel/signal.c
View file @
be13f508
...
...
@@ -159,11 +159,10 @@ long sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4, int
}
}
long
sys_sigaltstack
(
const
stack_t
*
uss
,
stack_t
*
uos
s
)
long
sys_sigaltstack
(
const
stack_t
*
uss
,
stack_t
*
uoss
,
unsigned
long
r5
,
unsigned
long
r6
,
unsigned
long
r7
,
unsigned
long
r8
,
struct
pt_regs
*
reg
s
)
{
struct
pt_regs
*
regs
=
(
struct
pt_regs
*
)
&
uss
;
return
do_sigaltstack
(
uss
,
uoss
,
regs
->
gpr
[
1
]);
}
...
...
@@ -250,7 +249,7 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
goto
badframe
;
/* This function sets back the stack flags into
the current task structure. */
sys_sigaltstack
(
&
st
,
NULL
);
sys_sigaltstack
(
&
st
,
NULL
,
0
,
0
,
0
,
0
,
regs
);
return
regs
->
result
;
...
...
arch/ppc64/kernel/signal32.c
View file @
be13f508
...
...
@@ -421,7 +421,6 @@ static void setup_frame32(struct pt_regs *regs, struct sigregs32 *frame,
* siginfo32to64
*/
/*
* This code executes after the rt signal handler in 32 bit mode has
* completed and returned
...
...
@@ -438,6 +437,7 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
sigset_t
set
;
stack_t
st
;
int
i
;
mm_segment_t
old_fs
;
/* Adjust the inputted reg1 to point to the first rt signal frame */
rt_sf
=
(
struct
rt_sigframe_32
*
)(
regs
->
gpr
[
1
]
+
__SIGNAL_FRAMESIZE32
);
...
...
@@ -509,10 +509,15 @@ long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
regs
->
dar
=
0
;
regs
->
dsisr
=
0
;
regs
->
result
=
(
u64
)(
saved_regs
[
PT_RESULT
])
&
0xFFFFFFFF
;
if
(
copy_from_user
(
current
->
thread
.
fpr
,
&
sr
->
fp_regs
,
sizeof
(
sr
->
fp_regs
)))
goto
badframe
;
/* This function sets back the stack flags into
the current task structure. */
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
do_sigaltstack
(
&
st
,
NULL
,
regs
->
gpr
[
1
]);
set_fs
(
old_fs
);
ret
=
regs
->
result
;
return
ret
;
...
...
@@ -1040,7 +1045,7 @@ static void handle_signal32(unsigned long sig, siginfo_t *info,
*/
int
sys32_sigaltstack
(
u32
newstack
,
u32
oldstack
,
int
p3
,
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
int
p4
,
int
p6
,
int
p7
,
struct
pt_regs
*
regs
)
{
stack_t
uss
,
uoss
;
int
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