This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fix bz #16169 - CFI directives missing from AArch64 clone.S
- From: Ryan Arnold <ryan dot arnold at linaro dot org>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Marcus Shawcroft <marcus dot shawcroft at linaro dot org>
- Date: Fri, 17 Jan 2014 14:48:38 -0600
- Subject: Re: [PATCH] fix bz #16169 - CFI directives missing from AArch64 clone.S
- Authentication-results: sourceware.org; auth=none
- References: <1389904266-22061-1-git-send-email-tromey at redhat dot com> <CAFqB+PyQrkRTm72M9S_+KGOMsfo8du-ExOTk2zedfptenpHHgg at mail dot gmail dot com>
On Fri, Jan 17, 2014 at 12:55 PM, Marcus Shawcroft
<marcus.shawcroft@gmail.com> wrote:
> Hi
>
> On 16 January 2014 20:31, Tom Tromey <tromey@redhat.com> wrote:
>
>> svc 0x0
>> + cfi_endproc
>
> The cfi_endproc placement looks sensible to me.
>
>> + cfi_startproc
>> + cfi_undefined lr
>
> The cfi_undefined is missing () and the convenience name 'lr' is not
> known to GAS, therefore this line should be:
>
> cfi_undefined (x30)
>
> In the ticket Tom points out that the implementation does not honour
> the AAPCS, the fix is to insert:
>
> mov x29, 0
>
>> #ifdef RESET_PID
>> tbnz x5, #CLONE_THREAD_BIT, 3f
>> mov x0, #-1
>> @@ -93,7 +96,9 @@ ENTRY(__clone)
>>
>> /* We are done, pass the return value through x0. */
>> b HIDDEN_JUMPTARGET(_exit)
>> + cfi_endproc
>>
>> + cfi_startproc
>
> This part looks fine.
>
> Attached is a revised version of your patch including the two changes
> listed above. If there are no further comments in the next 24hrs or so
> I'll commit this and address Joseph's comment w.r.t ChangeLog and
> NEWS.
>
> Cheers
> /Marcus
I finally got access to an environment where I could test this and
came up with the same fix you did for cfi_undefined (x30).
I ran a modified version of nptl/tst-align2 to hit the error syscall
error path but wasn't able to get gdb to hang as Tom described either
before or after the fix was applied. I was using ni and bt while
broken inside of __clone. Perhaps that's not how he hit the condition
in the first place, but he'll have to elaborate.
None-the-less, I think the fix is correct.
Ryan S. Arnold