/linux-6.6.21/tools/testing/selftests/mm/ |
D | hugepage-shm.c | 55 char *shmaddr; in main() local 64 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); in main() 65 if (shmaddr == (char *)-1) { in main() 70 printf("shmaddr: %p\n", shmaddr); in main() 74 shmaddr[i] = (char)(i); in main() 82 if (shmaddr[i] != (char)i) { in main() 88 if (shmdt((const void *)shmaddr) != 0) { in main()
|
D | write_to_hugetlbfs.c | 31 static char *shmaddr; variable 51 if (shmdt((const void *)shmaddr) != 0) { in sig_handler()
|
/linux-6.6.21/include/linux/ |
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
|
D | syscalls.h | 729 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 730 asmlinkage long sys_shmdt(char __user *shmaddr); 1261 long ksys_shmdt(char __user *shmaddr);
|
D | security.h | 467 int security_shm_shmat(struct kern_ipc_perm *shp, char __user *shmaddr, int shmflg); 1315 char __user *shmaddr, int shmflg) in security_shm_shmat() argument
|
D | lsm_hook_defs.h | 256 LSM_HOOK(int, 0, shm_shmat, struct kern_ipc_perm *perm, char __user *shmaddr,
|
D | compat.h | 751 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
|
/linux-6.6.21/tools/testing/selftests/powerpc/benchmarks/ |
D | context_switch.c | 329 void *shmaddr; in futex_setup() local 337 shmaddr = shmat(shmid, NULL, 0); in futex_setup() 338 if (shmaddr == (char *)-1) { in futex_setup() 346 m1 = shmaddr; in futex_setup() 347 m2 = shmaddr + sizeof(*m1); in futex_setup()
|
/linux-6.6.21/Documentation/arch/sparc/ |
D | adi.rst | 187 char *shmaddr, *tmp_addr, *end, *veraddr, *clraddr; 219 shmaddr = shmat(shmid, NULL, 0); 220 if (shmaddr == (char *)-1) { 226 if (mprotect(shmaddr, BUFFER_SIZE, PROT_READ|PROT_WRITE|PROT_ADI)) { 234 tmp_addr = shmaddr; 235 end = shmaddr + BUFFER_SIZE; 248 tmp_addr = (void *) ((unsigned long)shmaddr << adi_nbits); 270 if (mprotect(shmaddr, BUFFER_SIZE, PROT_READ|PROT_WRITE)) { 275 if (shmdt((const void *)shmaddr) != 0) 282 if (shmdt((const void *)shmaddr) != 0)
|
/linux-6.6.21/arch/xtensa/kernel/ |
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()
|
/linux-6.6.21/ipc/ |
D | shm.c | 1522 long do_shmat(int shmid, char __user *shmaddr, int shmflg, in do_shmat() argument 1526 unsigned long addr = (unsigned long)shmaddr; in do_shmat() 1595 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg); in do_shmat() 1696 SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) in SYSCALL_DEFINE3() argument 1701 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in SYSCALL_DEFINE3() 1714 COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg) in COMPAT_SYSCALL_DEFINE3() argument 1719 err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA); in COMPAT_SYSCALL_DEFINE3() 1731 long ksys_shmdt(char __user *shmaddr) in ksys_shmdt() argument 1735 unsigned long addr = (unsigned long)shmaddr; in ksys_shmdt() 1837 SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) in SYSCALL_DEFINE1() argument [all …]
|
/linux-6.6.21/Documentation/arch/ia64/ |
D | err_inject.rst | 305 void *shmaddr; 336 shmaddr = shmat(shmid, (void *)SHM_VA, 0); 337 if (shmaddr == (void*)-1) { 342 memset(shmaddr, 0, SHM_SIZE); 343 mlock(shmaddr, SHM_SIZE); 350 munlock(shmaddr, SHM_SIZE); 351 shmdt(shmaddr); 865 va1=shmaddr+parameters[i].cpu*PAGE_SIZE; 866 va2=shmaddr+parameters[i].cpu*PAGE_SIZE+PAGE_SIZE;
|
/linux-6.6.21/security/ |
D | security.c | 3718 char __user *shmaddr, int shmflg) in security_shm_shmat() argument 3720 return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg); in security_shm_shmat()
|
/linux-6.6.21/security/smack/ |
D | smack_lsm.c | 3170 static int smack_shm_shmat(struct kern_ipc_perm *isp, char __user *shmaddr, in smack_shm_shmat() argument
|
/linux-6.6.21/security/selinux/ |
D | hooks.c | 6186 char __user *shmaddr, int shmflg) in selinux_shm_shmat() argument
|