/openbmc/linux/tools/testing/selftests/mm/ |
H A D | hugepage-shm.c | 53 int shmid; in main() local 57 shmid = shmget(2, LENGTH, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); in main() 58 if (shmid < 0) { in main() 62 printf("shmid: 0x%x\n", shmid); in main() 64 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); in main() 67 shmctl(shmid, IPC_RMID, NULL); in main() 90 shmctl(shmid, IPC_RMID, NULL); in main() 94 shmctl(shmid, IPC_RMID, NULL); in main()
|
H A D | write_to_hugetlbfs.c | 32 static int shmid; variable 54 shmctl(shmid, IPC_RMID, NULL); in sig_handler() 58 shmctl(shmid, IPC_RMID, NULL); in sig_handler() 200 shmid = shmget(key, size, in main() 202 if (shmid < 0) { in main() 203 shmid = shmget(++key, size, in main() 205 if (shmid < 0) in main() 208 printf("shmid: 0x%x, shmget key:%d\n", shmid, key); in main() 210 ptr = shmat(shmid, NULL, 0); in main() 213 shmctl(shmid, IPC_RMID, NULL); in main()
|
/openbmc/qemu/tests/tcg/multiarch/linux/ |
H A D | linux-shmat-null.c | 13 int shmid; in main() local 18 shmid = shmget(IPC_PRIVATE, 1, IPC_CREAT | 0600); in main() 19 assert(shmid != -1); in main() 20 p = shmat(shmid, NULL, 0); in main() 27 p = shmat(shmid, NULL, 0); in main() 34 err = shmctl(shmid, IPC_RMID, NULL); in main()
|
H A D | linux-shmat-maps.c | 17 int shmid; in main() local 21 shmid = shmget(IPC_PRIVATE, 1, IPC_CREAT | 0600); in main() 22 assert(shmid != -1); in main() 29 p = shmat(shmid, (void *)0x800000, SHM_RND); in main() 37 p = shmat(shmid, NULL, 0); in main() 51 err = shmctl(shmid, IPC_RMID, NULL); in main()
|
H A D | linux-test.c | 519 int shmid; in test_shm() local 521 shmid = chk_error(shmget(IPC_PRIVATE, SHM_SIZE, IPC_CREAT | 0777)); in test_shm() 522 ptr = shmat(shmid, NULL, 0); in test_shm() 529 chk_error(shmctl(shmid, IPC_RMID, 0)); in test_shm()
|
/openbmc/linux/ipc/ |
H A D | shm.c | 996 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument 1006 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down() 1085 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument 1095 shp = shm_obtain_object(ns, shmid); in shmctl_stat() 1101 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat() 1169 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument 1176 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock() 1245 static long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) in ksys_shmctl() argument 1251 if (cmd < 0 || shmid < 0) in ksys_shmctl() 1278 err = shmctl_stat(ns, shmid, cmd, &sem64); in ksys_shmctl() [all …]
|
H A D | util.h | 287 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr);
|
/openbmc/qemu/bsd-user/ |
H A D | bsd-mem.h | 310 static inline abi_long do_bsd_shmctl(abi_long shmid, abi_long cmd, in do_bsd_shmctl() argument 323 ret = get_errno(shmctl(shmid, cmd, &dsarg)); in do_bsd_shmctl() 333 ret = get_errno(shmctl(shmid, cmd, &dsarg)); in do_bsd_shmctl() 337 ret = get_errno(shmctl(shmid, cmd, NULL)); in do_bsd_shmctl() 349 static inline abi_long do_bsd_shmat(int shmid, abi_ulong shmaddr, int shmflg) in do_bsd_shmat() argument 356 ret = get_errno(shmctl(shmid, IPC_STAT, &shm_info)); in do_bsd_shmat() 370 host_raddr = shmat(shmid, (void *)g2h_untagged(shmaddr), shmflg); in do_bsd_shmat() 379 host_raddr = shmat(shmid, g2h_untagged(mmap_start), in do_bsd_shmat()
|
/openbmc/linux/tools/testing/selftests/powerpc/benchmarks/ |
H A D | context_switch.c | 328 int shmid; in futex_setup() local 331 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup() 332 if (shmid < 0) { in futex_setup() 337 shmaddr = shmat(shmid, NULL, 0); in futex_setup() 340 shmctl(shmid, IPC_RMID, NULL); in futex_setup() 344 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
|
/openbmc/linux/include/linux/ |
H A D | shm.h | 17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, 27 static inline long do_shmat(int shmid, char __user *shmaddr, in do_shmat() argument
|
H A D | syscalls.h | 727 asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 728 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 729 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 1268 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
|
H A D | compat.h | 751 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
|
/openbmc/linux/arch/xtensa/kernel/ |
H A D | syscall.c | 39 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) in xtensa_shmat() argument 44 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in xtensa_shmat()
|
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-graphics/x11vnc/files/ |
H A D | CVE-2020-29074.patch | 22 shm->shmid = shmget(IPC_PRIVATE, 26 if (shm->shmid == -1) {
|
/openbmc/linux/tools/testing/selftests/powerpc/mm/ |
H A D | tlbie_test.c | 620 int shmid, run_time = 20 * 60; in main() local 653 shmid = shmget(shm_key, page_size, IPC_CREAT|0666); in main() 654 if (shmid < 0) { in main() 658 map1 = shmat(shmid, NULL, 0); in main() 663 map2 = shmat(shmid, NULL, 0); in main()
|
/openbmc/linux/Documentation/arch/sparc/ |
H A D | adi.rst | 188 int shmid, version; 213 if ((shmid = shmget(2, BUFFER_SIZE, 219 shmaddr = shmat(shmid, NULL, 0); 222 shmctl(shmid, IPC_RMID, NULL); 277 shmctl(shmid, IPC_RMID, NULL); 284 shmctl(shmid, IPC_RMID, NULL);
|
/openbmc/qemu/linux-user/ |
H A D | user-mmap.h | 61 abi_ulong target_shmat(CPUArchState *cpu_env, int shmid,
|
H A D | mmap.c | 1290 abi_ulong target_shmat(CPUArchState *cpu_env, int shmid, in target_shmat() argument 1349 ret = get_errno(shmctl(shmid, IPC_STAT, &shm_info)); in target_shmat() 1421 test = shmat(shmid, want, shmflg); in target_shmat()
|
H A D | syscall.c | 4462 static inline abi_long do_shmctl(int shmid, int cmd, abi_long buf) in do_shmctl() argument 4477 ret = get_errno(shmctl(shmid, cmd, &dsarg)); in do_shmctl() 4482 ret = get_errno(shmctl(shmid, cmd, (struct shmid_ds *)&shminfo)); in do_shmctl() 4487 ret = get_errno(shmctl(shmid, cmd, (struct shmid_ds *)&shm_info)); in do_shmctl() 4494 ret = get_errno(shmctl(shmid, cmd, NULL)); in do_shmctl()
|
/openbmc/linux/Documentation/arch/ia64/ |
H A D | err_inject.rst | 304 int shmid; 319 shmid = shmget(key, SHM_SIZE, 0644 | IPC_CREAT); 320 if (shmid == -1) { 322 shmid = shmget(key, SHM_SIZE, 0); 323 if (shmid == -1) { 333 vbprintf("shmid=%d", shmid); 336 shmaddr = shmat(shmid, (void *)SHM_VA, 0); 352 semctl(shmid, 0, IPC_RMID);
|