Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
27abb210
Commit
27abb210
authored
Jun 13, 2023
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying to analyze struct vm_area_struct
parent
1c5e28a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
iov_iter.c
src/lib/iov_iter.c
+14
-3
No files found.
src/lib/iov_iter.c
View file @
27abb210
...
...
@@ -1238,12 +1238,15 @@ ssize_t iov_iter_get_pages_elphel(struct iov_iter *i,
const
struct
page
*
circbuf0_page0
=
phys_to_page
(
circbuf_pa
[
0
]);
size_t
len
;
const
struct
iovec
*
iov
=
i
->
iov
;
// only use first in array - supposed to be a single-element
unsigned
long
addr
=
(
unsigned
long
)
iov
->
iov_base
;
unsigned
long
addr
;
unsigned
long
faddr
=
(
unsigned
long
)
iov
->
iov_base
;
struct
vm_area_struct
*
vm_area
;
// *** Putting temporary address here
struct
page
*
cur_page
=
(
struct
page
*
)
circbuf0_page0
;
pr_debug
(
"circbuf0_page0 = 0x%08x, circbuf0_page0->compound_head=0x%08lx, faddr=0x%08lx, mapcount=%u"
,
\
(
int
)
circbuf0_page0
,
circbuf0_page0
->
compound_head
,
faddr
,
page_mapcount
((
struct
page
*
)
circbuf0_page0
));
addr
=
0
;
pr_debug
(
"circbuf0_page0 = 0x%08x, circbuf0_page0->compound_head=0x%08lx"
,
(
int
)
circbuf0_page0
,
circbuf0_page0
->
compound_head
);
len
=
iov
->
iov_len
+
(
*
start
=
addr
&
(
PAGE_SIZE
-
1
));
// to inlude beginning of the page - for now 0;
if
(
maxsize
>
i
->
count
)
maxsize
=
i
->
count
;
...
...
@@ -1259,7 +1262,15 @@ ssize_t iov_iter_get_pages_elphel(struct iov_iter *i,
pages
[
indx
]
=
cur_page
++
;
}
len
-=
*
start
;
pr_debug
(
"iov_iter_get_pages_elphel()->0x%08x, n=%u, current->mm->map_count=%u"
,
len
,
n
,
current
->
mm
->
map_count
);
pr_debug
(
"iov_iter_get_pages_elphel()->0x%08x, n=%u, current->mm->map_count=%u"
,
\
len
,
n
,
current
->
mm
->
map_count
);
pr_debug
(
"sizeof(struct vm_area_struct)=%d"
,
sizeof
(
struct
vm_area_struct
));
for
(
vm_area
=
current
->
mm
->
mmap
;
vm_area
;
vm_area
=
vm_area
->
vm_next
)
{
if
((
faddr
>=
vm_area
->
vm_start
)
&&
(
faddr
<
vm_area
->
vm_end
))
{
print_hex_dump_bytes
(
""
,
DUMP_PREFIX_OFFSET
,
vm_area
,
sizeof
(
struct
vm_area_struct
));
}
}
return
len
;
}
EXPORT_SYMBOL
(
iov_iter_get_pages_elphel
);
...
...
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