Skip to content

Commit

Permalink
Merge branch 'AkihiroSuda-kernel58'
Browse files Browse the repository at this point in the history
  • Loading branch information
syndtr committed Aug 15, 2020
2 parents ce1475b + 2a04d2b commit 42c35b4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion capability/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const (
//go:generate go run enumgen/gen.go
type Cap int

// POSIX-draft defined capabilities.
// POSIX-draft defined capabilities and Linux extensions.
//
// Defined in https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h
const (
// In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this
// overrides the restriction of changing file ownership and group
Expand Down Expand Up @@ -293,6 +295,10 @@ const (
// CAP_PERFMON and CAP_BPF are required to load tracing programs.
// CAP_NET_ADMIN and CAP_BPF are required to load networking programs.
CAP_BPF = Cap(39)

// Allow checkpoint/restore related operations.
// Introduced in kernel 5.9
CAP_CHECKPOINT_RESTORE = Cap(40)
)

var (
Expand Down
3 changes: 3 additions & 0 deletions capability/enum_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func (c Cap) String() string {
return "perfmon"
case CAP_BPF:
return "bpf"
case CAP_CHECKPOINT_RESTORE:
return "checkpoint_restore"
}
return "unknown"
}
Expand Down Expand Up @@ -131,5 +133,6 @@ func List() []Cap {
CAP_AUDIT_READ,
CAP_PERFMON,
CAP_BPF,
CAP_CHECKPOINT_RESTORE,
}
}

0 comments on commit 42c35b4

Please sign in to comment.