Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/memfd/
A 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()
A 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()
/linux/mm/
A Dmemfd.c123 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr()
127 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr()
139 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument
178 if (seals & ~(unsigned int)F_ALL_SEALS) in memfd_add_seals()
194 if ((seals & F_SEAL_WRITE) && !(*file_seals & F_SEAL_WRITE)) { in memfd_add_seals()
206 *file_seals |= seals; in memfd_add_seals()
216 unsigned int *seals = memfd_file_seals_ptr(file); in memfd_get_seals() local
218 return seals ? *seals : -EINVAL; in memfd_get_seals()
A Dshmem.c1097 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in shmem_setattr()
1098 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in shmem_setattr()
2261 ret = seal_check_future_write(info->seals, vma); in shmem_mmap()
2300 info->seals = F_SEAL_SEAL; in shmem_get_inode()
2462 if (unlikely(info->seals & (F_SEAL_GROW | in shmem_write_begin()
2464 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) in shmem_write_begin()
2466 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size) in shmem_write_begin()
2661 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in shmem_fallocate()
2693 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in shmem_fallocate()
/linux/drivers/dma-buf/
A Dudmabuf.c176 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()
/linux/fs/hugetlbfs/
A Dinode.c150 ret = seal_check_future_write(info->seals, vma); in hugetlbfs_file_mmap()
609 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in hugetlbfs_punch_hole()
663 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in hugetlbfs_fallocate()
783 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr()
784 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr()
851 info->seals = F_SEAL_SEAL; in hugetlbfs_get_inode()
/linux/include/linux/
A Dshmem_fs.h17 unsigned int seals; /* shmem seals */ member
A Dhugetlb.h469 unsigned int seals; member
A Dmm.h3370 static inline int seal_check_future_write(int seals, struct vm_area_struct *vma) in seal_check_future_write() argument
3372 if (seals & F_SEAL_FUTURE_WRITE) { in seal_check_future_write()
/linux/Documentation/security/tpm/
A Dxen-tpmfront.rst19 which seals the secrets to the Physical TPM. If the process of creating each of

Completed in 52 milliseconds