Home
last modified time | relevance | path

Searched refs:shmfd (Results 1 – 18 of 18) sorted by relevance

/freebsd/sys/security/mac/
H A Dmac_posix_shm.c66 mac_posixshm_init(struct shmfd *shmfd) in mac_posixshm_init() argument
84 mac_posixshm_destroy(struct shmfd *shmfd) in mac_posixshm_destroy() argument
153 struct shmfd *shmfd) in mac_posixshm_check_stat() argument
158 shmfd, shmfd->shm_label); in mac_posixshm_check_stat()
160 shmfd); in mac_posixshm_check_stat()
170 struct shmfd *shmfd) in mac_posixshm_check_truncate() argument
175 file_cred, shmfd, shmfd->shm_label); in mac_posixshm_check_truncate()
234 struct shmfd *shmfd) in mac_posixshm_check_read() argument
239 file_cred, shmfd, shmfd->shm_label); in mac_posixshm_check_read()
251 struct shmfd *shmfd) in mac_posixshm_check_write() argument
[all …]
H A Dmac_framework.h77 struct shmfd;
324 int mac_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd,
326 int mac_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd,
329 struct ucred *file_cred, struct shmfd *shmfd);
330 int mac_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd,
332 int mac_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd,
335 struct ucred *file_cred, struct shmfd *shmfd);
337 struct ucred *file_cred, struct shmfd *shmfd);
338 int mac_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd);
340 struct ucred *file_cred, struct shmfd *shmfd);
[all …]
H A Dmac_policy.h94 struct shmfd;
376 struct shmfd *shmfd, struct label *shmlabel, int prot,
379 struct shmfd *shmfd, struct label *shmlabel,
382 struct ucred *file_cred, struct shmfd *shmfd,
385 struct shmfd *shmfd, struct label *shmlabel,
388 struct shmfd *shmfd, struct label *shmlabel,
391 struct ucred *file_cred, struct shmfd *shmfd,
394 struct ucred *file_cred, struct shmfd *shmfd,
397 struct shmfd *shmfd, struct label *shmlabel);
399 struct ucred *file_cred, struct shmfd *shmfd,
[all …]
/freebsd/sys/kern/
H A Duipc_shm.c416 struct shmfd *shmfd; in shm_seek() local
458 struct shmfd *shmfd; in shm_read() local
481 struct shmfd *shmfd; in shm_write() local
535 struct shmfd *shmfd; in shm_truncate() local
553 struct shmfd *shmfd; in shm_ioctl() local
604 struct shmfd *shmfd; in shm_stat() local
649 struct shmfd *shmfd; in shm_close() local
939 struct shmfd *shmfd; in shm_alloc() local
1159 struct shmfd *shmfd; in kern_shm_open2() local
1653 struct shmfd *shmfd; in shm_mmap() local
[all …]
H A Dkern_sendfile.c564 struct vnode **vp_res, struct shmfd **shmfd_res, off_t *obj_size, in sendfile_getobj()
569 struct shmfd *shmfd; in sendfile_getobj() local
575 shmfd = *shmfd_res = NULL; in sendfile_getobj()
611 shmfd = fp->f_data; in sendfile_getobj()
612 obj = shmfd->shm_object; in sendfile_getobj()
614 *obj_size = shmfd->shm_size; in sendfile_getobj()
635 *shmfd_res = shmfd; in sendfile_getobj()
685 struct shmfd *shmfd; in vn_sendfile() local
706 error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size, &bsize); in vn_sendfile()
H A Dkern_umtx.c4303 struct shmfd *ushm_obj;
/freebsd/sys/sys/
H A Dmman.h263 struct shmfd { struct
304 int shm_access(struct shmfd *shmfd, struct ucred *ucred, int flags); argument
305 struct shmfd *shm_alloc(struct ucred *ucred, mode_t mode, bool largepage);
306 struct shmfd *shm_hold(struct shmfd *shmfd);
307 void shm_drop(struct shmfd *shmfd);
308 int shm_dotruncate(struct shmfd *shmfd, off_t length);
309 bool shm_largepage(struct shmfd *shmfd);
/freebsd/tools/test/stress2/misc/
H A Dsendfile_shm.sh88 load(int infd, int shmfd, off_t size)
99 write(shmfd, buf, r);
104 sendfd(int s, int shmfd, off_t size)
111 err(1, "sendfile(%d, %d, %jd)", s, shmfd, size);
147 int s[2], infd, outfd, shmfd, error;
171 shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
172 if (shmfd == -1)
174 error = ftruncate(shmfd, st.st_size);
177 load(infd, shmfd, st.st_size);
190 sendfd(s[0], shmfd, st.st_size);
[all …]
H A Dshm3.sh30 int error, shmfd;
33 shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
34 if (shmfd == -1)
36 error = ftruncate(shmfd, SZ);
41 error = write(shmfd, buf, sizeof(buf));
48 shmfd, 0);
53 close(shmfd);
H A Dshm_super.sh53 int error, shmfd;
55 shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
56 if (shmfd == -1)
58 error = ftruncate(shmfd, SZ);
63 error = write(shmfd, buf, sizeof(buf));
70 MAP_ALIGNED_SUPER, shmfd, 0);
/freebsd/tests/sys/vm/
H A Dmmap_test.c136 int devstatfd, pagesize, shmfd, zerofd; in ATF_TC_BODY() local
140 ATF_REQUIRE((shmfd = shm_open(SHM_ANON, O_RDWR, 0644)) >= 0); in ATF_TC_BODY()
141 ATF_REQUIRE(ftruncate(shmfd, pagesize) == 0); in ATF_TC_BODY()
147 checked_mmap(PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, 0, in ATF_TC_BODY()
149 checked_mmap(PROT_READ | PROT_WRITE, MAP_PRIVATE, shmfd, 0, in ATF_TC_BODY()
161 checked_mmap(0xffff, MAP_SHARED, shmfd, EINVAL, in ATF_TC_BODY()
171 checked_mmap(PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_SHARED, shmfd, in ATF_TC_BODY()
175 checked_mmap(PROT_READ | PROT_WRITE, 0, shmfd, EINVAL, in ATF_TC_BODY()
200 close(shmfd); in ATF_TC_BODY()
H A Dmlock_test.c186 int count, error, shmfd; in ATF_TC_BODY() local
203 shmfd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600); in ATF_TC_BODY()
204 ATF_REQUIRE_MSG(shmfd >= 0, "shm_open: %s", strerror(errno)); in ATF_TC_BODY()
205 error = ftruncate(shmfd, len); in ATF_TC_BODY()
209 MAP_SHARED | MAP_ALIGNED_SUPER, shmfd, 0); in ATF_TC_BODY()
214 MAP_SHARED | MAP_ALIGNED_SUPER, shmfd, 0); in ATF_TC_BODY()
235 error = ftruncate(shmfd, len - pagesizes[0]); in ATF_TC_BODY()
241 error = ftruncate(shmfd, len); in ATF_TC_BODY()
274 ATF_REQUIRE(close(shmfd) == 0); in ATF_TC_BODY()
/freebsd/tools/tools/syscall_timing/
H A Dsyscall_timing.c696 int shmfd; in test_shmfd() local
699 if (shmfd < 0) in test_shmfd()
701 close(shmfd); in test_shmfd()
705 if (shmfd < 0) in test_shmfd()
707 close(shmfd); in test_shmfd()
717 int fd, shmfd; in test_shmfd_dup() local
720 if (shmfd < 0) in test_shmfd_dup()
732 close(shmfd); in test_shmfd_dup()
741 int shmfd; in test_shmfd_fstat() local
744 if (shmfd < 0) in test_shmfd_fstat()
[all …]
/freebsd/sys/security/mac_stub/
H A Dmac_stub.c762 stub_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_check_mmap() argument
770 stub_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_check_open() argument
779 struct shmfd *shm, struct label *shmlabel) in stub_posixshm_check_read()
786 stub_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_check_setmode() argument
794 stub_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_check_setowner() argument
803 struct shmfd *shmfd, struct label *shmlabel) in stub_posixshm_check_stat() argument
811 struct ucred *file_cred, struct shmfd *shmfd, struct label *shmlabel) in stub_posixshm_check_truncate() argument
818 stub_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_check_unlink() argument
827 struct shmfd *shm, struct label *shmlabel) in stub_posixshm_check_write()
834 stub_posixshm_create(struct ucred *cred, struct shmfd *shmfd, in stub_posixshm_create() argument
/freebsd/sys/security/mac_mls/
H A Dmac_mls.c1591 mls_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_check_mmap() argument
1615 mls_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_check_open() argument
1640 struct shmfd *shm, struct label *shmlabel) in mls_posixshm_check_read()
1657 mls_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_check_setmode() argument
1675 mls_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_check_setowner() argument
1694 struct shmfd *shmfd, struct label *shmlabel) in mls_posixshm_check_stat() argument
1712 struct ucred *file_cred, struct shmfd *shmfd, struct label *shmlabel) in mls_posixshm_check_truncate() argument
1729 mls_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_check_unlink() argument
1748 struct shmfd *shm, struct label *shmlabel) in mls_posixshm_check_write()
1765 mls_posixshm_create(struct ucred *cred, struct shmfd *shmfd, in mls_posixshm_create() argument
/freebsd/sys/security/mac_test/
H A Dmac_test.c1427 test_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_check_mmap() argument
1439 test_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_check_open() argument
1452 struct ucred *file_cred, struct shmfd *shm, struct label *shmlabel) in test_posixshm_check_read()
1466 test_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_check_setmode() argument
1478 test_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_check_setowner() argument
1491 struct ucred *file_cred, struct shmfd *shmfd, struct label *shmfdlabel) in test_posixshm_check_stat() argument
1504 struct ucred *file_cred, struct shmfd *shmfd, struct label *shmfdlabel) in test_posixshm_check_truncate() argument
1516 test_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_check_unlink() argument
1529 struct ucred *file_cred, struct shmfd *shm, struct label *shmlabel) in test_posixshm_check_write()
1543 test_posixshm_create(struct ucred *cred, struct shmfd *shmfd, in test_posixshm_create() argument
/freebsd/sys/security/mac_biba/
H A Dmac_biba.c1695 biba_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_check_mmap() argument
1719 biba_posixshm_check_open(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_check_open() argument
1744 struct shmfd *vp, struct label *shmlabel) in biba_posixshm_check_read()
1761 biba_posixshm_check_setmode(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_check_setmode() argument
1779 biba_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_check_setowner() argument
1798 struct shmfd *shmfd, struct label *shmlabel) in biba_posixshm_check_stat() argument
1816 struct ucred *file_cred, struct shmfd *shmfd, struct label *shmlabel) in biba_posixshm_check_truncate() argument
1833 biba_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_check_unlink() argument
1852 struct shmfd *vp, struct label *shmlabel) in biba_posixshm_check_write()
1869 biba_posixshm_create(struct ucred *cred, struct shmfd *shmfd, in biba_posixshm_create() argument
/freebsd/lib/libprocstat/
H A Dlibprocstat.c1180 struct shmfd shmfd; in procstat_get_shm_info_kvm() local
1192 if (!kvm_read_all(kd, (unsigned long)shmfdp, &shmfd, in procstat_get_shm_info_kvm()
1193 sizeof(struct shmfd))) { in procstat_get_shm_info_kvm()
1197 shm->mode = S_IFREG | shmfd.shm_mode; in procstat_get_shm_info_kvm()
1198 shm->size = shmfd.shm_size; in procstat_get_shm_info_kvm()
1199 if (fst->fs_path == NULL && shmfd.shm_path != NULL) { in procstat_get_shm_info_kvm()
1202 if (!kvm_read_all(kd, (unsigned long)shmfd.shm_path + i, in procstat_get_shm_info_kvm()