* Ingo Molnar <mi...@kernel.org> wrote:

> 
> * Linus Torvalds <torva...@linux-foundation.org> wrote:
> 
> > On Aug 6, 2015 10:15 AM, "Ingo Molnar" <mi...@kernel.org> wrote:
> > >
> > > What sense does it make to have a blob we don't know the exact layout of? 
> > > How 
> > > will debuggers or user-space in general be able to print (and change) the 
> > > register values if they don't know the layout?
> > 
> > The usage model is that you only use this for saving and restoring state.
> > 
> > If you look at the state, you restore the state and then you look at the 
> > registers. You never look at the blob itself.
> 
> So we are relying on the saved structure already in a couple of cases, such 
> as MPX 
> exception handling:
> 
>         /*
>          * We need to look at BNDSTATUS to resolve this exception.
>          * A NULL here might mean that it is in its 'init state',
>          * which is all zeros which indicates MPX was not
>          * responsible for the exception.
>          */
>         bndcsr = get_xsave_field_ptr(XSTATE_BNDCSR);
>         if (!bndcsr)
>                 goto exit_trap;
> 
>         trace_bounds_exception_mpx(bndcsr);
> 
> get_xsave_field_ptr() very much knows about the structure.

Correction:

  get_xsave_field_ptr() users very much know about the structure.

Thanks,

        Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to