diff mbox series

[1/7] powerpc: Add CFI information on indirect syscall

Message ID 20180904204553.6971-2-adhemerval.zanella@linaro.org
State New
Headers show
Series General fixes and refactor for BZ#12683 | expand

Commit Message

Adhemerval Zanella Sept. 4, 2018, 8:45 p.m. UTC
This patch the required CFI information on powerpc indirect syscall
so backtrace works correctly on signal handler.

Checked on powerpc-linux-gnu and powerpc64le-linux-gnu.

	* sysdeps/unix/sysv/linux/powerpc/syscall.S (syscall): Add CFI
	information.
---
 ChangeLog                                 | 5 +++++
 sysdeps/unix/sysv/linux/powerpc/syscall.S | 1 +
 2 files changed, 6 insertions(+)

-- 
2.17.1

Comments

Tulio Magno Quites Machado Filho Sept. 6, 2018, 3:18 p.m. UTC | #1
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:

> This patch the required CFI information on powerpc indirect syscall

> so backtrace works correctly on signal handler.

>

> Checked on powerpc-linux-gnu and powerpc64le-linux-gnu.

>

> 	* sysdeps/unix/sysv/linux/powerpc/syscall.S (syscall): Add CFI

> 	information.

> ---

>  ChangeLog                                 | 5 +++++

>  sysdeps/unix/sysv/linux/powerpc/syscall.S | 1 +

>  2 files changed, 6 insertions(+)

>

> diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S

> index 2da91721be..e30f461a17 100644

> --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S

> +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S

> @@ -19,6 +19,7 @@

>  

>  ENTRY (syscall)

>  	ABORT_TRANSACTION

> +	cfi_def_cfa_offset (0)


Why is this necessary in a function that is defined via ENTRY (or
ENTRY_TOCLESS) that already has cfi_startproc?

Does the error you found mean that parameter simple from cfi_startproc is being
set by mistake?

-- 
Tulio Magno
Adhemerval Zanella Sept. 25, 2018, 9:13 p.m. UTC | #2
On 06/09/2018 12:18, Tulio Magno Quites Machado Filho wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:

> 

>> This patch the required CFI information on powerpc indirect syscall

>> so backtrace works correctly on signal handler.

>>

>> Checked on powerpc-linux-gnu and powerpc64le-linux-gnu.

>>

>> 	* sysdeps/unix/sysv/linux/powerpc/syscall.S (syscall): Add CFI

>> 	information.

>> ---

>>  ChangeLog                                 | 5 +++++

>>  sysdeps/unix/sysv/linux/powerpc/syscall.S | 1 +

>>  2 files changed, 6 insertions(+)

>>

>> diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S

>> index 2da91721be..e30f461a17 100644

>> --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S

>> +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S

>> @@ -19,6 +19,7 @@

>>  

>>  ENTRY (syscall)

>>  	ABORT_TRANSACTION

>> +	cfi_def_cfa_offset (0)

> 

> Why is this necessary in a function that is defined via ENTRY (or

> ENTRY_TOCLESS) that already has cfi_startproc?

> 

> Does the error you found mean that parameter simple from cfi_startproc is being

> set by mistake?

> 


Re-testing it on powerpc64le it seems that current cfi directives
provided by ENTRY indeed are suffice.  The cfi_def_cfa_offset came
in fact from a previous iteration, which I initially added a frame 
set/restore.  So I withdraw this patch.
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S
index 2da91721be..e30f461a17 100644
--- a/sysdeps/unix/sysv/linux/powerpc/syscall.S
+++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S
@@ -19,6 +19,7 @@ 
 
 ENTRY (syscall)
 	ABORT_TRANSACTION
+	cfi_def_cfa_offset (0)
 	mr   r0,r3
 	mr   r3,r4
 	mr   r4,r5