This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix bz #16169 - CFI directives missing from AArch64 clone.S


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]