This will work, except it will be -4 and w1 for ILP32.

Thanks,
Andrew Pinski

From: Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
Sent: Sunday, August 18, 2013 10:09 PM
To: Pinski, Andrew
Cc: Linaro Toolchain
Subject: Re: [ACTIVITY] 12 - 16 August 2013
 
Hi Andrew,

I am not changing the TCB structure. I am placing it before TCB like the way done in IA64.

+# define TLS_PRE_TCB_SIZE \
+  (sizeof (struct pthread)                                              \
+   + (PTHREAD_STRUCT_END_PADDING < 2 * sizeof (uintptr_t)               \
+      ? ((2 * sizeof (uintptr_t) + __alignof__ (struct pthread) - 1)    \
+         & ~(__alignof__ (struct pthread) - 1))                         \
+      : 0))

And accessing the stack guard in compiler will be like.

 msr tpidr_el0, x0
 ldr x1, [x0-8]

Let me know if this will have impact on your changes.

Attached is the RFC patch.

regards,
Venkat.




On 19 August 2013 10:06, Pinski, Andrew <Andrew.Pinski@caviumnetworks.com> wrote:
I think changing TCB will be changing the ABI.  So we don't want to do that I think.
Also have you thought about how TCB changes are going to change ILP32 too.  I am almost ready to submit the patches for ILP32 out for review on the binutils, glibc, gcc, and kernel lists.


Thanks,
Andrew


From: linaro-toolchain-bounces@lists.linaro.org <linaro-toolchain-bounces@lists.linaro.org> on behalf of Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
Sent: Sunday, August 18, 2013 9:27 PM
To: Linaro Toolchain
Subject: [ACTIVITY] 12 - 16 August 2013
 
== Progress ==
* Libssp support for AArch64 TCWG 23:
  Understood the TCB datastructure. Sent a mail to the internal team on the
  changes needed and where to put stack gaurd slot in TCB.

  Got some comments from Matt. Worked on the changes in eglibc.
  Tested a simple stack smashing program in V8 model by moving
  the patched run time linker and glibc. Sent the RFC internally for review.

* 4 day week 15-August India naional holiday.

== Plan ==
 * Post RFC patch for Libssp support for AArch64 in GCC and glibc TCWG-23
 * Continue testing the patch for Libssp support for AArch64 in GCC and glibc TCWG-23
 * Backport and test revision 201406 to linaro branch.
 
== Issues ==
* LTO/PGO work stopped now since libssp support priority is more.
* Waiting for Marcus feedback for Matt comments on gprof patches TCWG-20.

Misc
------
23-August availing leave.