Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fpu changes from Ingo Molnar: "There are two main areas of changes: - Rework of the extended FPU state code to robustify the kernel's usage of cpuid provided xstate sizes - and related changes (Dave Hansen)" - math emulation enhancements: new modern FPU instructions support, with testcases, plus cleanups (Denys Vlasnko)" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/fpu: Fixup uninitialized feature_name warning x86/fpu/math-emu: Add support for FISTTP instructions x86/fpu/math-emu, selftests: Add test for FISTTP instructions x86/fpu/math-emu: Add support for FCMOVcc insns x86/fpu/math-emu: Add support for F[U]COMI[P] insns x86/fpu/math-emu: Remove define layer for undocumented opcodes x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns x86/fpu/math-emu: Remove !NO_UNDOC_CODE x86/fpu: Check CPU-provided sizes against struct declarations x86/fpu: Check to ensure increasing-offset xstate offsets x86/fpu: Correct and check XSAVE xstate size calculations x86/fpu: Add C structures for AVX-512 state components x86/fpu: Rework YMM definition x86/fpu/mpx: Rework MPX 'xstate' types x86/fpu: Add xfeature_enabled() helper instead of test_bit() x86/fpu: Remove 'xfeature_nr' x86/fpu: Rework XSTATE_* macros to remove magic '2' x86/fpu: Rename XFEATURES_NR_MAX x86/fpu: Rename XSAVE macros x86/fpu: Remove partial LWP support definitions ...
This commit is contained in:
@@ -237,7 +237,8 @@ bad_opcode:
|
||||
*/
|
||||
siginfo_t *mpx_generate_siginfo(struct pt_regs *regs)
|
||||
{
|
||||
const struct bndreg *bndregs, *bndreg;
|
||||
const struct mpx_bndreg_state *bndregs;
|
||||
const struct mpx_bndreg *bndreg;
|
||||
siginfo_t *info = NULL;
|
||||
struct insn insn;
|
||||
uint8_t bndregno;
|
||||
@@ -258,13 +259,13 @@ siginfo_t *mpx_generate_siginfo(struct pt_regs *regs)
|
||||
goto err_out;
|
||||
}
|
||||
/* get bndregs field from current task's xsave area */
|
||||
bndregs = get_xsave_field_ptr(XSTATE_BNDREGS);
|
||||
bndregs = get_xsave_field_ptr(XFEATURE_MASK_BNDREGS);
|
||||
if (!bndregs) {
|
||||
err = -EINVAL;
|
||||
goto err_out;
|
||||
}
|
||||
/* now go select the individual register in the set of 4 */
|
||||
bndreg = &bndregs[bndregno];
|
||||
bndreg = &bndregs->bndreg[bndregno];
|
||||
|
||||
info = kzalloc(sizeof(*info), GFP_KERNEL);
|
||||
if (!info) {
|
||||
@@ -306,7 +307,7 @@ err_out:
|
||||
|
||||
static __user void *mpx_get_bounds_dir(void)
|
||||
{
|
||||
const struct bndcsr *bndcsr;
|
||||
const struct mpx_bndcsr *bndcsr;
|
||||
|
||||
if (!cpu_feature_enabled(X86_FEATURE_MPX))
|
||||
return MPX_INVALID_BOUNDS_DIR;
|
||||
@@ -315,7 +316,7 @@ static __user void *mpx_get_bounds_dir(void)
|
||||
* The bounds directory pointer is stored in a register
|
||||
* only accessible if we first do an xsave.
|
||||
*/
|
||||
bndcsr = get_xsave_field_ptr(XSTATE_BNDCSR);
|
||||
bndcsr = get_xsave_field_ptr(XFEATURE_MASK_BNDCSR);
|
||||
if (!bndcsr)
|
||||
return MPX_INVALID_BOUNDS_DIR;
|
||||
|
||||
@@ -489,10 +490,10 @@ out_unmap:
|
||||
static int do_mpx_bt_fault(void)
|
||||
{
|
||||
unsigned long bd_entry, bd_base;
|
||||
const struct bndcsr *bndcsr;
|
||||
const struct mpx_bndcsr *bndcsr;
|
||||
struct mm_struct *mm = current->mm;
|
||||
|
||||
bndcsr = get_xsave_field_ptr(XSTATE_BNDCSR);
|
||||
bndcsr = get_xsave_field_ptr(XFEATURE_MASK_BNDCSR);
|
||||
if (!bndcsr)
|
||||
return -EINVAL;
|
||||
/*
|
||||
|
Referens i nytt ärende
Block a user