winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
989 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Switch to the kernel stack to abort a thread on ARM64.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: ca79629b3e436c8799281319dd313249bf05b9b5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ca79629b3e436c8799281319dd3132…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 13:57:55 2023 +0100 ntdll: Switch to the kernel stack to abort a thread on ARM64. --- dlls/ntdll/unix/signal_arm64.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 4eda6d2eb88..8bf9fce3948 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -1209,6 +1209,31 @@ __ASM_GLOBAL_FUNC( user_mode_callback_return, "ret" ) +/*********************************************************************** + * user_mode_abort_thread + */ +extern void DECLSPEC_NORETURN user_mode_abort_thread( NTSTATUS status, struct syscall_frame *frame ); +__ASM_GLOBAL_FUNC( user_mode_abort_thread, + "ldr x1, [x1, #0x110]\n\t" /* frame->syscall_cfa */ + "sub x29, x1, #0xc0\n\t" + /* switch to kernel stack */ + "mov sp, x29\n\t" + __ASM_CFI(".cfi_def_cfa 29,0xc0\n\t") + __ASM_CFI(".cfi_offset 29,-0xc0\n\t") + __ASM_CFI(".cfi_offset 30,-0xb8\n\t") + __ASM_CFI(".cfi_offset 19,-0xb0\n\t") + __ASM_CFI(".cfi_offset 20,-0xa8\n\t") + __ASM_CFI(".cfi_offset 21,-0xa0\n\t") + __ASM_CFI(".cfi_offset 22,-0x98\n\t") + __ASM_CFI(".cfi_offset 23,-0x90\n\t") + __ASM_CFI(".cfi_offset 24,-0x88\n\t") + __ASM_CFI(".cfi_offset 25,-0x80\n\t") + __ASM_CFI(".cfi_offset 26,-0x78\n\t") + __ASM_CFI(".cfi_offset 27,-0x70\n\t") + __ASM_CFI(".cfi_offset 28,-0x68\n\t") + "bl " __ASM_NAME("abort_thread") ) + + /*********************************************************************** * KeUserModeCallback */ @@ -1479,6 +1504,7 @@ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) */ static void quit_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { + if (!is_inside_syscall( sigcontext )) user_mode_abort_thread( 0, arm64_thread_data()->syscall_frame ); abort_thread(0); }
1
0
0
0
Alexandre Julliard : ntdll: Switch to the kernel stack to abort a thread on x86-64.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: 3c53d89e6c1f2c7fe16a06a3bb9eec241efba2b9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3c53d89e6c1f2c7fe16a06a3bb9eec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 12:52:43 2023 +0100 ntdll: Switch to the kernel stack to abort a thread on x86-64. --- dlls/ntdll/unix/signal_x86_64.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index e6d2e447e52..36b02b49f49 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -1641,6 +1641,26 @@ __ASM_GLOBAL_FUNC( user_mode_callback_return, "retq" ) +/*********************************************************************** + * user_mode_abort_thread + */ +extern void DECLSPEC_NORETURN user_mode_abort_thread( NTSTATUS status, struct syscall_frame *frame ); +__ASM_GLOBAL_FUNC( user_mode_abort_thread, + "movq 0xa8(%rsi),%rbp\n\t" /* frame->syscall_cfa */ + "subq $0x10,%rbp\n\t" + /* switch to kernel stack */ + "movq %rbp,%rsp\n\t" + __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t") + __ASM_CFI(".cfi_offset %rip,-0x08\n\t") + __ASM_CFI(".cfi_offset %rbp,-0x10\n\t") + __ASM_CFI(".cfi_offset %rbx,-0x18\n\t") + __ASM_CFI(".cfi_offset %r12,-0x20\n\t") + __ASM_CFI(".cfi_offset %r13,-0x28\n\t") + __ASM_CFI(".cfi_offset %r14,-0x30\n\t") + __ASM_CFI(".cfi_offset %r15,-0x38\n\t") + "call " __ASM_NAME("abort_thread") ) + + /*********************************************************************** * KeUserModeCallback */ @@ -2098,10 +2118,12 @@ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) * * Handler for SIGQUIT. */ -static void quit_handler( int signal, siginfo_t *siginfo, void *ucontext ) +static void quit_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - init_handler( ucontext ); - abort_thread(0); + ucontext_t *ucontext = init_handler( sigcontext ); + + if (!is_inside_syscall( ucontext )) user_mode_abort_thread( 0, amd64_thread_data()->syscall_frame ); + abort_thread( 0 ); }
1
0
0
0
Alexandre Julliard : ntdll: Switch to the kernel stack to abort a thread on i386.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: e7d8b401151a748f8a8655b769ac0cb36e8d81c0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e7d8b401151a748f8a8655b769ac0c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 12:50:49 2023 +0100 ntdll: Switch to the kernel stack to abort a thread on i386. --- dlls/ntdll/unix/signal_i386.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index e611defc1cb..57a525aaf97 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -1652,6 +1652,27 @@ __ASM_GLOBAL_FUNC( user_mode_callback_return, "ret" ) +/*********************************************************************** + * user_mode_abort_thread + */ +extern void DECLSPEC_NORETURN user_mode_abort_thread( NTSTATUS status, struct syscall_frame *frame ); +__ASM_GLOBAL_FUNC( user_mode_abort_thread, + "movl 8(%esp),%eax\n\t" /* frame */ + "movl 0x38(%eax),%ebp\n\t" /* frame->syscall_cfa */ + "movl 4(%esp),%eax\n\t " /* status */ + "subl $8,%ebp\n\t" + /* switch to kernel stack */ + "leal -16(%ebp),%esp\n\t" + __ASM_CFI(".cfi_def_cfa %ebp,8\n\t") + __ASM_CFI(".cfi_offset %eip,-4\n\t") + __ASM_CFI(".cfi_offset %ebp,-8\n\t") + __ASM_CFI(".cfi_offset %ebx,-12\n\t") + __ASM_CFI(".cfi_offset %esi,-16\n\t") + __ASM_CFI(".cfi_offset %edi,-20\n\t") + "movl %eax,(%esp)\n\t" /* status */ + "call " __ASM_NAME("abort_thread") ) + + /*********************************************************************** * KeUserModeCallback */ @@ -2061,7 +2082,8 @@ static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext ) static void quit_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { init_handler( sigcontext ); - abort_thread(0); + if (!is_inside_syscall( sigcontext )) user_mode_abort_thread( 0, x86_thread_data()->syscall_frame ); + abort_thread( 0 ); }
1
0
0
0
Alexandre Julliard : ntdll: Connect syscall frames across user callbacks on ARM.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: d80a662bc1ff4cc63e442156eba07052332b8757 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d80a662bc1ff4cc63e442156eba070…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 21 15:49:44 2023 +0100 ntdll: Connect syscall frames across user callbacks on ARM. --- dlls/ntdll/unix/dwarf.h | 36 +++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/signal_arm.c | 45 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 76 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/unix/dwarf.h b/dlls/ntdll/unix/dwarf.h index ef9eabb1d53..8deb845ca13 100644 --- a/dlls/ntdll/unix/dwarf.h +++ b/dlls/ntdll/unix/dwarf.h @@ -1048,6 +1048,42 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state, #define DW_REG_r15 0x0f #define DW_REG_rip 0x10 +#elif defined(__arm__) + +#define DW_OP_r0 DW_OP_breg0 +#define DW_OP_r1 DW_OP_breg1 +#define DW_OP_r2 DW_OP_breg2 +#define DW_OP_r3 DW_OP_breg3 +#define DW_OP_r4 DW_OP_breg4 +#define DW_OP_r5 DW_OP_breg5 +#define DW_OP_r6 DW_OP_breg6 +#define DW_OP_r7 DW_OP_breg7 +#define DW_OP_r8 DW_OP_breg8 +#define DW_OP_r9 DW_OP_breg9 +#define DW_OP_r10 DW_OP_breg10 +#define DW_OP_r11 DW_OP_breg11 +#define DW_OP_r12 DW_OP_breg12 +#define DW_OP_sp DW_OP_breg13 +#define DW_OP_lr DW_OP_breg14 +#define DW_OP_pc DW_OP_breg15 + +#define DW_REG_r0 0 +#define DW_REG_r1 1 +#define DW_REG_r2 2 +#define DW_REG_r3 3 +#define DW_REG_r4 4 +#define DW_REG_r5 5 +#define DW_REG_r6 6 +#define DW_REG_r7 7 +#define DW_REG_r8 8 +#define DW_REG_r9 9 +#define DW_REG_r10 10 +#define DW_REG_r11 11 +#define DW_REG_r12 12 +#define DW_REG_sp 13 +#define DW_REG_lr 14 +#define DW_REG_pc 15 + #elif defined(__aarch64__) #define DW_OP_x19 DW_OP_breg19 diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 1f0a4fd84b1..b6f4636e3eb 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -70,6 +70,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh); +#define NTDLL_DWARF_H_NO_UNWINDER +#include "dwarf.h" /*********************************************************************** * signal context platform-specific definitions @@ -1023,8 +1025,8 @@ __ASM_GLOBAL_FUNC( raise_func_trampoline, "push {r12,lr}\n\t" /* (Padding +) Pc in the original frame */ "ldr r3, [r1, #0x38]\n\t" /* context->Sp */ "push {r3}\n\t" /* Original Sp */ - __ASM_CFI(".cfi_escape 0x0f,0x03,0x7D,0x04,0x06\n\t") /* CFA, DW_OP_breg13 + 0x04, DW_OP_deref */ - __ASM_CFI(".cfi_escape 0x10,0x0e,0x02,0x7D,0x0c\n\t") /* LR, DW_OP_breg13 + 0x0c */ + __ASM_CFI_CFA_IS_AT1(sp, 0x04) + __ASM_CFI_REG_IS_AT1(lr, sp, 0x0c) __ASM_EHABI(".save {sp}\n\t") __ASM_EHABI(".pad #-12\n\t") __ASM_EHABI(".save {pc}\n\t") @@ -1158,10 +1160,21 @@ extern NTSTATUS call_user_mode_callback( ULONG id, void *args, ULONG len, void * ULONG *ret_len, void *func, TEB *teb ); __ASM_GLOBAL_FUNC( call_user_mode_callback, "push {r4-r12,lr}\n\t" + "add r7, sp, #0x28\n\t" /* syscall_cfa */ + __ASM_CFI(".cfi_def_cfa 7,0\n\t") + __ASM_CFI(".cfi_offset r4,-0x28\n\t") + __ASM_CFI(".cfi_offset r5,-0x24\n\t") + __ASM_CFI(".cfi_offset r6,-0x20\n\t") + __ASM_CFI(".cfi_offset r7,-0x1c\n\t") + __ASM_CFI(".cfi_offset r8,-0x18\n\t") + __ASM_CFI(".cfi_offset r9,-0x14\n\t") + __ASM_CFI(".cfi_offset r10,-0x10\n\t") + __ASM_CFI(".cfi_offset r11,-0x0c\n\t") + __ASM_CFI(".cfi_offset r12,-0x08\n\t") + __ASM_CFI(".cfi_offset lr,-0x04\n\t") "ldr ip, [sp, #0x2c]\n\t" /* func */ "ldr r4, [sp, #0x30]\n\t" /* teb */ "ldr r5, [r4]\n\t" /* teb->Tib.ExceptionList */ - "add r7, sp, #0x28\n\t" /* syscall_cfa */ "push {r3, r5}\n\t" #ifndef __SOFTFP__ "sub sp, sp, #0x90\n\t" @@ -1666,9 +1679,20 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "vstm r0, {d0-d15}\n\t" #endif "mov r6, sp\n\t" + "mov r8, r1\n\t" /* switch to kernel stack */ "mov sp, r1\n\t" - "mov r8, r1\n\t" + __ASM_CFI_CFA_IS_AT2(r8, 0xd0, 0x00) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset r4,-0x28\n\t") + __ASM_CFI(".cfi_offset r5,-0x24\n\t") + __ASM_CFI(".cfi_offset r6,-0x20\n\t") + __ASM_CFI(".cfi_offset r7,-0x1c\n\t") + __ASM_CFI(".cfi_offset r8,-0x18\n\t") + __ASM_CFI(".cfi_offset r9,-0x14\n\t") + __ASM_CFI(".cfi_offset r10,-0x10\n\t") + __ASM_CFI(".cfi_offset r11,-0x0c\n\t") + __ASM_CFI(".cfi_offset r12,-0x08\n\t") + __ASM_CFI(".cfi_offset lr,-0x04\n\t") "ldr r5, [r2, #0x1dc]\n\t" /* arm_thread_data()->syscall_table */ "ubfx r4, ip, #12, #2\n\t" /* syscall table number */ "bfc ip, #12, #20\n\t" /* syscall number */ @@ -1746,11 +1770,22 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "vstm r4, {d0-d15}\n\t" #endif "ldr ip, [r0, r2, lsl #2]\n\t" + "mov r8, r1\n\t" /* switch to kernel stack */ "mov sp, r1\n\t" + __ASM_CFI_CFA_IS_AT2(r8, 0xd0, 0x00) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset r4,-0x28\n\t") + __ASM_CFI(".cfi_offset r5,-0x24\n\t") + __ASM_CFI(".cfi_offset r6,-0x20\n\t") + __ASM_CFI(".cfi_offset r7,-0x1c\n\t") + __ASM_CFI(".cfi_offset r8,-0x18\n\t") + __ASM_CFI(".cfi_offset r9,-0x14\n\t") + __ASM_CFI(".cfi_offset r10,-0x10\n\t") + __ASM_CFI(".cfi_offset r11,-0x0c\n\t") + __ASM_CFI(".cfi_offset r12,-0x08\n\t") + __ASM_CFI(".cfi_offset lr,-0x04\n\t") "mov r0, r3\n\t" /* args */ "blx ip\n" - "mov r8, sp\n\t" "ldr r1, [r8, #0x44]\n\t" /* frame->restore_flags */ "cbnz r1, 1f\n\t" /* switch to user stack */
1
0
0
0
Alexandre Julliard : ntdll: Connect syscall frames across user callbacks on ARM64.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: c74f41e46db51277976f0e95ee46625e9c127f3f URL:
https://gitlab.winehq.org/wine/wine/-/commit/c74f41e46db51277976f0e95ee4662…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 13:53:45 2023 +0100 ntdll: Connect syscall frames across user callbacks on ARM64. --- dlls/ntdll/unix/dwarf.h | 12 ++++++++++++ dlls/ntdll/unix/signal_arm64.c | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/unix/dwarf.h b/dlls/ntdll/unix/dwarf.h index 88c6991747f..ef9eabb1d53 100644 --- a/dlls/ntdll/unix/dwarf.h +++ b/dlls/ntdll/unix/dwarf.h @@ -1050,7 +1050,19 @@ static void apply_frame_state( CONTEXT *context, struct frame_state *state, #elif defined(__aarch64__) +#define DW_OP_x19 DW_OP_breg19 +#define DW_OP_x20 DW_OP_breg20 +#define DW_OP_x21 DW_OP_breg21 +#define DW_OP_x22 DW_OP_breg22 +#define DW_OP_x23 DW_OP_breg23 +#define DW_OP_x24 DW_OP_breg24 +#define DW_OP_x25 DW_OP_breg25 +#define DW_OP_x26 DW_OP_breg26 +#define DW_OP_x27 DW_OP_breg27 #define DW_OP_x28 DW_OP_breg28 +#define DW_OP_x29 DW_OP_breg29 +#define DW_OP_x30 DW_OP_breg30 +#define DW_OP_sp DW_OP_breg31 #define DW_REG_x19 19 #define DW_REG_x20 20 diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index 37a2f9b1d3b..4eda6d2eb88 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -1790,8 +1790,23 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "stp q26, q27, [x10, #0x2d0]\n\t" "stp q28, q29, [x10, #0x2f0]\n\t" "stp q30, q31, [x10, #0x310]\n\t" + "mov x22, x10\n\t" /* switch to kernel stack */ "mov sp, x10\n\t" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT2(x22, 0x98, 0x02) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset 29, -0xc0\n\t") + __ASM_CFI(".cfi_offset 30, -0xb8\n\t") + __ASM_CFI(".cfi_offset 19, -0xb0\n\t") + __ASM_CFI(".cfi_offset 20, -0xa8\n\t") + __ASM_CFI(".cfi_offset 21, -0xa0\n\t") + __ASM_CFI(".cfi_offset 22, -0x98\n\t") + __ASM_CFI(".cfi_offset 23, -0x90\n\t") + __ASM_CFI(".cfi_offset 24, -0x88\n\t") + __ASM_CFI(".cfi_offset 25, -0x80\n\t") + __ASM_CFI(".cfi_offset 26, -0x78\n\t") + __ASM_CFI(".cfi_offset 27, -0x70\n\t") + __ASM_CFI(".cfi_offset 28, -0x68\n\t") "and x20, x8, #0xfff\n\t" /* syscall number */ "ubfx x21, x8, #12, #2\n\t" /* syscall table number */ "adr x16, " __ASM_NAME("KeServiceDescriptorTable") "\n\t" @@ -1799,7 +1814,6 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr x16, [x21, #16]\n\t" /* table->ServiceLimit */ "cmp x20, x16\n\t" "bcs 4f\n\t" - "mov x22, sp\n\t" "ldr x16, [x21, #24]\n\t" /* table->ArgumentTable */ "ldrb w9, [x16, x20]\n\t" "subs x9, x9, #64\n\t" @@ -1815,6 +1829,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr x16, [x16, x20, lsl 3]\n\t" "blr x16\n\t" "mov sp, x22\n" + __ASM_CFI_CFA_IS_AT2(sp, 0x98, 0x02) /* frame->syscall_cfa */ __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "ldr w16, [sp, #0x10c]\n\t" /* frame->restore_flags */ "tbz x16, #1, 2f\n\t" /* CONTEXT_INTEGER */ @@ -1894,14 +1909,30 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "stp x30, x9, [x10, #0xf0]\n\t" "mrs x9, NZCV\n\t" "stp x30, x9, [x10, #0x100]\n\t" + "mov x19, x10\n\t" /* switch to kernel stack */ "mov sp, x10\n\t" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT2(x19, 0x98, 0x02) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset 29, -0xc0\n\t") + __ASM_CFI(".cfi_offset 30, -0xb8\n\t") + __ASM_CFI(".cfi_offset 19, -0xb0\n\t") + __ASM_CFI(".cfi_offset 20, -0xa8\n\t") + __ASM_CFI(".cfi_offset 21, -0xa0\n\t") + __ASM_CFI(".cfi_offset 22, -0x98\n\t") + __ASM_CFI(".cfi_offset 23, -0x90\n\t") + __ASM_CFI(".cfi_offset 24, -0x88\n\t") + __ASM_CFI(".cfi_offset 25, -0x80\n\t") + __ASM_CFI(".cfi_offset 26, -0x78\n\t") + __ASM_CFI(".cfi_offset 27, -0x70\n\t") + __ASM_CFI(".cfi_offset 28, -0x68\n\t") "ldr x16, [x0, x1, lsl 3]\n\t" "mov x0, x2\n\t" /* args */ "blr x16\n\t" "ldr w16, [sp, #0x10c]\n\t" /* frame->restore_flags */ "cbnz w16, " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" - "ldr x18, [sp, #0x90]\n\t" + __ASM_CFI_CFA_IS_AT2(sp, 0x98, 0x02) /* frame->syscall_cfa */ + "ldp x18, x19, [sp, #0x90]\n\t" "ldp x16, x17, [sp, #0xf8]\n\t" /* switch to user stack */ "mov sp, x16\n\t"
1
0
0
0
Rémi Bernon : ntdll: Connect syscall frames across user callbacks on x86-64.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: a5745ba91a1e45ceee759c4a83236b9dd991f99b URL:
https://gitlab.winehq.org/wine/wine/-/commit/a5745ba91a1e45ceee759c4a83236b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Nov 9 16:27:02 2023 +0100 ntdll: Connect syscall frames across user callbacks on x86-64. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52213
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54346
--- dlls/ntdll/unix/signal_x86_64.c | 92 ++++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index e65b123fb7f..e6d2e447e52 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2641,8 +2641,6 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "1:\txsave64 0xc0(%rcx)\n\t" "jmp 3f\n" "2:\tfxsave64 0xc0(%rcx)\n" - /* remember state when $rcx is pointing to "frame" */ - __ASM_CFI(".cfi_remember_state\n\t") "3:\tleaq 0x98(%rcx),%rbp\n\t" __ASM_CFI_CFA_IS_AT1(rbp, 0x70) __ASM_CFI_REG_IS_AT1(rip, rbp, 0x58) @@ -2673,6 +2671,17 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leaq 0x38(%rsp),%rsi\n\t" /* 7th argument */ /* switch to kernel stack */ "movq %rcx,%rsp\n\t" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT1(rbp, 0x10) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset %rip,-0x08\n\t") + __ASM_CFI(".cfi_offset %rbp,-0x10\n\t") + __ASM_CFI(".cfi_offset %rbx,-0x18\n\t") + __ASM_CFI(".cfi_offset %r12,-0x20\n\t") + __ASM_CFI(".cfi_offset %r13,-0x28\n\t") + __ASM_CFI(".cfi_offset %r14,-0x30\n\t") + __ASM_CFI(".cfi_offset %r15,-0x38\n\t") + __ASM_CFI(".cfi_undefined %rdi\n\t") + __ASM_CFI(".cfi_undefined %rsi\n\t") "movq 0x00(%rcx),%rax\n\t" "movq 0x18(%rcx),%r11\n\t" /* 2nd argument */ "movl %eax,%ebx\n\t" @@ -2702,8 +2711,6 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movq (%rbx),%r10\n\t" /* table->ServiceTable */ "callq *(%r10,%rax,8)\n\t" "leaq -0x98(%rbp),%rcx\n\t" - /* $rcx is now pointing to "frame" again */ - __ASM_CFI(".cfi_restore_state\n") __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "movl 0xb4(%rcx),%edx\n\t" /* frame->restore_flags */ #ifdef __linux__ @@ -2736,49 +2743,50 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "jmp 4f\n" "3:\tfxrstor64 0xc0(%rcx)\n" "4:\tmovq 0x98(%rcx),%rbp\n\t" - __ASM_CFI(".cfi_same_value rbp\n\t") + /* push rbp-based kernel stack cfi */ + __ASM_CFI("\t.cfi_remember_state\n") + __ASM_CFI_CFA_IS_AT2(rcx, 0xa8, 0x01) /* frame->syscall_cfa */ "movq 0x68(%rcx),%r15\n\t" - __ASM_CFI(".cfi_same_value r15\n\t") "movq 0x60(%rcx),%r14\n\t" - __ASM_CFI(".cfi_same_value r14\n\t") "movq 0x58(%rcx),%r13\n\t" - __ASM_CFI(".cfi_same_value r13\n\t") "movq 0x50(%rcx),%r12\n\t" - __ASM_CFI(".cfi_same_value r12\n\t") "movq 0x28(%rcx),%rdi\n\t" - __ASM_CFI(".cfi_same_value rdi\n\t") "movq 0x20(%rcx),%rsi\n\t" - __ASM_CFI(".cfi_same_value rsi\n\t") "movq 0x08(%rcx),%rbx\n\t" - __ASM_CFI(".cfi_same_value rbx\n\t") "testl $0x3,%edx\n\t" /* CONTEXT_CONTROL | CONTEXT_INTEGER */ "jnz 1f\n\t" - __ASM_CFI(".cfi_remember_state\n\t") "movq 0x80(%rcx),%r11\n\t" /* frame->eflags */ "pushq %r11\n\t" "popfq\n\t" + /* switch to user stack */ "movq 0x88(%rcx),%rsp\n\t" - __ASM_CFI(".cfi_def_cfa rsp, 0\n\t") + /* push rcx-based kernel stack cfi */ + __ASM_CFI("\t.cfi_remember_state\n") + __ASM_CFI(".cfi_def_cfa %rsp, 0\n\t") + __ASM_CFI_REG_IS_AT2(rip, rcx, 0xf0, 0x00) + __ASM_CFI(".cfi_same_value %rbp\n\t") + __ASM_CFI(".cfi_same_value %rbx\n\t") + __ASM_CFI(".cfi_same_value %r12\n\t") + __ASM_CFI(".cfi_same_value %r13\n\t") + __ASM_CFI(".cfi_same_value %r14\n\t") + __ASM_CFI(".cfi_same_value %r15\n\t") + __ASM_CFI(".cfi_same_value %rdi\n\t") + __ASM_CFI(".cfi_same_value %rsi\n\t") "movq 0x70(%rcx),%rcx\n\t" /* frame->rip */ __ASM_CFI(".cfi_register rip, rcx\n\t") "pushq %rcx\n\t" __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") "ret\n\t" - /* $rcx is now pointing to "frame" again */ - __ASM_CFI(".cfi_restore_state\n\t") - /* remember state when $rcx is pointing to "frame" */ - __ASM_CFI(".cfi_remember_state\n\t") + /* pop rcx-based kernel stack cfi */ + __ASM_CFI("\t.cfi_restore_state\n") + "1:\tleaq 0x70(%rcx),%rsp\n\t" - __ASM_CFI_CFA_IS_AT1(rsp, 0x18) - __ASM_CFI_REG_IS_AT1(rip, rsp, 0x00) "testl $0x2,%edx\n\t" /* CONTEXT_INTEGER */ "jnz 1f\n\t" "movq 0x10(%rsp),%r11\n\t" /* frame->eflags */ "movq (%rsp),%rcx\n\t" /* frame->rip */ - __ASM_CFI(".cfi_register rip, rcx\n\t") "iretq\n" - __ASM_CFI_REG_IS_AT1(rip, rsp, 0x00) "1:\tmovq 0x00(%rcx),%rax\n\t" "movq 0x18(%rcx),%rdx\n\t" "movq 0x30(%rcx),%r8\n\t" @@ -2787,20 +2795,11 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movq 0x48(%rcx),%r11\n\t" "movq 0x10(%rcx),%rcx\n" "iretq\n" - __ASM_CFI_CFA_IS_AT1(rbp, 0x70) - __ASM_CFI_REG_IS_AT1(rip, rbp, 0x58) - __ASM_CFI_REG_IS_AT2(rbx, rbp, 0xf0, 0x7e) - __ASM_CFI_REG_IS_AT2(rsi, rbp, 0x88, 0x7f) - __ASM_CFI_REG_IS_AT2(rdi, rbp, 0x90, 0x7f) - __ASM_CFI_REG_IS_AT2(r12, rbp, 0xb8, 0x7f) - __ASM_CFI_REG_IS_AT1(r13, rbp, 0x40) - __ASM_CFI_REG_IS_AT1(r14, rbp, 0x48) - __ASM_CFI_REG_IS_AT1(r15, rbp, 0x50) - __ASM_CFI_REG_IS_AT1(rbp, rbp, 0x00) + + /* pop rbp-based kernel stack cfi */ + __ASM_CFI("\t.cfi_restore_state\n") "5:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */ "movq %rsp,%rcx\n\t" - /* $rcx is now pointing to "frame" again */ - __ASM_CFI(".cfi_restore_state\n\t") "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" @@ -2873,6 +2872,17 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, #endif /* switch to kernel stack */ "movq %rcx,%rsp\n" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT2(rsp, 0xa8, 0x01) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset %rip,-0x08\n\t") + __ASM_CFI(".cfi_offset %rbp,-0x10\n\t") + __ASM_CFI(".cfi_offset %rbx,-0x18\n\t") + __ASM_CFI(".cfi_offset %r12,-0x20\n\t") + __ASM_CFI(".cfi_offset %r13,-0x28\n\t") + __ASM_CFI(".cfi_offset %r14,-0x30\n\t") + __ASM_CFI(".cfi_offset %r15,-0x38\n\t") + __ASM_CFI(".cfi_undefined %rdi\n\t") + __ASM_CFI(".cfi_undefined %rsi\n\t") "movq %r8,%rdi\n\t" /* args */ "callq *(%r10,%rdx,8)\n\t" "movq %rsp,%rcx\n" @@ -2895,14 +2905,20 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "1:\n\t" #endif "movq 0x60(%rcx),%r14\n\t" - __ASM_CFI(".cfi_same_value r14\n\t") "movq 0x28(%rcx),%rdi\n\t" - __ASM_CFI(".cfi_same_value rdi\n\t") "movq 0x20(%rcx),%rsi\n\t" /* switch to user stack */ - __ASM_CFI(".cfi_same_value rsi\n\t") "movq 0x88(%rcx),%rsp\n\t" - __ASM_CFI(".cfi_def_cfa rsp, 0\n\t") + __ASM_CFI(".cfi_def_cfa %rsp, 0\n\t") + __ASM_CFI_REG_IS_AT2(rip, rcx, 0x70, 0x00) + __ASM_CFI(".cfi_undefined %rbp\n\t") + __ASM_CFI(".cfi_undefined %rbx\n\t") + __ASM_CFI(".cfi_undefined %r12\n\t") + __ASM_CFI(".cfi_undefined %r13\n\t") + __ASM_CFI(".cfi_same_value %r14\n\t") + __ASM_CFI(".cfi_undefined %r15\n\t") + __ASM_CFI(".cfi_same_value %rdi\n\t") + __ASM_CFI(".cfi_same_value %rsi\n\t") "pushq 0x70(%rcx)\n\t" /* frame->rip */ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") "ret" )
1
0
0
0
Rémi Bernon : ntdll: Connect syscall frames across user callbacks on i386.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: 578a730a2acefabab34ba09cfe4ee338d8f7b10c URL:
https://gitlab.winehq.org/wine/wine/-/commit/578a730a2acefabab34ba09cfe4ee3…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 6 16:22:31 2023 +0100 ntdll: Connect syscall frames across user callbacks on i386. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52213
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54346
--- dlls/ntdll/unix/signal_i386.c | 74 ++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 2fb9e6ad897..e611defc1cb 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -2612,6 +2612,13 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "fwait\n" /* switch to kernel stack */ "4:\tmovl %ecx,%esp\n\t" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT1(ebp, 0x04) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset %eip,-4\n\t") + __ASM_CFI(".cfi_offset %ebp,-8\n\t") + __ASM_CFI(".cfi_offset %ebx,-12\n\t") + __ASM_CFI(".cfi_offset %esi,-16\n\t") + __ASM_CFI(".cfi_offset %edi,-20\n\t") "movl 0x1c(%esp),%edx\n\t" /* frame->eax */ "andl $0xfff,%edx\n\t" /* syscall number */ "cmpl 8(%ebx),%edx\n\t" /* table->ServiceLimit */ @@ -2629,12 +2636,6 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leal -0x34(%ebp),%esp\n" __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\t" - __ASM_CFI_CFA_IS_AT1(esp, 0x0c) - __ASM_CFI_REG_IS_AT1(eip, esp, 0x08) - __ASM_CFI_REG_IS_AT1(ebx, esp, 0x20) - __ASM_CFI_REG_IS_AT1(edi, esp, 0x2c) - __ASM_CFI_REG_IS_AT1(esi, esp, 0x30) - __ASM_CFI_REG_IS_AT1(ebp, esp, 0x34) "movl 0(%esp),%ecx\n\t" /* frame->syscall_flags + (frame->restore_flags << 16) */ "testl $0x68 << 16,%ecx\n\t" /* CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS | CONTEXT_XSAVE */ "jz 3f\n\t" @@ -2653,38 +2654,46 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "2:\tfrstor 0x40(%esp)\n\t" "fwait\n" "3:\tmovl 0x2c(%esp),%edi\n\t" - __ASM_CFI(".cfi_remember_state\n\t") - __ASM_CFI(".cfi_same_value %edi\n\t") "movl 0x30(%esp),%esi\n\t" - __ASM_CFI(".cfi_same_value %esi\n\t") "movl 0x34(%esp),%ebp\n\t" - __ASM_CFI(".cfi_same_value %ebp\n\t") + /* push ebp-based kernel stack cfi */ + __ASM_CFI("\t.cfi_remember_state\n") + __ASM_CFI_CFA_IS_AT2(esp, 0xb8, 0x00) /* frame->syscall_cfa */ "testl $0x7 << 16,%ecx\n\t" /* CONTEXT_CONTROL | CONTEXT_SEGMENTS | CONTEXT_INTEGER */ "jnz 1f\n\t" "movl 0x20(%esp),%ebx\n\t" - __ASM_CFI(".cfi_remember_state\n\t") - __ASM_CFI(".cfi_same_value %ebx\n\t") "movl 0x08(%esp),%ecx\n\t" /* frame->eip */ - __ASM_CFI(".cfi_register %eip, %ecx\n\t") + /* push esp-based kernel stack cfi */ + __ASM_CFI("\t.cfi_remember_state\n") /* switch to user stack */ "movl 0x0c(%esp),%esp\n\t" /* frame->esp */ + __ASM_CFI(".cfi_def_cfa %esp,0\n\t") + __ASM_CFI(".cfi_register %eip, %ecx\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + __ASM_CFI(".cfi_same_value %ebx\n\t") + __ASM_CFI(".cfi_same_value %esi\n\t") + __ASM_CFI(".cfi_same_value %edi\n\t") "pushl %ecx\n\t" __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "ret\n" + /* pop esp-based kernel stack cfi */ __ASM_CFI("\t.cfi_restore_state\n") + "1:\ttestl $0x2 << 16,%ecx\n\t" /* CONTEXT_INTEGER */ "jz 1f\n\t" "movl 0x1c(%esp),%eax\n\t" "movl 0x24(%esp),%ecx\n\t" "movl 0x28(%esp),%edx\n" "1:\tmovl 0x0c(%esp),%ebx\n\t" /* frame->esp */ - __ASM_CFI(".cfi_register %esp, %ebx\n\t") "movw 0x12(%esp),%ss\n\t" /* switch to user stack */ "xchgl %ebx,%esp\n\t" - __ASM_CFI(".cfi_def_cfa %esp, 0\n\t") - __ASM_CFI_REG_IS_AT1(eip, ebx, 0x08) - __ASM_CFI_REG_IS_AT1(ebx, ebx, 0x20) + __ASM_CFI(".cfi_def_cfa %esp,0\n\t") + __ASM_CFI(".cfi_register %eip, %ecx\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + __ASM_CFI(".cfi_same_value %ebx\n\t") + __ASM_CFI(".cfi_same_value %esi\n\t") + __ASM_CFI(".cfi_same_value %edi\n\t") "pushl 0x04(%ebx)\n\t" /* frame->eflags */ __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl 0x10(%ebx)\n\t" /* frame->cs */ @@ -2702,23 +2711,16 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "popl %ds\n\t" __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") "iret\n" + /* pop ebp-based kernel stack cfi */ __ASM_CFI("\t.cfi_restore_state\n") + "6:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */ "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" - __ASM_CFI(".cfi_remember_state\n\t") - __ASM_CFI(".cfi_def_cfa %esp, 4\n\t") - __ASM_CFI(".cfi_restore %esp\n\t") - __ASM_CFI(".cfi_restore %eip\n\t") - __ASM_CFI(".cfi_restore %ebx\n\t") - __ASM_CFI(".cfi_restore %edi\n\t") - __ASM_CFI(".cfi_restore %esi\n\t") - __ASM_CFI(".cfi_restore %ebp\n\t") "movl 8(%esp),%eax\n\t" "movl 4(%esp),%esp\n\t" - __ASM_CFI(".cfi_restore_state\n\t") "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) @@ -2756,20 +2758,26 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "movl 8(%esp),%edx\n\t" /* code */ /* switch to kernel stack */ "leal -16(%ecx),%esp\n\t" + /* we're now on the kernel stack, stitch unwind info with previous frame */ + __ASM_CFI_CFA_IS_AT2(esp, 0xc8, 0x00) /* frame->syscall_cfa */ + __ASM_CFI(".cfi_offset %eip,-4\n\t") + __ASM_CFI(".cfi_offset %ebp,-8\n\t") + __ASM_CFI(".cfi_offset %ebx,-12\n\t") + __ASM_CFI(".cfi_offset %esi,-16\n\t") + __ASM_CFI(".cfi_offset %edi,-20\n\t") "call *(%eax,%edx,4)\n\t" "leal 16(%esp),%esp\n\t" - __ASM_CFI_CFA_IS_AT1(esp, 0x0c) - __ASM_CFI_REG_IS_AT1(eip, esp, 0x08) - __ASM_CFI_REG_IS_AT1(ebx, esp, 0x20) - __ASM_CFI_REG_IS_AT1(edi, esp, 0x2c) - __ASM_CFI_REG_IS_AT1(esi, esp, 0x30) - __ASM_CFI_REG_IS_AT1(ebp, esp, 0x34) "testw $0xffff,2(%esp)\n\t" /* frame->restore_flags */ "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" "movl 0x08(%esp),%ecx\n\t" /* frame->eip */ - __ASM_CFI(".cfi_register %eip, %ecx\n\t") /* switch to user stack */ "movl 0x0c(%esp),%esp\n\t" /* frame->esp */ + __ASM_CFI(".cfi_def_cfa %esp,0\n\t") + __ASM_CFI(".cfi_register %eip, %ecx\n\t") + __ASM_CFI(".cfi_undefined %ebp\n\t") + __ASM_CFI(".cfi_undefined %ebx\n\t") + __ASM_CFI(".cfi_undefined %esi\n\t") + __ASM_CFI(".cfi_undefined %edi\n\t") "pushl %ecx\n\t" __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "ret" )
1
0
0
0
Alexandre Julliard : ntdll: Add a syscall_cfa member to the ARM syscall frame.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: 0d329384d8fad00cbb0a0e1c3f9540d8ee03555e URL:
https://gitlab.winehq.org/wine/wine/-/commit/0d329384d8fad00cbb0a0e1c3f9540…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 11:18:40 2023 +0100 ntdll: Add a syscall_cfa member to the ARM syscall frame. --- dlls/ntdll/unix/signal_arm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 44d72fb5548..1f0a4fd84b1 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -194,7 +194,7 @@ struct syscall_frame UINT restore_flags; /* 044 */ UINT fpscr; /* 048 */ struct syscall_frame *prev_frame; /* 04c */ - void *unused; /* 050 */ + void *syscall_cfa; /* 050 */ UINT align[3]; /* 054 */ ULONGLONG d[32]; /* 060 */ }; @@ -1161,6 +1161,7 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback, "ldr ip, [sp, #0x2c]\n\t" /* func */ "ldr r4, [sp, #0x30]\n\t" /* teb */ "ldr r5, [r4]\n\t" /* teb->Tib.ExceptionList */ + "add r7, sp, #0x28\n\t" /* syscall_cfa */ "push {r3, r5}\n\t" #ifndef __SOFTFP__ "sub sp, sp, #0x90\n\t" @@ -1172,6 +1173,7 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback, "sub sp, sp, #0x160\n\t" /* sizeof(struct syscall_frame) + registers */ "ldr r5, [r4, #0x1d8]\n\t" /* arm_thread_data()->syscall_frame */ "str r5, [sp, #0x4c]\n\t" /* frame->prev_frame */ + "str r7, [sp, #0x50]\n\t" /* frame->syscall_cfa */ "str sp, [r4, #0x1d8]\n\t" /* arm_thread_data()->syscall_frame */ /* switch to user stack */ "mov sp, r1\n\t" @@ -1571,14 +1573,12 @@ void signal_init_process(void) /*********************************************************************** * call_init_thunk */ -void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb ) +void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb, + struct syscall_frame *frame, void *syscall_cfa ) { struct arm_thread_data *thread_data = (struct arm_thread_data *)&teb->GdiTebBatch; - struct syscall_frame *frame = thread_data->syscall_frame; CONTEXT *ctx, context = { CONTEXT_ALL }; - __asm__ __volatile__( "mcr p15, 0, %0, c13, c0, 2" : : "r" (teb) ); - thread_data->syscall_table = KeServiceDescriptorTable; context.R0 = (DWORD)entry; @@ -1599,8 +1599,8 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB frame->sp = (DWORD)ctx; frame->pc = (DWORD)pLdrInitializeThunk; frame->r0 = (DWORD)ctx; - frame->prev_frame = NULL; frame->restore_flags |= CONTEXT_INTEGER; + frame->syscall_cfa = syscall_cfa; pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL ); __wine_syscall_dispatcher_return( frame, 0 ); @@ -1613,6 +1613,8 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB __ASM_GLOBAL_FUNC( signal_start_thread, __ASM_EHABI(".cantunwind\n\t") "push {r4-r12,lr}\n\t" + "add r7, sp, #0x28\n\t" /* syscall_cfa */ + "mcr p15, 0, r3, c13, c0, 2\n\t" /* set teb register */ /* store exit frame */ "str sp, [r3, #0x1d4]\n\t" /* arm_thread_data()->exit_frame */ /* set syscall frame */ @@ -1622,6 +1624,7 @@ __ASM_GLOBAL_FUNC( signal_start_thread, "str r6, [r3, #0x1d8]\n\t" /* arm_thread_data()->syscall_frame */ /* switch to kernel stack */ "1:\tmov sp, r6\n\t" + "push {r6,r7}\n\t" "bl " __ASM_NAME("call_init_thunk") )
1
0
0
0
Alexandre Julliard : ntdll: Add a syscall_cfa member to the ARM64 syscall frame.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: e07d536d83c3e760904c2256ba0bfec4edd97cf6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e07d536d83c3e760904c2256ba0bfe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 20 09:59:32 2023 +0100 ntdll: Add a syscall_cfa member to the ARM64 syscall frame. --- dlls/ntdll/unix/signal_arm64.c | 91 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index e98fd446a66..37a2f9b1d3b 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -137,7 +137,7 @@ struct syscall_frame ULONG cpsr; /* 108 */ ULONG restore_flags; /* 10c */ struct syscall_frame *prev_frame; /* 110 */ - void *unused; /* 118 */ + void *syscall_cfa; /* 118 */ ULONG64 align; /* 120 */ ULONG fpcr; /* 128 */ ULONG fpsr; /* 12c */ @@ -1111,12 +1111,26 @@ extern NTSTATUS call_user_mode_callback( ULONG id, void *args, ULONG len, void * ULONG *ret_len, void *func, TEB *teb ); __ASM_GLOBAL_FUNC( call_user_mode_callback, "stp x29, x30, [sp,#-0xc0]!\n\t" + __ASM_CFI(".cfi_def_cfa_offset 0xc0\n\t") + __ASM_CFI(".cfi_offset 29,-0xc0\n\t") + __ASM_CFI(".cfi_offset 30,-0xb8\n\t") "mov x29, sp\n\t" + __ASM_CFI(".cfi_def_cfa_register 29\n\t") "stp x19, x20, [x29, #0x10]\n\t" + __ASM_CFI(".cfi_rel_offset 19,0x10\n\t") + __ASM_CFI(".cfi_rel_offset 20,0x18\n\t") "stp x21, x22, [x29, #0x20]\n\t" + __ASM_CFI(".cfi_rel_offset 21,0x20\n\t") + __ASM_CFI(".cfi_rel_offset 22,0x28\n\t") "stp x23, x24, [x29, #0x30]\n\t" + __ASM_CFI(".cfi_rel_offset 23,0x30\n\t") + __ASM_CFI(".cfi_rel_offset 24,0x38\n\t") "stp x25, x26, [x29, #0x40]\n\t" + __ASM_CFI(".cfi_rel_offset 25,0x40\n\t") + __ASM_CFI(".cfi_rel_offset 26,0x48\n\t") "stp x27, x28, [x29, #0x50]\n\t" + __ASM_CFI(".cfi_rel_offset 27,0x50\n\t") + __ASM_CFI(".cfi_rel_offset 28,0x58\n\t") "stp d8, d9, [x29, #0x60]\n\t" "stp d10, d11, [x29, #0x70]\n\t" "stp d12, d13, [x29, #0x80]\n\t" @@ -1132,9 +1146,10 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback, "ldr x7, [x18, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ "sub x3, sp, #0x330\n\t" /* sizeof(struct syscall_frame) */ "str x3, [x18, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ + "add x8, x29, #0xc0\n\t" + "stp x7, x8, [x3, #0x110]\n\t" /* frame->prev_frame,syscall_cfa */ /* switch to user stack */ "mov sp, x1\n\t" /* stack */ - "str x7, [x3, #0x110]\n\t" /* frame->prev_frame */ "br x5" ) @@ -1145,19 +1160,42 @@ extern void DECLSPEC_NORETURN user_mode_callback_return( void *ret_ptr, ULONG re NTSTATUS status, TEB *teb ); __ASM_GLOBAL_FUNC( user_mode_callback_return, "ldr x4, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ - "ldr x5, [x4, #0x110]\n\t" /* prev_frame */ + "ldp x5, x29, [x4,#0x110]\n\t" /* prev_frame,syscall_cfa */ "str x5, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ - "add x29, x4, #0x330\n\t" /* sizeof(struct syscall_frame) */ + "sub x29, x29, #0xc0\n\t" + __ASM_CFI(".cfi_def_cfa_register 29\n\t") + __ASM_CFI(".cfi_rel_offset 29,0x00\n\t") + __ASM_CFI(".cfi_rel_offset 30,0x08\n\t") + __ASM_CFI(".cfi_rel_offset 19,0x10\n\t") + __ASM_CFI(".cfi_rel_offset 20,0x18\n\t") + __ASM_CFI(".cfi_rel_offset 21,0x20\n\t") + __ASM_CFI(".cfi_rel_offset 22,0x28\n\t") + __ASM_CFI(".cfi_rel_offset 23,0x30\n\t") + __ASM_CFI(".cfi_rel_offset 24,0x38\n\t") + __ASM_CFI(".cfi_rel_offset 25,0x40\n\t") + __ASM_CFI(".cfi_rel_offset 26,0x48\n\t") + __ASM_CFI(".cfi_rel_offset 27,0x50\n\t") + __ASM_CFI(".cfi_rel_offset 28,0x58\n\t") "ldp x5, x6, [x29, #0xb0]\n\t" "str x6, [x3]\n\t" /* teb->Tib.ExceptionList */ "msr fpcr, x5\n\t" "lsr x5, x5, #32\n\t" "msr fpsr, x5\n\t" "ldp x19, x20, [x29, #0x10]\n\t" + __ASM_CFI(".cfi_same_value 19\n\t") + __ASM_CFI(".cfi_same_value 20\n\t") "ldp x21, x22, [x29, #0x20]\n\t" + __ASM_CFI(".cfi_same_value 21\n\t") + __ASM_CFI(".cfi_same_value 22\n\t") "ldp x23, x24, [x29, #0x30]\n\t" + __ASM_CFI(".cfi_same_value 23\n\t") + __ASM_CFI(".cfi_same_value 24\n\t") "ldp x25, x26, [x29, #0x40]\n\t" + __ASM_CFI(".cfi_same_value 25\n\t") + __ASM_CFI(".cfi_same_value 26\n\t") "ldp x27, x28, [x29, #0x50]\n\t" + __ASM_CFI(".cfi_same_value 27\n\t") + __ASM_CFI(".cfi_same_value 28\n\t") "ldp d8, d9, [x29, #0x60]\n\t" "ldp d10, d11, [x29, #0x70]\n\t" "ldp d12, d13, [x29, #0x80]\n\t" @@ -1604,10 +1642,9 @@ void syscall_dispatcher_return_slowpath(void) /*********************************************************************** * call_init_thunk */ -void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb ) +void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb, + struct syscall_frame *frame, void *syscall_cfa ) { - struct arm64_thread_data *thread_data = (struct arm64_thread_data *)&teb->GdiTebBatch; - struct syscall_frame *frame = thread_data->syscall_frame; CONTEXT *ctx, context = { CONTEXT_ALL }; I386_CONTEXT *i386_context; ARM_CONTEXT *arm_context; @@ -1659,8 +1696,8 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB frame->pc = (ULONG64)pLdrInitializeThunk; frame->x[0] = (ULONG64)ctx; frame->x[18] = (ULONG64)teb; - frame->prev_frame = NULL; frame->restore_flags |= CONTEXT_INTEGER; + frame->syscall_cfa = syscall_cfa; syscall_frame_fixup_for_fastpath( frame ); pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL ); @@ -1672,29 +1709,49 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB * signal_start_thread */ __ASM_GLOBAL_FUNC( signal_start_thread, - "stp x29, x30, [sp,#-16]!\n\t" - /* store exit frame */ + "stp x29, x30, [sp,#-0xc0]!\n\t" + __ASM_CFI(".cfi_def_cfa_offset 0xc0\n\t") + __ASM_CFI(".cfi_offset 29,-0xc0\n\t") + __ASM_CFI(".cfi_offset 30,-0xb8\n\t") "mov x29, sp\n\t" + __ASM_CFI(".cfi_def_cfa_register 29\n\t") + "stp x19, x20, [x29, #0x10]\n\t" + __ASM_CFI(".cfi_rel_offset 19,0x10\n\t") + __ASM_CFI(".cfi_rel_offset 20,0x18\n\t") + "stp x21, x22, [x29, #0x20]\n\t" + __ASM_CFI(".cfi_rel_offset 21,0x20\n\t") + __ASM_CFI(".cfi_rel_offset 22,0x28\n\t") + "stp x23, x24, [x29, #0x30]\n\t" + __ASM_CFI(".cfi_rel_offset 23,0x30\n\t") + __ASM_CFI(".cfi_rel_offset 24,0x38\n\t") + "stp x25, x26, [x29, #0x40]\n\t" + __ASM_CFI(".cfi_rel_offset 25,0x40\n\t") + __ASM_CFI(".cfi_rel_offset 26,0x48\n\t") + "stp x27, x28, [x29, #0x50]\n\t" + __ASM_CFI(".cfi_rel_offset 27,0x50\n\t") + __ASM_CFI(".cfi_rel_offset 28,0x58\n\t") + "add x5, x29, #0xc0\n\t" /* syscall_cfa */ + /* store exit frame */ "str x29, [x3, #0x2f0]\n\t" /* arm64_thread_data()->exit_frame */ /* set syscall frame */ - "ldr x8, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ - "cbnz x8, 1f\n\t" - "sub x8, sp, #0x330\n\t" /* sizeof(struct syscall_frame) */ - "str x8, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ + "ldr x4, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ + "cbnz x4, 1f\n\t" + "sub x4, sp, #0x330\n\t" /* sizeof(struct syscall_frame) */ + "str x4, [x3, #0x2f8]\n\t" /* arm64_thread_data()->syscall_frame */ /* switch to kernel stack */ - "1:\tmov sp, x8\n\t" + "1:\tmov sp, x4\n\t" "bl " __ASM_NAME("call_init_thunk") ) /*********************************************************************** * signal_exit_thread */ __ASM_GLOBAL_FUNC( signal_exit_thread, - "stp x29, x30, [sp,#-16]!\n\t" + "stp x29, x30, [sp,#-0xc0]!\n\t" "ldr x3, [x2, #0x2f0]\n\t" /* arm64_thread_data()->exit_frame */ "str xzr, [x2, #0x2f0]\n\t" "cbz x3, 1f\n\t" "mov sp, x3\n" - "1:\tldp x29, x30, [sp], #16\n\t" + "1:\tldp x29, x30, [sp], #0xc0\n\t" "br x1" )
1
0
0
0
Rémi Bernon : ntdll: Add a syscall_cfa member to the x86_64 syscall frame.
by Alexandre Julliard
22 Nov '23
22 Nov '23
Module: wine Branch: master Commit: df181df8ee5930f19327324593ecd54b3cc7fc26 URL:
https://gitlab.winehq.org/wine/wine/-/commit/df181df8ee5930f19327324593ecd5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 6 16:22:31 2023 +0100 ntdll: Add a syscall_cfa member to the x86_64 syscall frame. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52213
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54346
--- dlls/ntdll/unix/signal_x86_64.c | 58 +++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 54125501ffb..e65b123fb7f 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -400,7 +400,7 @@ struct syscall_frame ULONG64 ss; /* 0090 */ ULONG64 rbp; /* 0098 */ struct syscall_frame *prev_frame; /* 00a0 */ - void *unused; /* 00a8 */ + void *syscall_cfa; /* 00a8 */ DWORD syscall_flags; /* 00b0 */ DWORD restore_flags; /* 00b4 */ DWORD align[2]; /* 00b8 */ @@ -1572,9 +1572,10 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback, "movq %rcx,-0x38(%rbp)\n\t" /* ret_ptr */ "movq %r8,-0x40(%rbp)\n\t" /* ret_len */ "mov 0x10(%rbp),%r11\n\t" /* teb */ - "subq $0x410,%rsp\n\t" /* sizeof(struct syscall_frame) + ebp + exception */ + "subq $0x408,%rsp\n\t" /* sizeof(struct syscall_frame) + exception */ "andq $~63,%rsp\n\t" - "movq %rbp,0x400(%rsp)\n\t" + "leaq 0x10(%rbp),%rax\n\t" + "movq %rax,0xa8(%rsp)\n\t" /* frame->syscall_cfa */ "movq 0x328(%r11),%r10\n\t" /* amd64_thread_data()->syscall_frame */ "movq (%r11),%rax\n\t" /* NtCurrentTeb()->Tib.ExceptionList */ "movq %rax,0x408(%rsp)\n\t" @@ -1606,7 +1607,8 @@ __ASM_GLOBAL_FUNC( user_mode_callback_return, "movq 0x328(%rcx),%r10\n\t" /* amd64_thread_data()->syscall_frame */ "movq 0xa0(%r10),%r11\n\t" /* frame->prev_frame */ "movq %r11,0x328(%rcx)\n\t" /* amd64_thread_data()->syscall_frame = prev_frame */ - "movq 0x400(%r10),%rbp\n\t" /* call_user_mode_callback rbp */ + "movq 0xa8(%r10),%rbp\n\t" /* frame->syscall_cfa */ + "subq $0x10,%rbp\n\t" __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") __ASM_CFI(".cfi_rel_offset %rbx,-0x08\n\t") __ASM_CFI(".cfi_rel_offset %r12,-0x10\n\t") @@ -2433,10 +2435,10 @@ void signal_init_process(void) /*********************************************************************** * call_init_thunk */ -void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb ) +void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB *teb, + struct syscall_frame *frame, void *syscall_cfa ) { struct amd64_thread_data *thread_data = (struct amd64_thread_data *)&teb->GdiTebBatch; - struct syscall_frame *frame = thread_data->syscall_frame; CONTEXT *ctx, context = { 0 }; I386_CONTEXT *wow_context; @@ -2509,6 +2511,7 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB frame->prev_frame = NULL; frame->restore_flags |= CONTEXT_INTEGER; frame->syscall_flags = syscall_flags; + frame->syscall_cfa = syscall_cfa; pthread_sigmask( SIG_UNBLOCK, &server_block_set, NULL ); __wine_syscall_dispatcher_return( frame, 0 ); @@ -2519,31 +2522,34 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB * signal_start_thread */ __ASM_GLOBAL_FUNC( signal_start_thread, - "subq $56,%rsp\n\t" - __ASM_CFI(".cfi_adjust_cfa_offset 56\n\t") - "movq %rbp,48(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %rbp,48\n\t") - "movq %rbx,40(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %rbx,40\n\t") - "movq %r12,32(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %r12,32\n\t") - "movq %r13,24(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %r13,24\n\t") - "movq %r14,16(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %r14,16\n\t") - "movq %r15,8(%rsp)\n\t" - __ASM_CFI(".cfi_rel_offset %r15,8\n\t") + "subq $0x38,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 0x38\n\t") + "movq %rbp,0x30(%rsp)\n\t" + __ASM_CFI(".cfi_rel_offset %rbp,0x30\n\t") + "leaq 0x30(%rsp),%rbp\n\t" + __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") + "movq %rbx,-0x08(%rbp)\n\t" + __ASM_CFI(".cfi_rel_offset %rbx,-0x08\n\t") + "movq %r12,-0x10(%rbp)\n\t" + __ASM_CFI(".cfi_rel_offset %r12,-0x10\n\t") + "movq %r13,-0x18(%rbp)\n\t" + __ASM_CFI(".cfi_rel_offset %r13,-0x18\n\t") + "movq %r14,-0x20(%rbp)\n\t" + __ASM_CFI(".cfi_rel_offset %r14,-0x20\n\t") + "movq %r15,-0x28(%rbp)\n\t" + __ASM_CFI(".cfi_rel_offset %r15,-0x28\n\t") + "leaq 0x10(%rbp),%r9\n\t" /* syscall_cfa */ /* store exit frame */ "movq %rsp,0x320(%rcx)\n\t" /* amd64_thread_data()->exit_frame */ /* set syscall frame */ - "movq 0x328(%rcx),%rax\n\t" /* amd64_thread_data()->syscall_frame */ - "orq %rax,%rax\n\t" + "movq 0x328(%rcx),%r8\n\t" /* amd64_thread_data()->syscall_frame */ + "orq %r8,%r8\n\t" "jnz 1f\n\t" - "leaq -0x400(%rsp),%rax\n\t" /* sizeof(struct syscall_frame) */ - "andq $~63,%rax\n\t" - "movq %rax,0x328(%rcx)\n" /* amd64_thread_data()->syscall_frame */ + "leaq -0x400(%rsp),%r8\n\t" /* sizeof(struct syscall_frame) */ + "andq $~63,%r8\n\t" + "movq %r8,0x328(%rcx)\n" /* amd64_thread_data()->syscall_frame */ /* switch to kernel stack */ - "1:\tmovq %rax,%rsp\n\t" + "1:\tmovq %r8,%rsp\n\t" "call " __ASM_NAME("call_init_thunk"))
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
99
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Results per page:
10
25
50
100
200