[PATCH] D115057: [msan] Don't block SIGSYS in ScopedBlockSignals

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 11:26:32 PST 2021


hans created this revision.
hans added reviewers: vitalybuka, eugenis.
hans requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

Seccomp-BPF-sandboxed processes rely on being able to process SIGSYS signals.

This un-breaks Chrome after D113328 <https://reviews.llvm.org/D113328>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115057

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp


Index: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -162,6 +162,12 @@
   // on any thread, setuid call hangs.
   // See test/sanitizer_common/TestCases/Linux/setuid.c.
   internal_sigdelset(&set, 33);
+#  endif
+#  if SANITIZER_LINUX
+  // Seccomp-BPF-sandboxed processes rely on SIGSYS to handle trapped syscalls.
+  // If this signal is blocked, such calls cannot be handled and the process may
+  // hang.
+  internal_sigdelset(&set, 31);
 #  endif
   SetSigProcMask(&set, &saved_);
   if (copy)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115057.391684.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211203/3d80ecfa/attachment.bin>


More information about the llvm-commits mailing list