Re: [PATCH 2/2] x86,entry: Use PUSH_AND_CLEAR_REGS for compat
From: Lai Jiangshan
Date: Wed Apr 20 2022 - 00:30:00 EST
On Wed, Apr 20, 2022 at 4:53 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> Since the upper regs don't exist for ia32 code, preserving them
> doesn't hurt and it simplifies the code.
In entry_INT80_compat(), the upper regs need to be preserved on the
stack which makes the code identical to the macro idtentry except the
special prolog.
So reusing idtentry simplifiers more.
I don't ask to remove the change to entry_INT80_compat().
But I don't think the change to entry_INT80_compat()
fit the changelog.
I think it is better to split this patch into two.
The first one contains the change to entry_SYSENTER_compat()
and entry_SYSCALL_compat() with current changelog.
The second one contains the change to entry_INT80_compat()
and PUSH_AND_CLEAR_REGS with changelog saying it simplifies
entry_SYSENTER_compat().
My patchset can do the simplification by using idtentry
and remove save_rdi from PUSH_AND_CLEAR_REGS on top of it.
Thanks
Lai