Searched refs:seals (Results 1 - 9 of 9) sorted by relevance

/linux-master/mm/
H A Dmemfd.c129 return &SHMEM_I(file_inode(file))->seals;
133 return &HUGETLBFS_I(file_inode(file))->seals;
146 static int memfd_add_seals(struct file *file, unsigned int seals) argument
164 * following seals are defined:
165 * SEAL_SEAL: Prevent further seals from being set on this file
172 * must prevent seals from being removed. Therefore, sealing a file
173 * only adds a given set of seals to the file, it never touches
174 * existing seals. Furthermore, the "setting seals"-operation can be
180 * importantly, seals ar
230 unsigned int *seals = memfd_file_seals_ptr(file); local
[all...]
H A Dshmem.c1166 if ((info->seals & F_SEAL_EXEC) && (attr->ia_valid & ATTR_MODE)) {
1177 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) ||
1178 (newsize > oldsize && (info->seals & F_SEAL_GROW)))
2433 ret = seal_check_write(info->seals, vma);
2519 info->seals = F_SEAL_SEAL;
2736 if (unlikely(info->seals & (F_SEAL_GROW |
2738 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE))
2740 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size)
3103 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) {
3135 if ((info->seals
[all...]
/linux-master/tools/testing/selftests/memfd/
H A Dfuse_test.c77 static void mfd_assert_has_seals(int fd, __u64 seals) argument
82 if (s != seals) {
84 (unsigned long long)seals, (unsigned long long)s, fd);
89 static void mfd_assert_add_seals(int fd, __u64 seals) argument
95 r = fcntl(fd, F_ADD_SEALS, seals);
98 fd, (unsigned long long)s, (unsigned long long)seals);
103 static int mfd_busy_add_seals(int fd, __u64 seals) argument
114 r = fcntl(fd, F_ADD_SEALS, seals);
117 fd, (unsigned long long)s, (unsigned long long)seals);
H A Dmemfd_test.c192 static void mfd_assert_has_seals(int fd, unsigned int seals) argument
199 if (s != seals) {
200 printf("%u != %u = GET_SEALS(%s)\n", seals, s, buf);
205 static void mfd_assert_add_seals(int fd, unsigned int seals) argument
211 r = fcntl(fd, F_ADD_SEALS, seals);
213 printf("ADD_SEALS(%d, %u -> %u) failed: %m\n", fd, s, seals);
218 static void mfd_fail_add_seals(int fd, unsigned int seals) argument
229 r = fcntl(fd, F_ADD_SEALS, seals);
232 fd, s, seals);
866 * A very basic sealing test to see whether setting/retrieving seals work
[all...]
/linux-master/drivers/dma-buf/
H A Dudmabuf.c208 int seals, ret = -EINVAL; local
245 seals = memfd_fcntl(memfd, F_GET_SEALS, 0);
246 if (seals == -EINVAL)
249 if ((seals & SEALS_WANTED) != SEALS_WANTED ||
250 (seals & SEALS_DENIED) != 0)
/linux-master/include/linux/
H A Dshmem_fs.h22 unsigned int seals; /* shmem seals */ member in struct:shmem_inode_info
H A Dhugetlb.h549 unsigned int seals; member in struct:hugetlbfs_inode_info
H A Dmm.h4139 * @seals: the seals to check
4145 static inline int seal_check_write(int seals, struct vm_area_struct *vma)
4147 if (seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) {
4150 * write seals are active.
4143 seal_check_write(int seals, struct vm_area_struct *vma) argument
/linux-master/fs/hugetlbfs/
H A Dinode.c116 ret = seal_check_write(info->seals, vma);
765 if (info->seals & (F_SEAL_WRITE | F_SEAL_FUTURE_WRITE)) {
837 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) {
947 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) ||
948 (newsize > oldsize && (info->seals & F_SEAL_GROW)))
1016 info->seals = F_SEAL_SEAL;

Completed in 258 milliseconds