2021-07-07 18:08:03 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
|
|
|
#ifndef _LINUX_SECRETMEM_H
|
|
|
|
|
#define _LINUX_SECRETMEM_H
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_SECRETMEM
|
|
|
|
|
|
|
|
|
|
extern const struct address_space_operations secretmem_aops;
|
|
|
|
|
|
2024-03-26 15:32:10 +01:00
|
|
|
static inline bool secretmem_mapping(struct address_space *mapping)
|
2021-07-07 18:08:03 -07:00
|
|
|
{
|
|
|
|
|
return mapping->a_ops == &secretmem_aops;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool vma_is_secretmem(struct vm_area_struct *vma);
|
2021-07-07 18:08:07 -07:00
|
|
|
bool secretmem_active(void);
|
2021-07-07 18:08:03 -07:00
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
static inline bool vma_is_secretmem(struct vm_area_struct *vma)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-26 15:32:10 +01:00
|
|
|
static inline bool secretmem_mapping(struct address_space *mapping)
|
2021-07-07 18:08:03 -07:00
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-07 18:08:07 -07:00
|
|
|
static inline bool secretmem_active(void)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-07 18:08:03 -07:00
|
|
|
#endif /* CONFIG_SECRETMEM */
|
|
|
|
|
|
|
|
|
|
#endif /* _LINUX_SECRETMEM_H */
|