android_kernel_samsung_sm8650/fs/incfs/internal.h
Paul Lawrence ca9597811d ANDROID: Incremental fs: Add FS_IOC_ENABLE_VERITY
Add FS_IOC_ENABLE_VERITY ioctl

When called, calculate measurement, validate signature against fsverity,
and set S_VERITY flag.

This does not (yet) preserve the verity status once the inode is
evicted.

Bug: 160634504
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I88af2721f650098accc72a64528c7d85b753c7f6
2021-02-10 14:19:46 -08:00

24 lines
449 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2018 Google LLC
*/
#ifndef _INCFS_INTERNAL_H
#define _INCFS_INTERNAL_H
#include <linux/types.h>
struct mem_range {
u8 *data;
size_t len;
};
static inline struct mem_range range(u8 *data, size_t len)
{
return (struct mem_range){ .data = data, .len = len };
}
#define LOCK_REQUIRED(lock) WARN_ON_ONCE(!mutex_is_locked(&lock))
#define EFSCORRUPTED EUCLEAN
#endif /* _INCFS_INTERNAL_H */