[tor-bugs] #16666 [Tor]: ed25519-donna doesn't build on arm without warnings with the stack protector

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Jul 25 16:52:03 UTC 2015


#16666: ed25519-donna doesn't build on arm without warnings with the stack
protector
----------------------------------+------------------------------------
 Reporter:  yawning               |          Owner:  yawning
     Type:  defect                |         Status:  new
 Priority:  normal                |      Milestone:  Tor: 0.2.7.x-final
Component:  Tor                   |        Version:  Tor: 0.2.7.2-alpha
 Keywords:  tor-core, tor-crypto  |  Actual Points:
Parent ID:                        |         Points:
----------------------------------+------------------------------------
 From Jenkins (https://jenkins.torproject.org/job/tor-ci-linux-master-
 extra-arm/147/ARCHITECTURE=armhf,SUITE=jessie/consoleFull):
 {{{
 13:54:27 ../tor/src/ext/ed25519/donna/ed25519_tor.c: In function
 'curved25519_scalarmult_basepoint_donna':
 13:54:27 ../tor/src/ext/ed25519/donna/ed25519_tor.c:107:12: error: stack
 protector not protecting local variables: variable length buffer [-Werror
 =stack-protector]
 13:54:27  ED25519_FN(curved25519_scalarmult_basepoint) (curved25519_key
 pk, const curved25519_key e) {
 13:54:27             ^
 13:54:27 ../tor/src/ext/ed25519/donna/ed25519_tor.c:33:32: note: in
 definition of macro 'ED25519_FN3'
 13:54:27  #define ED25519_FN3(fn,suffix) fn##suffix
 }}}

 Commit d8352646900c6316af8e2967742ce6a438b04221 should have fixed this,
 but apparently it's not enough.  I'm just going to change the donna code
 to not align to 16 byte boundaries on ARM since that's only there for the
 SSE2 code in the first place.

 On the off chance that the code does gain NEON support the penalty for
 unaligned access isn't that severe (there are load/store forms that
 require alignment, in which case the code will crash), but when that
 happens we can revisit this issue.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16666>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list