fails to build with libseccomp-dev installed on arm64
13:21:06 ../tor/src/common/sandbox.c: In function 'sigsys_debugging':
13:21:06 ../tor/src/common/sandbox.c:1812:35: error: 'mcontext_t {aka struct sigcontext}' has no member named 'M_SYSCALL'
13:21:06 syscall = (int) ctx->uc_mcontext.M_SYSCALL;
13:21:06 ^
13:21:13 Makefile:5615: recipe for target 'src/common/sandbox.o' failed
13:21:13 make[1]: *** [src/common/sandbox.o] Error 1
Note that on arm64, __arm__
is not defined.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- weasel (Peter Palfrader) changed milestone to %Tor: 0.3.2.x-final
changed milestone to %Tor: 0.3.2.x-final
- Author
Trac:
Description: ``` 13:21:06 ../tor/src/common/sandbox.c: In function 'sigsys_debugging': 13:21:06 ../tor/src/common/sandbox.c:1812:35: error: 'mcontext_t {aka struct sigcontext}' has no member named 'M_SYSCALL' 13:21:06 syscall = (int) ctx->uc_mcontext.M_SYSCALL; 13:21:06 ^ 13:21:13 Makefile:5615: recipe for target 'src/common/sandbox.o' failed 13:21:13 make[1]: *** [src/common/sandbox.o] Error 1Note that on arm64, __arm__ is not defined. cf. https://wiki.debian.org/ArchitectureSpecificsMemo **to**
13:21:06 ../tor/src/common/sandbox.c: In function 'sigsys_debugging': 13:21:06 ../tor/src/common/sandbox.c:1812:35: error: 'mcontext_t {aka struct sigcontext}' has no member named 'M_SYSCALL' 13:21:06 syscall = (int) ctx->uc_mcontext.M_SYSCALL; 13:21:06 ^ 13:21:13 Makefile:5615: recipe for target 'src/common/sandbox.o' failed 13:21:13 make[1]: *** [src/common/sandbox.o] Error 1
Note that on arm64, `__arm__` is not defined. cf. https://wiki.debian.org/ArchitectureSpecificsMemo
Fix for review in
bug24424_029
.Trac:
Owner: N/A to nickm
Status: new to accepted
Keywords: N/A deleted, 029-backport 030-backport 031-backport added
Milestone: N/A to Tor: 0.3.2.x-finalTrac:
Status: accepted to needs_review- Author
{{{ -#elif defined(arm) +#elif defined(aarch64) }}}
I don't think that's right.
/Maybe/ we want an extra conditional block (
__aarch64__ && __LP64__
) which usesregs[8]
.(also, cf. man 2 signal.)
Trac:
Status: needs_review to needs_revision- Author
This makes things build on arm64 (and does not break builds on armhf or amd64):
--- src/common/sandbox.c 2017-11-20 18:22:10.000000000 +0000 +++ /home/weasel/sandbox.c 2017-11-28 08:31:16.990108519 +0000 @@ -106,6 +106,11 @@ #define M_SYSCALL arm_r7 +#elif defined(__aarch64__) && defined(__LP64__) + +#define REG_SYSCALL 8 +#define M_SYSCALL regs[REG_SYSCALL] + #endif /* defined(__i386__) || ... */ /**Determines if at least one sandbox is active.*/
- Author
Trac:
Status: needs_revision to needs_review - Author
Once this is fixed, we should revert 7d743ff40dac07f86427d47bdf0dbb92e73f1a43 in jenkins/tools.
Trac:
Keywords: 029-backport 030-backport 031-backport deleted, 030-backport, 029-backport, review-group-27, 031-backport addedTaking this in 0.3.2, but not backporting, since it isn't sufficient to actually have the sandbox.c code work on arm yet. I think when it does work, we should consider it a "new feature" rather than a bug fix, since it didn't work before.
15b41fa6ae6a1356d5453242ccb7d7d301dd5e67 is the patch as applied.
Trac:
Status: needs_review to closed
Resolution: N/A to fixed- Trac closed
closed
- weasel (Peter Palfrader) mentioned in issue #24454 (moved)
mentioned in issue #24454 (moved)
- Trac moved to tpo/core/tor#24424 (closed)
moved to tpo/core/tor#24424 (closed)
- Trac mentioned in issue tpo/core/tor#24454 (closed)
mentioned in issue tpo/core/tor#24454 (closed)