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
3598e9f0
Commit
3598e9f0
authored
Jun 16, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arm: switch to ->regset_get()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3399d90c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
40 deletions
+12
-40
arch/arm/kernel/ptrace.c
arch/arm/kernel/ptrace.c
+12
-40
No files found.
arch/arm/kernel/ptrace.c
View file @
3598e9f0
...
...
@@ -569,14 +569,9 @@ static int ptrace_sethbpregs(struct task_struct *tsk, long num,
static
int
gpr_get
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
,
unsigned
int
pos
,
unsigned
int
count
,
void
*
kbuf
,
void
__user
*
ubuf
)
struct
membuf
to
)
{
struct
pt_regs
*
regs
=
task_pt_regs
(
target
);
return
user_regset_copyout
(
&
pos
,
&
count
,
&
kbuf
,
&
ubuf
,
regs
,
0
,
sizeof
(
*
regs
));
return
membuf_write
(
&
to
,
task_pt_regs
(
target
),
sizeof
(
struct
pt_regs
));
}
static
int
gpr_set
(
struct
task_struct
*
target
,
...
...
@@ -602,12 +597,10 @@ static int gpr_set(struct task_struct *target,
static
int
fpa_get
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
,
unsigned
int
pos
,
unsigned
int
count
,
void
*
kbuf
,
void
__user
*
ubuf
)
struct
membuf
to
)
{
return
user_regset_copyout
(
&
pos
,
&
count
,
&
kbuf
,
&
ubuf
,
&
task_thread_info
(
target
)
->
fpstate
,
0
,
sizeof
(
struct
user_fp
));
return
membuf_write
(
&
to
,
&
task_thread_info
(
target
)
->
fpstate
,
sizeof
(
struct
user_fp
));
}
static
int
fpa_set
(
struct
task_struct
*
target
,
...
...
@@ -642,41 +635,20 @@ static int fpa_set(struct task_struct *target,
* vfp_set() ignores this chunk
*
* 1 word for the FPSCR
*
* The bounds-checking logic built into user_regset_copyout and friends
* means that we can make a simple sequence of calls to map the relevant data
* to/from the specified slice of the user regset structure.
*/
static
int
vfp_get
(
struct
task_struct
*
target
,
const
struct
user_regset
*
regset
,
unsigned
int
pos
,
unsigned
int
count
,
void
*
kbuf
,
void
__user
*
ubuf
)
struct
membuf
to
)
{
int
ret
;
struct
thread_info
*
thread
=
task_thread_info
(
target
);
struct
vfp_hard_struct
const
*
vfp
=
&
thread
->
vfpstate
.
hard
;
const
size_t
user_fpregs_offset
=
offsetof
(
struct
user_vfp
,
fpregs
);
const
size_t
user_fpscr_offset
=
offsetof
(
struct
user_vfp
,
fpscr
);
vfp_sync_hwstate
(
thread
);
ret
=
user_regset_copyout
(
&
pos
,
&
count
,
&
kbuf
,
&
ubuf
,
&
vfp
->
fpregs
,
user_fpregs_offset
,
user_fpregs_offset
+
sizeof
(
vfp
->
fpregs
));
if
(
ret
)
return
ret
;
ret
=
user_regset_copyout_zero
(
&
pos
,
&
count
,
&
kbuf
,
&
ubuf
,
user_fpregs_offset
+
sizeof
(
vfp
->
fpregs
),
user_fpscr_offset
);
if
(
ret
)
return
ret
;
return
user_regset_copyout
(
&
pos
,
&
count
,
&
kbuf
,
&
ubuf
,
&
vfp
->
fpscr
,
user_fpscr_offset
,
user_fpscr_offset
+
sizeof
(
vfp
->
fpscr
));
membuf_write
(
&
to
,
vfp
->
fpregs
,
sizeof
(
vfp
->
fpregs
));
membuf_zero
(
&
to
,
user_fpscr_offset
-
sizeof
(
vfp
->
fpregs
));
return
membuf_store
(
&
to
,
vfp
->
fpscr
);
}
/*
...
...
@@ -739,7 +711,7 @@ static const struct user_regset arm_regsets[] = {
.
n
=
ELF_NGREG
,
.
size
=
sizeof
(
u32
),
.
align
=
sizeof
(
u32
),
.
get
=
gpr_get
,
.
regset_
get
=
gpr_get
,
.
set
=
gpr_set
},
[
REGSET_FPR
]
=
{
...
...
@@ -751,7 +723,7 @@ static const struct user_regset arm_regsets[] = {
.
n
=
sizeof
(
struct
user_fp
)
/
sizeof
(
u32
),
.
size
=
sizeof
(
u32
),
.
align
=
sizeof
(
u32
),
.
get
=
fpa_get
,
.
regset_
get
=
fpa_get
,
.
set
=
fpa_set
},
#ifdef CONFIG_VFP
...
...
@@ -764,7 +736,7 @@ static const struct user_regset arm_regsets[] = {
.
n
=
ARM_VFPREGS_SIZE
/
sizeof
(
u32
),
.
size
=
sizeof
(
u32
),
.
align
=
sizeof
(
u32
),
.
get
=
vfp_get
,
.
regset_
get
=
vfp_get
,
.
set
=
vfp_set
},
#endif
/* CONFIG_VFP */
...
...
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