Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
e8ffc831
Commit
e8ffc831
authored
Jul 04, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: validate SMEM address on ioctl
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
1d721161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
mockturtle-core.c
software/kernel/mockturtle-core.c
+2
-0
No files found.
software/kernel/mockturtle-core.c
View file @
e8ffc831
...
...
@@ -225,6 +225,8 @@ static long trtl_ioctl_io(struct trtl_dev *trtl, void __user *uarg)
err
=
copy_from_user
(
&
io
,
uarg
,
sizeof
(
struct
trtl_smem_io
));
if
(
err
)
return
err
;
if
(
io
.
addr
>=
trtl
->
cfgrom
.
smem_size
*
4
)
return
-
EINVAL
;
if
(
io
.
is_input
)
{
/* read */
...
...
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