/kernel/linux/linux-5.10/tools/testing/selftests/vm/ |
D | hugepage-shm.c | 59 char *shmaddr; in main() local 68 shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); in main() 69 if (shmaddr == (char *)-1) { in main() 74 printf("shmaddr: %p\n", shmaddr); in main() 78 shmaddr[i] = (char)(i); in main() 86 if (shmaddr[i] != (char)i) { in main() 92 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()
|
/kernel/liteos_a/syscall/ |
D | vm_syscall.c | 81 void *SysShmAt(int shmid, const void *shmaddr, int shmflg) in SysShmAt() argument 85 ret = ShmAt(shmid, shmaddr, shmflg); in SysShmAt() 105 int SysShmDt(const void *shmaddr) in SysShmDt() argument 109 ret = ShmDt(shmaddr); in SysShmDt()
|
D | los_syscall.h | 177 extern void *SysShmAt(int shmid, const void *shmaddr, int shmflg); 179 extern int SysShmDt(const void *shmaddr);
|
/kernel/liteos_a/kernel/base/vm/ |
D | shm.c | 516 INT32 ShmatParamCheck(const VOID *shmaddr, INT32 shmflg) in ShmatParamCheck() argument 518 if (((UINT32)shmflg & SHM_REMAP) && (shmaddr == NULL)) { in ShmatParamCheck() 522 if ((shmaddr != NULL) && !IS_PAGE_ALIGNED(shmaddr) && in ShmatParamCheck() 530 LosVmMapRegion *ShmatVmmAlloc(struct shmIDSource *seg, const VOID *shmaddr, in ShmatVmmAlloc() argument 541 if (shmaddr != NULL) { in ShmatVmmAlloc() 546 if (shmaddr == NULL) { in ShmatVmmAlloc() 550 vaddr = ROUNDDOWN((VADDR_T)(UINTPTR)shmaddr, SHMLBA); in ShmatVmmAlloc() 552 vaddr = (VADDR_T)(UINTPTR)shmaddr; in ShmatVmmAlloc() 577 VOID *ShmAt(INT32 shmid, const VOID *shmaddr, INT32 shmflg) in ShmAt() argument 585 ret = ShmatParamCheck(shmaddr, shmflg); in ShmAt() [all …]
|
/kernel/linux/linux-5.10/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 | 823 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 824 asmlinkage long sys_shmdt(char __user *shmaddr); 1364 long ksys_shmdt(char __user *shmaddr);
|
D | security.h | 440 int security_shm_shmat(struct kern_ipc_perm *shp, char __user *shmaddr, int shmflg); 1223 char __user *shmaddr, int shmflg) in security_shm_shmat() argument
|
D | lsm_hook_defs.h | 239 LSM_HOOK(int, 0, shm_shmat, struct kern_ipc_perm *perm, char __user *shmaddr,
|
D | compat.h | 714 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/Documentation/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)
|
/kernel/liteos_a/kernel/base/include/ |
D | los_vm_syscall.h | 68 VOID *ShmAt(INT32 shmid, const VOID *shmaddr, INT32 shmflg); 70 INT32 ShmDt(const VOID *shmaddr);
|
/kernel/linux/linux-5.10/arch/xtensa/kernel/ |
D | syscall.c | 43 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) in xtensa_shmat() argument 48 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in xtensa_shmat()
|
/kernel/linux/linux-5.10/ipc/ |
D | shm.c | 1512 long do_shmat(int shmid, char __user *shmaddr, int shmflg, in do_shmat() argument 1516 unsigned long addr = (unsigned long)shmaddr; in do_shmat() 1585 err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg); in do_shmat() 1686 SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) in SYSCALL_DEFINE3() argument 1691 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); in SYSCALL_DEFINE3() 1704 COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg) in COMPAT_SYSCALL_DEFINE3() argument 1709 err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA); in COMPAT_SYSCALL_DEFINE3() 1721 long ksys_shmdt(char __user *shmaddr) in ksys_shmdt() argument 1725 unsigned long addr = (unsigned long)shmaddr; in ksys_shmdt() 1828 SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) in SYSCALL_DEFINE1() argument [all …]
|
/kernel/linux/linux-5.10/Documentation/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;
|
/kernel/linux/linux-5.10/security/ |
D | security.c | 1945 int security_shm_shmat(struct kern_ipc_perm *shp, char __user *shmaddr, int shmflg) in security_shm_shmat() argument 1947 return call_int_hook(shm_shmat, 0, shp, shmaddr, shmflg); in security_shm_shmat()
|
/kernel/linux/linux-5.10/security/smack/ |
D | smack_lsm.c | 3008 static int smack_shm_shmat(struct kern_ipc_perm *isp, char __user *shmaddr, in smack_shm_shmat() argument
|
/kernel/linux/linux-5.10/security/selinux/ |
D | hooks.c | 6166 char __user *shmaddr, int shmflg) in selinux_shm_shmat() argument
|