[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AC974749-2246-4F2C-96CC-B2CACE054C2E@zytor.com>
Date: Wed, 29 Oct 2025 07:36:17 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Brian Gerst <brgerst@...il.com>
CC: "Jason A. Donenfeld" <Jason@...c4.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        "Theodore Ts'o" <tytso@....edu>,
        Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
        Xin Li <xin@...or.com>, Andrew Cooper <andrew.cooper3@...rix.com>,
        Andy Lutomirski <luto@...nel.org>, Ard Biesheuvel <ardb@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Ingo Molnar <mingo@...hat.com>, James Morse <james.morse@....com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Josh Poimboeuf <jpoimboe@...nel.org>, Kees Cook <kees@...nel.org>,
        Nam Cao <namcao@...utronix.de>, Oleg Nesterov <oleg@...hat.com>,
        Perry Yuan <perry.yuan@....com>, Thomas Gleixner <tglx@...utronix.de>,
        Thomas Huth <thuth@...hat.com>, Uros Bizjak <ubizjak@...il.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-sgx@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 3/6] x86/entry/vdso32: remove int80_landing_pad
On October 28, 2025 11:54:43 PM PDT, Brian Gerst <brgerst@...il.com> wrote:
>On Sun, Oct 26, 2025 at 6:12 PM H. Peter Anvin <hpa@...or.com> wrote:
>>
>> There is no fundamental reason for the int80_landing_pad symbol. If ip
>> falls within the vdso, and the vdso is moved, we should change the ip
>> accordingly, regardless of mode or location within the vdso. This
>> *currently* can only happen on 32 bits, but there isn't any reason not
>> to do so generically.
>>
>> Note that if this is ever possible from a vdso-internal call, then the
>> user space stack will also needed to be adjusted (as well as the
>> shadow stack, if enabled.) Fortunately this is not currently the case.
>>
>> At the moment, we don't even consider other threads when moving the
>> vdso. The assumption is that it is only used by process freeze/thaw
>> for migration, where this is not an issue.
>>
>> Signed-off-by: H. Peter Anvin (Intel) <hpa@...or.com>
>> ---
>>  arch/x86/entry/vdso/vdso32/system_call.S |  1 -
>>  arch/x86/entry/vdso/vma.c                | 16 ++++++----------
>>  arch/x86/tools/vdso2c.c                  |  1 -
>>  3 files changed, 6 insertions(+), 12 deletions(-)
>>
>> diff --git a/arch/x86/entry/vdso/vdso32/system_call.S b/arch/x86/entry/vdso/vdso32/system_call.S
>> index 2a15634bbe75..d14eca4403c5 100644
>> --- a/arch/x86/entry/vdso/vdso32/system_call.S
>> +++ b/arch/x86/entry/vdso/vdso32/system_call.S
>> @@ -62,7 +62,6 @@ __kernel_vsyscall:
>>
>>         /* Enter using int $0x80 */
>>         int     $0x80
>> -SYM_INNER_LABEL(int80_landing_pad, SYM_L_GLOBAL)
>
>This is still needed by do_fast_syscall_32().
>
>
>Brian Gerst
>
Yeah, that was a complete brainfart on my part. I'm already reworking the patchset, fixing this and adding more improvements. 
Powered by blists - more mailing lists
 
