#include #include #include #include #include #include #include "libbpf.h" #include "bpf_load.h" #include /* install fake seccomp program to enable seccomp code path inside the kernel, * so that our kprobe attached to seccomp_phase1() can be triggered */ static void install_accept_all_seccomp(void) { struct sock_filter filter[] = { BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW), }; struct sock_fprog prog = { .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])), .filter = filter, }; if (prctl(PR_SET_SECCOMP, 2, &prog)) perror("prctl"); } int main(int ac, char **argv) { FILE *f; char filename[256]; struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); setrlimit(RLIMIT_MEMLOCK, &r); if (load_bpf_file(filename)) { printf("%s", bpf_log_buf); return 1; } install_accept_all_seccomp(); f = popen("dd if=/dev/zero of=/dev/null count=5", "r"); (void) f; read_trace_pipe(); return 0; } net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-03 16:40:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-03 16:40:21 -0800
commit0cb65c83304a341b9d09678448d7c8b550689531 (patch)
treeef0c7158b4c065feb39fa59dbeea1d68b5eac2c0 /sound/soc/fsl/mpc8610_hpcd.c
parent3c49de52d5647cda8b42c4255cf8a29d1e22eff5 (diff)
parentab7cd8d83e5dba13027de66f1b008b08b30b71a4 (diff)
Merge tag 'drm-fixes-for-v4.9-rc8' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "A pretty small pull request: a couple of AMD powerxpress regression fixes and a power management fix, a couple of i915 fixes and one hdlcd fix, along with one core don't oops because of incorrect API usage fix" * tag 'drm-fixes-for-v4.9-rc8' of git://people.freedesktop.org/~airlied/linux: drm/i915: drop the struct_mutex when wedged or trying to reset drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error drm: Don't call drm_for_each_crtc with a non-KMS driver drm/radeon: fix check for port PM availability drm/amdgpu: fix check for port PM availability drm/amd/powerplay: initialize the soft_regs offset in struct smu7_hwmgr drm: hdlcd: Fix cleanup order
Diffstat (limited to 'sound/soc/fsl/mpc8610_hpcd.c')