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
nexedi
linux
Commits
ce327e1c
Commit
ce327e1c
authored
Jun 17, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regset: kill user_regset_copyout{,_zero}()
no callers left Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c522401e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
+0
-67
include/linux/regset.h
include/linux/regset.h
+0
-67
No files found.
include/linux/regset.h
View file @
ce327e1c
...
...
@@ -238,44 +238,6 @@ struct user_regset_view {
*/
const
struct
user_regset_view
*
task_user_regset_view
(
struct
task_struct
*
tsk
);
/*
* These are helpers for writing regset get/set functions in arch code.
* Because @start_pos and @end_pos are always compile-time constants,
* these are inlined into very little code though they look large.
*
* Use one or more calls sequentially for each chunk of regset data stored
* contiguously in memory. Call with constants for @start_pos and @end_pos,
* giving the range of byte positions in the regset that data corresponds
* to; @end_pos can be -1 if this chunk is at the end of the regset layout.
* Each call updates the arguments to point past its chunk.
*/
static
inline
int
user_regset_copyout
(
unsigned
int
*
pos
,
unsigned
int
*
count
,
void
**
kbuf
,
void
__user
**
ubuf
,
const
void
*
data
,
const
int
start_pos
,
const
int
end_pos
)
{
if
(
*
count
==
0
)
return
0
;
BUG_ON
(
*
pos
<
start_pos
);
if
(
end_pos
<
0
||
*
pos
<
end_pos
)
{
unsigned
int
copy
=
(
end_pos
<
0
?
*
count
:
min
(
*
count
,
end_pos
-
*
pos
));
data
+=
*
pos
-
start_pos
;
if
(
*
kbuf
)
{
memcpy
(
*
kbuf
,
data
,
copy
);
*
kbuf
+=
copy
;
}
else
if
(
__copy_to_user
(
*
ubuf
,
data
,
copy
))
return
-
EFAULT
;
else
*
ubuf
+=
copy
;
*
pos
+=
copy
;
*
count
-=
copy
;
}
return
0
;
}
static
inline
int
user_regset_copyin
(
unsigned
int
*
pos
,
unsigned
int
*
count
,
const
void
**
kbuf
,
const
void
__user
**
ubuf
,
void
*
data
,
...
...
@@ -301,35 +263,6 @@ static inline int user_regset_copyin(unsigned int *pos, unsigned int *count,
return
0
;
}
/*
* These two parallel the two above, but for portions of a regset layout
* that always read as all-zero or for which writes are ignored.
*/
static
inline
int
user_regset_copyout_zero
(
unsigned
int
*
pos
,
unsigned
int
*
count
,
void
**
kbuf
,
void
__user
**
ubuf
,
const
int
start_pos
,
const
int
end_pos
)
{
if
(
*
count
==
0
)
return
0
;
BUG_ON
(
*
pos
<
start_pos
);
if
(
end_pos
<
0
||
*
pos
<
end_pos
)
{
unsigned
int
copy
=
(
end_pos
<
0
?
*
count
:
min
(
*
count
,
end_pos
-
*
pos
));
if
(
*
kbuf
)
{
memset
(
*
kbuf
,
0
,
copy
);
*
kbuf
+=
copy
;
}
else
if
(
clear_user
(
*
ubuf
,
copy
))
return
-
EFAULT
;
else
*
ubuf
+=
copy
;
*
pos
+=
copy
;
*
count
-=
copy
;
}
return
0
;
}
static
inline
int
user_regset_copyin_ignore
(
unsigned
int
*
pos
,
unsigned
int
*
count
,
const
void
**
kbuf
,
...
...
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