| Index: sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
| diff --git a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
| index 6b959ac928c0091904c4445dc01685e5ff679925..57dc24e8f880c1e8cb608a949aabb09771882ab6 100644
|
| --- a/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
| +++ b/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
| @@ -18,6 +18,7 @@
|
| #define SECCOMP_MESSAGE_PRCTL_CONTENT "prctl() failure"
|
| #define SECCOMP_MESSAGE_IOCTL_CONTENT "ioctl() failure"
|
| #define SECCOMP_MESSAGE_KILL_CONTENT "(tg)kill() failure"
|
| +#define SECCOMP_MESSAGE_FUTEX_CONTENT "futex() failure"
|
|
|
| namespace {
|
|
|
| @@ -164,6 +165,18 @@ intptr_t SIGSYSKillFailure(const struct arch_seccomp_data& args,
|
| _exit(1);
|
| }
|
|
|
| +intptr_t SIGSYSFutexFailure(const struct arch_seccomp_data& args,
|
| + void* /* aux */) {
|
| + static const char kSeccompFutexError[] =
|
| + __FILE__ ":**CRASHING**:" SECCOMP_MESSAGE_FUTEX_CONTENT "\n";
|
| + WriteToStdErr(kSeccompFutexError, sizeof(kSeccompFutexError) - 1);
|
| + volatile int futex_op = args.args[1];
|
| + volatile char* addr = reinterpret_cast<volatile char*>(futex_op & 0xFFF);
|
| + *addr = '\0';
|
| + for (;;)
|
| + _exit(1);
|
| +}
|
| +
|
| const char* GetErrorMessageContentForTests() {
|
| return SECCOMP_MESSAGE_COMMON_CONTENT;
|
| }
|
| @@ -184,4 +197,8 @@ const char* GetKillErrorMessageContentForTests() {
|
| return SECCOMP_MESSAGE_KILL_CONTENT;
|
| }
|
|
|
| +const char* GetFutexErrorMessageContentForTests() {
|
| + return SECCOMP_MESSAGE_FUTEX_CONTENT;
|
| +}
|
| +
|
| } // namespace sandbox.
|
|
|