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

/linux-4.4.14/include/uapi/linux/
H A Dfcntl.h31 * Set/Get seals
37 * Types of seals
39 #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
/linux-4.4.14/include/linux/
H A Dshmem_fs.h15 unsigned int seals; /* shmem seals */ member in struct:shmem_inode_info
69 extern int shmem_add_seals(struct file *file, unsigned int seals);
/linux-4.4.14/tools/testing/selftests/memfd/
H A Dfuse_test.c77 static void mfd_assert_has_seals(int fd, __u64 seals) mfd_assert_has_seals() argument
82 if (s != seals) { mfd_assert_has_seals()
84 (unsigned long long)seals, (unsigned long long)s, fd); mfd_assert_has_seals()
89 static void mfd_assert_add_seals(int fd, __u64 seals) mfd_assert_add_seals() argument
95 r = fcntl(fd, F_ADD_SEALS, seals); mfd_assert_add_seals()
98 fd, (unsigned long long)s, (unsigned long long)seals); mfd_assert_add_seals()
103 static int mfd_busy_add_seals(int fd, __u64 seals) mfd_busy_add_seals() argument
114 r = fcntl(fd, F_ADD_SEALS, seals); mfd_busy_add_seals()
117 fd, (unsigned long long)s, (unsigned long long)seals); mfd_busy_add_seals()
H A Dmemfd_test.c76 static void mfd_assert_has_seals(int fd, unsigned int seals) mfd_assert_has_seals() argument
81 if (s != seals) { mfd_assert_has_seals()
82 printf("%u != %u = GET_SEALS(%d)\n", seals, s, fd); mfd_assert_has_seals()
87 static void mfd_assert_add_seals(int fd, unsigned int seals) mfd_assert_add_seals() argument
93 r = fcntl(fd, F_ADD_SEALS, seals); mfd_assert_add_seals()
95 printf("ADD_SEALS(%d, %u -> %u) failed: %m\n", fd, s, seals); mfd_assert_add_seals()
100 static void mfd_fail_add_seals(int fd, unsigned int seals) mfd_fail_add_seals() argument
111 r = fcntl(fd, F_ADD_SEALS, seals); mfd_fail_add_seals()
114 fd, s, seals); mfd_fail_add_seals()
584 * A very basic sealing test to see whether setting/retrieving seals works.
594 /* add basic seals */ test_basic()
607 /* add more seals and seal against sealing */ test_basic()
730 * Test that seals are shared between dupped FDs and they're all equal.
769 * Modifying seals is only allowed if no other mmap() refs exist.
/linux-4.4.14/mm/
H A Dshmem.c577 if ((newsize < oldsize && (info->seals & F_SEAL_SHRINK)) || shmem_setattr()
578 (newsize > oldsize && (info->seals & F_SEAL_GROW))) shmem_setattr()
1434 info->seals = F_SEAL_SEAL; shmem_get_inode()
1500 if (unlikely(info->seals)) { shmem_write_begin()
1501 if (info->seals & F_SEAL_WRITE) shmem_write_begin()
1503 if ((info->seals & F_SEAL_GROW) && pos + len > inode->i_size) shmem_write_begin()
1962 int shmem_add_seals(struct file *file, unsigned int seals) shmem_add_seals() argument
1978 * kinds of access to the file. Currently, the following seals are shmem_add_seals()
1980 * SEAL_SEAL: Prevent further seals from being set on this file shmem_add_seals()
1986 * must prevent seals from being removed. Therefore, sealing a file shmem_add_seals()
1987 * only adds a given set of seals to the file, it never touches shmem_add_seals()
1988 * existing seals. Furthermore, the "setting seals"-operation can be shmem_add_seals()
1993 * anonymous shmem files support sealing. More importantly, seals are shmem_add_seals()
2002 if (seals & ~(unsigned int)F_ALL_SEALS) shmem_add_seals()
2007 if (info->seals & F_SEAL_SEAL) { shmem_add_seals()
2012 if ((seals & F_SEAL_WRITE) && !(info->seals & F_SEAL_WRITE)) { shmem_add_seals()
2024 info->seals |= seals; shmem_add_seals()
2038 return SHMEM_I(file_inode(file))->seals; shmem_get_seals()
2087 if (info->seals & F_SEAL_WRITE) { shmem_fallocate()
2118 if ((info->seals & F_SEAL_GROW) && offset + len > inode->i_size) { shmem_fallocate()
2973 info->seals &= ~F_SEAL_SEAL; SYSCALL_DEFINE2()
/linux-4.4.14/fs/reiserfs/
H A Dnamei.c1499 * we should check seals here, not do reiserfs_rename()
1506 * than one path at once. The seals would reiserfs_rename()

Completed in 150 milliseconds