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
6de920eb
Commit
6de920eb
authored
Sep 17, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: sanity check PC and SP before preloading them
parent
5c94b473
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
arch/ppc64/kernel/stab.c
arch/ppc64/kernel/stab.c
+10
-6
No files found.
arch/ppc64/kernel/stab.c
View file @
6de920eb
...
...
@@ -303,11 +303,13 @@ unsigned long ppc64_stab_preload = 1;
*/
static
void
preload_stab
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
if
(
ppc64_preload_all_segments
&&
test_tsk_thread_flag
(
tsk
,
TIF_32BIT
))
{
if
(
ppc64_preload_all_segments
&&
test_tsk_thread_flag
(
tsk
,
TIF_32BIT
))
{
unsigned
long
esid
,
vsid
;
for
(
esid
=
0
;
esid
<
16
;
esid
++
)
{
vsid
=
get_vsid
(
mm
->
context
,
esid
<<
SID_SHIFT
);
unsigned
long
ea
=
esid
<<
SID_SHIFT
;
vsid
=
get_vsid
(
mm
->
context
,
ea
);
__ste_allocate
(
esid
,
vsid
,
0
);
}
}
else
{
...
...
@@ -318,15 +320,17 @@ static void preload_stab(struct task_struct *tsk, struct mm_struct *mm)
unsigned
long
vsid
;
if
(
pc
)
{
if
(
REGION_ID
(
pc
)
>=
KERNEL_REGION_ID
)
BUG
();
if
(
!
IS_VALID_EA
(
pc
)
||
(
REGION_ID
(
pc
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
pc
);
__ste_allocate
(
GET_ESID
(
pc
),
vsid
,
0
);
}
if
(
stack
&&
(
pc_segment
!=
stack_segment
))
{
if
(
REGION_ID
(
stack
)
>=
KERNEL_REGION_ID
)
BUG
();
if
(
!
IS_VALID_EA
(
stack
)
||
(
REGION_ID
(
stack
)
>=
KERNEL_REGION_ID
))
return
;
vsid
=
get_vsid
(
mm
->
context
,
stack
);
__ste_allocate
(
GET_ESID
(
stack
),
vsid
,
0
);
}
...
...
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