Home | History | Annotate | Download | only in seccomp-bpf

Lines Matching refs:Trap

5 #include "sandbox/linux/seccomp-bpf/trap.h"
77 Trap::Trap()
107 Trap* Trap::GetInstance() {
111 // Also, this is not a normal singleton. Once created, the global trap
114 global_trap_ = new Trap();
116 SANDBOX_DIE("Failed to allocate global trap handler");
122 void Trap::SigSysAction(int nr, siginfo_t* info, void* void_context) {
126 "for Trap() handling.");
131 void Trap::SigSys(int nr, siginfo_t* info, void* void_context) {
210 const TrapKey& trap = trap_array_[info->si_errno - 1];
211 if (!trap.safe) {
231 rc = trap.fnc(data, const_cast<void*>(trap.aux));
243 bool Trap::TrapKey::operator<(const TrapKey& o) const {
253 uint16_t Trap::MakeTrap(TrapFnc fnc, const void* aux, bool safe) {
257 uint16_t Trap::MakeTrapImpl(TrapFnc fnc, const void* aux, bool safe) {
282 // us to associate trap with the appropriate handler. The kernel allows us
284 // avoid 0, as it could be confused for a trap without any specific id.
355 bool Trap::SandboxDebuggingAllowedByUser() const {
360 bool Trap::EnableUnsafeTrapsInSigSysHandler() {
361 Trap* trap = GetInstance();
362 if (!trap->has_unsafe_traps_) {
368 if (trap->SandboxDebuggingAllowedByUser()) {
372 trap->has_unsafe_traps_ = true;
380 return trap->has_unsafe_traps_;
383 bool Trap::IsSafeTrapId(uint16_t id) {
390 Trap* Trap::global_trap_;