[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH glibc] Define PC, SP and SYSRETURN for hurd x86_64
From: |
Sergey Bugaev |
Subject: |
Re: [PATCH glibc] Define PC, SP and SYSRETURN for hurd x86_64 |
Date: |
Wed, 15 Feb 2023 09:42:36 +0300 |
On Wed, Feb 15, 2023 at 9:17 AM Flavio Cruz <flaviocruz@gmail.com> wrote:
>
> Moved thread_state.h to x86 directory since we only need to customize
> those 3 definitions.
No, that won't be enough. We also need to customize those
MACHINE_THREAD_STATE_FLAVOR definitions to include the potential new
i386_FSGS_BASE_STATE that we were discussing recently [0].
[0] https://sourceware.org/pipermail/libc-alpha/2023-February/145528.html
I was just looking at this file yesterday and concluded the
MACHINE_THREAD_STATE_FLAVOR / MACHINE_NEW_THREAD_STATE_FLAVOR
abstraction cannot work as is for x86_64, because half of the time
it's used for indeed accessing registers like SP and PC, and other
times it's used to access TLS/TCB. So this needs to be two distinct
definitions, and all the users inside glibc have to be reworked.
So let's please not rush with moving this to x86/
Sergey