Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
fe9bedf1
Commit
fe9bedf1
authored
10 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: Additional corruption checks in timer list"
parents
f11a8319
1701b048
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/parsers/timerlist.py
+9
-3
9 additions, 3 deletions
linux-ramdump-parser-v2/parsers/timerlist.py
with
9 additions
and
3 deletions
linux-ramdump-parser-v2/parsers/timerlist.py
+
9
−
3
View file @
fe9bedf1
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU General Public License for more details.
import
sys
import
linux_list
import
linux_list
from
print_out
import
print_out_str
from
print_out
import
print_out_str
from
parser_util
import
register_parser
,
RamParser
from
parser_util
import
register_parser
,
RamParser
...
@@ -21,7 +22,7 @@ class TimerList(RamParser) :
...
@@ -21,7 +22,7 @@ class TimerList(RamParser) :
self
.
vectors
=
{
'
tv1
'
:
256
,
'
tv2
'
:
64
,
'
tv3
'
:
64
,
'
tv4
'
:
64
,
'
tv5
'
:
64
}
self
.
vectors
=
{
'
tv1
'
:
256
,
'
tv2
'
:
64
,
'
tv3
'
:
64
,
'
tv4
'
:
64
,
'
tv5
'
:
64
}
self
.
output
=
[]
self
.
output
=
[]
def
timer_list_walker
(
self
,
node
,
index
,
base
):
def
timer_list_walker
(
self
,
node
,
type
,
index
,
base
):
if
node
==
self
.
head
:
if
node
==
self
.
head
:
return
return
...
@@ -33,7 +34,12 @@ class TimerList(RamParser) :
...
@@ -33,7 +34,12 @@ class TimerList(RamParser) :
function
=
self
.
ramdump
.
unwind_lookup
(
self
.
ramdump
.
read_word
(
function_addr
))[
0
]
function
=
self
.
ramdump
.
unwind_lookup
(
self
.
ramdump
.
read_word
(
function_addr
))[
0
]
expires
=
self
.
ramdump
.
read_word
(
expires_addr
)
expires
=
self
.
ramdump
.
read_word
(
expires_addr
)
try
:
data
=
hex
(
self
.
ramdump
.
read_word
(
data_addr
)).
rstrip
(
'
L
'
)
data
=
hex
(
self
.
ramdump
.
read_word
(
data_addr
)).
rstrip
(
'
L
'
)
except
TypeError
:
self
.
output_file
.
write
(
"
+ Corruption detected at index {0} in {1} list, found corrupted value: {2:x}
\n
"
.
format
(
index
,
type
,
data_addr
))
return
timer_base
=
self
.
ramdump
.
read_word
(
timer_base_addr
)
&
~
3
timer_base
=
self
.
ramdump
.
read_word
(
timer_base_addr
)
&
~
3
if
function
==
"
delayed_work_timer_fn
"
:
if
function
==
"
delayed_work_timer_fn
"
:
...
@@ -56,7 +62,7 @@ class TimerList(RamParser) :
...
@@ -56,7 +62,7 @@ class TimerList(RamParser) :
self
.
head
=
index
self
.
head
=
index
node_offset
=
self
.
ramdump
.
field_offset
(
'
struct list_head
'
,
'
next
'
)
node_offset
=
self
.
ramdump
.
field_offset
(
'
struct list_head
'
,
'
next
'
)
timer_list_walker
=
linux_list
.
ListWalker
(
self
.
ramdump
,
index
,
node_offset
)
timer_list_walker
=
linux_list
.
ListWalker
(
self
.
ramdump
,
index
,
node_offset
)
timer_list_walker
.
walk
(
index
,
self
.
timer_list_walker
,
i
,
base
)
timer_list_walker
.
walk
(
index
,
self
.
timer_list_walker
,
type
,
i
,
base
)
def
print_vec
(
self
,
type
):
def
print_vec
(
self
,
type
):
if
len
(
self
.
output
):
if
len
(
self
.
output
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment