Skip to content
Snippets Groups Projects
Select Git revision
  • c548af9d530748713cb2f64b0be622649ab663eb
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

seccomp.h

Blame
  • user avatar
    Will Drewry authored and Iliyan Malchev committed
    This change adds the SECCOMP_RET_ERRNO as a valid return value from a
    seccomp filter.  Additionally, it makes the first use of the lower
    16-bits for storing a filter-supplied errno.  16-bits is more than
    enough for the errno-base.h calls.
    
    Returning errors instead of immediately terminating processes that
    violate seccomp policy allow for broader use of this functionality
    for kernel attack surface reduction.  For example, a linux container
    could maintain a whitelist of pre-existing system calls but drop
    all new ones with errnos.  This would keep a logically static attack
    surface while providing errnos that may allow for graceful failure
    without the downside of do_exit() on a bad call.
    
    This change also changes the signature of __secure_computing.  It
    appears the only direct caller is the arm entry code and it clobbers
    any possible return value (register) immediately.
    
    Signed-off-by: default avatarWill Drewry <wad@chromium.org>
    Acked-by: default avatarSerge Hallyn <serge.hallyn@canonical.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Acked-by: default avatarEric Paris <eparis@redhat.com>
    
    v18: - fix up comments and rebase
         - fix bad var name which was fixed in later revs
         - remove _int() and just change the __secure_computing signature
    v16-v17: ...
    v15: - use audit_seccomp and add a skip label. (eparis@redhat.com)
         - clean up and pad out return codes (indan@nul.nu)
    v14: - no change/rebase
    v13: - rebase on to 88ebdda6
    v12: - move to WARN_ON if filter is NULL
           (oleg@redhat.com, luto@mit.edu, keescook@chromium.org)
         - return immediately for filter==NULL (keescook@chromium.org)
         - change evaluation to only compare the ACTION so that layered
           errnos don't result in the lowest one being returned.
           (keeschook@chromium.org)
    v11: - check for NULL filter (keescook@chromium.org)
    v10: - change loaders to fn
     v9: - n/a
     v8: - update Kconfig to note new need for syscall_set_return_value.
         - reordered such that TRAP behavior follows on later.
         - made the for loop a little less indent-y
     v7: - introduced
    c548af9d
    History
    seccomp.h 3.15 KiB