Skip to content

Helper function bpf_ima_file_hash

v5.18

Definition

Copyright (c) 2015 The Libbpf Authors. All rights reserved.

Returns a calculated IMA hash of the file. If the hash is larger than size, then only size bytes will be copied to dst

Returns

The hash_algo is returned on success, -EOPNOTSUPP if the hash calculation failed or -EINVAL if invalid arguments are passed.

static long (* const bpf_ima_file_hash)(struct file *file, void *dst, __u32 size) = (void *) 193;

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

This helper call can be used in the following program types:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome