Documentation ¶
Overview ¶
* Copyright (c) 2022, HabanaLabs Ltd. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- func AttachCgroupDeviceFilter(prog *ebpf.Program, dirFd int) error
- func CGroupVersion(rootPath string, pid int) (int, error)
- func DetachCgroupDeviceFilter(prog *ebpf.Program, dirFd int) error
- func FindAttachedCgroupDeviceFilters(dirFd int) ([]*ebpf.Program, error)
- func PrependDeviceFilter(devices []specs.LinuxDeviceCgroup, origInsts asm.Instructions) (asm.Instructions, error)
- type DeviceRule
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachCgroupDeviceFilter ¶
AttachCgroupDeviceFilter attaches a new device filter ebpf program to a cgroup.
func CGroupVersion ¶
TODO: not sure yet the meaning of rootPath since proc is under / CGroupVersion returns the verions of linux cgroup in use for the process
func DetachCgroupDeviceFilter ¶
DetachCgroupDeviceFilter detaches an existing device filter ebpf program from a cgroup.
func FindAttachedCgroupDeviceFilters ¶
FindAttachedCgroupDeviceFilters finds all ebpf prgrams associated with 'dirFd' that control device access
func PrependDeviceFilter ¶
func PrependDeviceFilter(devices []specs.LinuxDeviceCgroup, origInsts asm.Instructions) (asm.Instructions, error)
PrependDeviceFilter prepends a set of instructions for further device filtering to an existing device filtering ebpf program
Types ¶
type DeviceRule ¶
type DeviceRule = specs.LinuxDeviceCgroup