首页 > Linux下的seccomp要怎么使用

Linux下的seccomp要怎么使用

我按照http://lwn.net/Articles/441368/ 说的,类似

  const char filters[] =
    "sys_read: (fd == 1) || (fd == 2)\n"
    "sys_write: (fd == 0)\n"
    "sys_exit: 1\n"
    "sys_exit_group: 1\n"
    "on_next_syscall: 1";
  prctl(PR_SET_SECCOMP, 2, filters);

去写,但是prctl一直失败返回-1。seccomp到底应该怎么用?

-
如果这个用法是错的,要怎么实现on_next_syscall的效果?

【热门文章】
【热门文章】