mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1376653 - Unconditionalize the tkill() polyfill. r=gcp
MozReview-Commit-ID: JzLWCRQ9Keg --HG-- extra : rebase_source : ff038fd9e1a4ec8047c3a00619a97464778d7c2a
This commit is contained in:
parent
89b65b175e
commit
bbcc5a0f24
@ -92,15 +92,14 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
#if defined(ANDROID) && ANDROID_VERSION < 16
|
||||
// Bug 1093893: Translate tkill to tgkill for pthread_kill; fixed in
|
||||
// bionic commit 10c8ce59a (in JB and up; API level 16 = Android 4.1).
|
||||
// Bug 1376653: musl also needs this, and security-wise it's harmless.
|
||||
static intptr_t TKillCompatTrap(const sandbox::arch_seccomp_data& aArgs,
|
||||
void *aux)
|
||||
{
|
||||
return syscall(__NR_tgkill, getpid(), aArgs.args[0], aArgs.args[1]);
|
||||
}
|
||||
#endif
|
||||
|
||||
static intptr_t SetNoNewPrivsTrap(ArgsRef& aArgs, void* aux) {
|
||||
if (gSetSandboxFilter == nullptr) {
|
||||
@ -241,11 +240,9 @@ public:
|
||||
.Else(InvalidSyscall());
|
||||
}
|
||||
|
||||
#if defined(ANDROID) && ANDROID_VERSION < 16
|
||||
// Polyfill with tgkill; see above.
|
||||
case __NR_tkill:
|
||||
return Trap(TKillCompatTrap, nullptr);
|
||||
#endif
|
||||
|
||||
// Yield
|
||||
case __NR_sched_yield:
|
||||
|
Loading…
Reference in New Issue
Block a user