diff options
author | Josh Gao <jmgao@google.com> | 2017-02-08 16:06:26 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-02-15 17:03:44 -0800 |
commit | e73c932373e59e4c0351cc7a8bd8cc5b8910d87e (patch) | |
tree | b8b8a1945ab8caba4b31ad1440a055033276bf00 /debuggerd/handler/debuggerd_fallback_nop.cpp | |
parent | f6ad5851e689f54c9dee6bfc6668ca726726e818 (diff) | |
download | system_core-e73c932373e59e4c0351cc7a8bd8cc5b8910d87e.tar.gz system_core-e73c932373e59e4c0351cc7a8bd8cc5b8910d87e.tar.bz2 system_core-e73c932373e59e4c0351cc7a8bd8cc5b8910d87e.zip |
libdebuggerd_handler: in-process crash dumping for seccomped processes.
Do an in-process unwind for processes that have PR_SET_NO_NEW_PRIVS
enabled.
Bug: http://b/34684590
Test: debuggerd_test, killall -ABRT media.codec
Change-Id: I62562ec2c419d6643970100ab1cc0288982a1eed
Diffstat (limited to 'debuggerd/handler/debuggerd_fallback_nop.cpp')
-rw-r--r-- | debuggerd/handler/debuggerd_fallback_nop.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debuggerd/handler/debuggerd_fallback_nop.cpp b/debuggerd/handler/debuggerd_fallback_nop.cpp new file mode 100644 index 000000000..9b3053f3b --- /dev/null +++ b/debuggerd/handler/debuggerd_fallback_nop.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <stddef.h> +#include <sys/ucontext.h> +#include <unistd.h> + +extern "C" bool debuggerd_fallback(ucontext_t*, siginfo_t*, void*) { + return false; +} |