Home
last modified time | relevance | path

Searched refs:seals (Results 1 – 10 of 10) sorted by relevance

/kernel/linux/linux-5.10/tools/testing/selftests/memfd/
Dfuse_test.c76 static void mfd_assert_has_seals(int fd, __u64 seals) in mfd_assert_has_seals() argument
81 if (s != seals) { in mfd_assert_has_seals()
83 (unsigned long long)seals, (unsigned long long)s, fd); in mfd_assert_has_seals()
88 static void mfd_assert_add_seals(int fd, __u64 seals) in mfd_assert_add_seals() argument
94 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
97 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_assert_add_seals()
102 static int mfd_busy_add_seals(int fd, __u64 seals) in mfd_busy_add_seals() argument
113 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_busy_add_seals()
116 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_busy_add_seals()
Dmemfd_test.c99 static void mfd_assert_has_seals(int fd, unsigned int seals) in mfd_assert_has_seals() argument
104 if (s != seals) { in mfd_assert_has_seals()
105 printf("%u != %u = GET_SEALS(%d)\n", seals, s, fd); in mfd_assert_has_seals()
110 static void mfd_assert_add_seals(int fd, unsigned int seals) in mfd_assert_add_seals() argument
116 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
118 printf("ADD_SEALS(%d, %u -> %u) failed: %m\n", fd, s, seals); in mfd_assert_add_seals()
123 static void mfd_fail_add_seals(int fd, unsigned int seals) in mfd_fail_add_seals() argument
134 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_fail_add_seals()
137 fd, s, seals); in mfd_fail_add_seals()
/kernel/linux/linux-5.10/mm/
Dmemfd.c139 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr()
143 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr()
155 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument
194 if (seals & ~(unsigned int)F_ALL_SEALS) in memfd_add_seals()
210 if ((seals & F_SEAL_WRITE) && !(*file_seals & F_SEAL_WRITE)) { in memfd_add_seals()
222 *file_seals |= seals; in memfd_add_seals()
232 unsigned int *seals = memfd_file_seals_ptr(file); in memfd_get_seals() local
234 return seals ? *seals : -EINVAL; in memfd_get_seals()
Dshmem.c1104 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in shmem_setattr()
1105 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in shmem_setattr()
2266 ret = seal_check_future_write(info->seals, vma); in shmem_mmap()
2305 info->seals = F_SEAL_SEAL; in shmem_get_inode()
2526 if (unlikely(info->seals & (F_SEAL_GROW | in shmem_write_begin()
2528 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) in shmem_write_begin()
2530 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size) in shmem_write_begin()
2791 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in shmem_fallocate()
2823 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in shmem_fallocate()
/kernel/linux/linux-5.10/drivers/dma-buf/
Dudmabuf.c173 int seals, ret = -EINVAL; in udmabuf_create() local
209 seals = memfd_fcntl(memfd, F_GET_SEALS, 0); in udmabuf_create()
210 if (seals == -EINVAL) in udmabuf_create()
213 if ((seals & SEALS_WANTED) != SEALS_WANTED || in udmabuf_create()
214 (seals & SEALS_DENIED) != 0) in udmabuf_create()
/kernel/linux/linux-5.10/fs/hugetlbfs/
Dinode.c150 ret = seal_check_future_write(info->seals, vma); in hugetlbfs_file_mmap()
614 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in hugetlbfs_punch_hole()
668 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in hugetlbfs_fallocate()
782 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr()
783 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr()
852 info->seals = F_SEAL_SEAL; in hugetlbfs_get_inode()
/kernel/linux/linux-5.10/include/linux/
Dshmem_fs.h17 unsigned int seals; /* shmem seals */ member
Dhugetlb.h426 unsigned int seals; member
Dmm.h3238 static inline int seal_check_future_write(int seals, struct vm_area_struct *vma) in seal_check_future_write() argument
3240 if (seals & F_SEAL_FUTURE_WRITE) { in seal_check_future_write()
/kernel/linux/linux-5.10/Documentation/security/tpm/
Dxen-tpmfront.rst19 which seals the secrets to the Physical TPM. If the process of creating each of