Home
last modified time | relevance | path

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

/linux-6.3-rc2/tools/testing/selftests/memfd/
A Dfuse_test.c77 static void mfd_assert_has_seals(int fd, __u64 seals) in mfd_assert_has_seals() argument
82 if (s != seals) { in mfd_assert_has_seals()
84 (unsigned long long)seals, (unsigned long long)s, fd); in mfd_assert_has_seals()
89 static void mfd_assert_add_seals(int fd, __u64 seals) in mfd_assert_add_seals() argument
95 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
98 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_assert_add_seals()
103 static int mfd_busy_add_seals(int fd, __u64 seals) in mfd_busy_add_seals() argument
114 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_busy_add_seals()
117 fd, (unsigned long long)s, (unsigned long long)seals); in mfd_busy_add_seals()
A Dmemfd_test.c164 static void mfd_assert_has_seals(int fd, unsigned int seals) in mfd_assert_has_seals() argument
172 if (s != seals) { in mfd_assert_has_seals()
173 printf("%u != %u = GET_SEALS(%s)\n", seals, s, buf); in mfd_assert_has_seals()
178 static void mfd_assert_add_seals(int fd, unsigned int seals) in mfd_assert_add_seals() argument
184 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
186 printf("ADD_SEALS(%d, %u -> %u) failed: %m\n", fd, s, seals); in mfd_assert_add_seals()
191 static void mfd_fail_add_seals(int fd, unsigned int seals) in mfd_fail_add_seals() argument
202 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_fail_add_seals()
205 fd, s, seals); in mfd_fail_add_seals()
/linux-6.3-rc2/mm/
A Dmemfd.c140 return &SHMEM_I(file_inode(file))->seals; in memfd_file_seals_ptr()
144 return &HUGETLBFS_I(file_inode(file))->seals; in memfd_file_seals_ptr()
157 static int memfd_add_seals(struct file *file, unsigned int seals) in memfd_add_seals() argument
197 if (seals & ~(unsigned int)F_ALL_SEALS) in memfd_add_seals()
213 if ((seals & F_SEAL_WRITE) && !(*file_seals & F_SEAL_WRITE)) { in memfd_add_seals()
228 if (seals & F_SEAL_EXEC && inode->i_mode & 0111) in memfd_add_seals()
229 seals |= F_SEAL_SHRINK|F_SEAL_GROW|F_SEAL_WRITE|F_SEAL_FUTURE_WRITE; in memfd_add_seals()
231 *file_seals |= seals; in memfd_add_seals()
241 unsigned int *seals = memfd_file_seals_ptr(file); in memfd_get_seals() local
243 return seals ? *seals : -EINVAL; in memfd_get_seals()
A Dshmem.c1095 if ((info->seals & F_SEAL_EXEC) && (attr->ia_valid & ATTR_MODE)) { in shmem_setattr()
1106 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in shmem_setattr()
1107 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in shmem_setattr()
2302 ret = seal_check_future_write(info->seals, vma); in shmem_mmap()
2370 info->seals = F_SEAL_SEAL; in shmem_get_inode()
2553 if (unlikely(info->seals & (F_SEAL_GROW | in shmem_write_begin()
2555 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) in shmem_write_begin()
2557 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size) in shmem_write_begin()
2764 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in shmem_fallocate()
2796 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in shmem_fallocate()
/linux-6.3-rc2/drivers/dma-buf/
A Dudmabuf.c213 int seals, ret = -EINVAL; in udmabuf_create() local
250 seals = memfd_fcntl(memfd, F_GET_SEALS, 0); in udmabuf_create()
251 if (seals == -EINVAL) in udmabuf_create()
254 if ((seals & SEALS_WANTED) != SEALS_WANTED || in udmabuf_create()
255 (seals & SEALS_DENIED) != 0) in udmabuf_create()
/linux-6.3-rc2/fs/hugetlbfs/
A Dinode.c138 ret = seal_check_future_write(info->seals, vma); in hugetlbfs_file_mmap()
731 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) { in hugetlbfs_punch_hole()
803 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { in hugetlbfs_fallocate()
921 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || in hugetlbfs_setattr()
922 (newsize > oldsize && (info->seals & F_SEAL_GROW))) in hugetlbfs_setattr()
989 info->seals = F_SEAL_SEAL; in hugetlbfs_get_inode()
/linux-6.3-rc2/include/linux/
A Dshmem_fs.h17 unsigned int seals; /* shmem seals */ member
A Dhugetlb.h522 unsigned int seals; member
A Dmm.h3640 static inline int seal_check_future_write(int seals, struct vm_area_struct *vma) in seal_check_future_write() argument
3642 if (seals & F_SEAL_FUTURE_WRITE) { in seal_check_future_write()
/linux-6.3-rc2/Documentation/security/tpm/
A Dxen-tpmfront.rst19 which seals the secrets to the Physical TPM. If the process of creating each of

Completed in 30 milliseconds