mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
0557d64d98
All instances of ->get() in arch/x86 switched; that might or might not be worth splitting up. Notes: * for xstateregs_get() the amount we want to store is determined at the boot time; see init_xstate_size() and update_regset_xstate_info() for details. task->thread.fpu.state.xsave ends with a flexible array member and the amount of data in it depends upon the FPU features supported/enabled. * fpregs_get() writes slightly less than full ->thread.fpu.state.fsave (the last word is not copied); we pass the full size of state.fsave and let membuf_write() trim to the amount declared by regset - __regset_get() will make sure that the space in buffer is no more than that. * copy_xstate_to_user() and its helpers are gone now. * fpregs_soft_get() was getting user_regset_copyout() arguments wrong. Since "x86: x86 user_regset math_emu" back in 2008... I really doubt that it's worth splitting out for -stable, though - you need a 486SX box for that to trigger... [Kevin's braino fix for copy_xstate_to_kernel() essentially duplicated here] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
22 lines
637 B
C
22 lines
637 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* FPU regset handling methods:
|
|
*/
|
|
#ifndef _ASM_X86_FPU_REGSET_H
|
|
#define _ASM_X86_FPU_REGSET_H
|
|
|
|
#include <linux/regset.h>
|
|
|
|
extern user_regset_active_fn regset_fpregs_active, regset_xregset_fpregs_active;
|
|
extern user_regset_get2_fn fpregs_get, xfpregs_get, fpregs_soft_get,
|
|
xstateregs_get;
|
|
extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set,
|
|
xstateregs_set;
|
|
|
|
/*
|
|
* xstateregs_active == regset_fpregs_active. Please refer to the comment
|
|
* at the definition of regset_fpregs_active.
|
|
*/
|
|
#define xstateregs_active regset_fpregs_active
|
|
|
|
#endif /* _ASM_X86_FPU_REGSET_H */
|