OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/android/seccomp_support_detector.h" | 5 #include "chrome/browser/android/seccomp_support_detector.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <sys/utsname.h> | 8 #include <sys/utsname.h> |
9 | 9 |
10 #include "base/message_loop/message_loop_proxy.h" | |
11 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
12 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/sparse_histogram.h" |
13 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
14 | 13 |
15 #if defined(USE_SECCOMP_BPF) | 14 #if defined(USE_SECCOMP_BPF) |
16 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 15 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
17 #endif | 16 #endif |
18 | 17 |
19 using content::BrowserThread; | 18 using content::BrowserThread; |
20 | 19 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #endif | 75 #endif |
77 | 76 |
78 UMA_HISTOGRAM_ENUMERATION("Android.SeccompStatus.Prctl", | 77 UMA_HISTOGRAM_ENUMERATION("Android.SeccompStatus.Prctl", |
79 prctl_supported ? SUPPORTED : NOT_SUPPORTED, | 78 prctl_supported ? SUPPORTED : NOT_SUPPORTED, |
80 LAST_STATUS); | 79 LAST_STATUS); |
81 | 80 |
82 // Probing for the seccomp syscall can provoke kernel panics in certain LGE | 81 // Probing for the seccomp syscall can provoke kernel panics in certain LGE |
83 // devices. For now, this data will not be collected. In the future, this | 82 // devices. For now, this data will not be collected. In the future, this |
84 // should detect SeccompLevel::MULTI_THREADED. http://crbug.com/478478 | 83 // should detect SeccompLevel::MULTI_THREADED. http://crbug.com/478478 |
85 } | 84 } |
OLD | NEW |