Re: [PATCH v8 30/33] x86/fred: allow dynamic stack frame size

From: Thomas Gleixner
Date: Mon Jun 05 2023 - 10:13:48 EST


On Mon, Apr 10 2023 at 01:14, Xin Li wrote:
> A FRED stack frame could contain different amount of information for
> different event types, or perhaps even for different instances of the
> same event type. Thus we need to eliminate the need of any advance
> information of the stack frame size to allow dynamic stack frame size.
>
> Implement it through:
> 1) add a new field user_pt_regs to thread_info, and initialize it
> with a pointer to a virtual pt_regs structure at the top of a
> thread stack.
> 2) save a pointer to the user-space pt_regs structure created by
> fred_entrypoint_user() to user_pt_regs in fred_entry_from_user().
> 3) initialize the init_thread_info's user_pt_regs with a pointer to
> a virtual pt_regs structure at the top of init stack.
>
> This approach also works for IDT, thus we unify the code.

And thereby remove the useful comment and replace it with an
undocumented macro mess.

I'm simply refusing to review this. It's not my job to understand this
undocumented hackery.

Thanks,

tglx