• Suresh Siddha's avatar
    x86, xsave: clear the user buffer before doing fxsave/xsave · ed405958
    Suresh Siddha authored
    fxsave/xsave instructions will not touch all the bytes in the
    fxsave/xsave frame. Clear the user buffer before doing fxsave/xsave
    directly to user buffer during the sigcontext setup.
    
    This is essentially needed in the context of xsave(for example,
    some of the fields in the xsave header are not touched by the xsave
    and defined as must be zero).
    
    This will also present uniform and clean context to the user (from
    which user can safely do fxrstor/xrstor).
    Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    ed405958
xsave.c 7.11 KB