x86: user_regset_view table fix for ia32 on 64-bit
The user_regset_view table for the 32-bit regsets on the 64-bit build had the wrong sizes for the FP regsets. This bug had no user-visible effect (just on kernel modules using the user_regset interfaces and the like). But the fix is trivial and risk-free. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
afc8534380
commit
1f465f4e47
@@ -1303,6 +1303,9 @@ static const struct user_regset_view user_x86_64_view = {
|
|||||||
#define genregs32_get genregs_get
|
#define genregs32_get genregs_get
|
||||||
#define genregs32_set genregs_set
|
#define genregs32_set genregs_set
|
||||||
|
|
||||||
|
#define user_i387_ia32_struct user_i387_struct
|
||||||
|
#define user32_fxsr_struct user_fxsr_struct
|
||||||
|
|
||||||
#endif /* CONFIG_X86_64 */
|
#endif /* CONFIG_X86_64 */
|
||||||
|
|
||||||
#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
|
#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
|
||||||
@@ -1315,13 +1318,13 @@ static const struct user_regset x86_32_regsets[] = {
|
|||||||
},
|
},
|
||||||
[REGSET_FP] = {
|
[REGSET_FP] = {
|
||||||
.core_note_type = NT_PRFPREG,
|
.core_note_type = NT_PRFPREG,
|
||||||
.n = sizeof(struct user_i387_struct) / sizeof(u32),
|
.n = sizeof(struct user_i387_ia32_struct) / sizeof(u32),
|
||||||
.size = sizeof(u32), .align = sizeof(u32),
|
.size = sizeof(u32), .align = sizeof(u32),
|
||||||
.active = fpregs_active, .get = fpregs_get, .set = fpregs_set
|
.active = fpregs_active, .get = fpregs_get, .set = fpregs_set
|
||||||
},
|
},
|
||||||
[REGSET_XFP] = {
|
[REGSET_XFP] = {
|
||||||
.core_note_type = NT_PRXFPREG,
|
.core_note_type = NT_PRXFPREG,
|
||||||
.n = sizeof(struct user_i387_struct) / sizeof(u32),
|
.n = sizeof(struct user32_fxsr_struct) / sizeof(u32),
|
||||||
.size = sizeof(u32), .align = sizeof(u32),
|
.size = sizeof(u32), .align = sizeof(u32),
|
||||||
.active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set
|
.active = xfpregs_active, .get = xfpregs_get, .set = xfpregs_set
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user