~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/kernel/sys32.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm64/kernel/sys32.c (Version linux-6.11.5) and /arch/mips/kernel/sys32.c (Version linux-2.6.0)


  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * arch/arm64/kernel/sys32.c                      
  4  *                                                
  5  * Copyright (C) 2015 ARM Ltd.                    
  6  */                                               
  7                                                   
  8 #include <linux/compat.h>                         
  9 #include <linux/compiler.h>                       
 10 #include <linux/syscalls.h>                       
 11                                                   
 12 #include <asm/syscall.h>                          
 13 #include <asm/unistd_compat_32.h>                 
 14                                                   
 15 asmlinkage long compat_sys_sigreturn(void);       
 16 asmlinkage long compat_sys_rt_sigreturn(void);    
 17                                                   
 18 COMPAT_SYSCALL_DEFINE3(aarch32_statfs64, const    
 19                        compat_size_t, sz, stru    
 20 {                                                 
 21         /*                                        
 22          * 32-bit ARM applies an OABI compatib    
 23          * fstatfs64 regardless of whether OAB    
 24          * arbitrary binaries may rely upon it    
 25          * For more details, see commit:          
 26          *                                        
 27          * 713c481519f19df9 ("[ARM] 3108/2: ol    
 28          * fstatfs64")                            
 29          */                                       
 30         if (sz == 88)                             
 31                 sz = 84;                          
 32                                                   
 33         return kcompat_sys_statfs64(pathname,     
 34 }                                                 
 35                                                   
 36 COMPAT_SYSCALL_DEFINE3(aarch32_fstatfs64, unsi    
 37                        struct compat_statfs64     
 38 {                                                 
 39         /* see aarch32_statfs64 */                
 40         if (sz == 88)                             
 41                 sz = 84;                          
 42                                                   
 43         return kcompat_sys_fstatfs64(fd, sz, b    
 44 }                                                 
 45                                                   
 46 /*                                                
 47  * Note: off_4k is always in units of 4K. If w    
 48  * requested offset because it is not page-ali    
 49  */                                               
 50 COMPAT_SYSCALL_DEFINE6(aarch32_mmap2, unsigned    
 51                        unsigned long, prot, un    
 52                        unsigned long, fd, unsi    
 53 {                                                 
 54         if (off_4k & (~PAGE_MASK >> 12))          
 55                 return -EINVAL;                   
 56                                                   
 57         off_4k >>= (PAGE_SHIFT - 12);             
 58                                                   
 59         return ksys_mmap_pgoff(addr, len, prot    
 60 }                                                 
 61                                                   
 62 #ifdef CONFIG_CPU_BIG_ENDIAN                      
 63 #define arg_u32p(name)  u32, name##_hi, u32, n    
 64 #else                                             
 65 #define arg_u32p(name)  u32, name##_lo, u32, n    
 66 #endif                                            
 67                                                   
 68 #define arg_u64(name)   (((u64)name##_hi << 32    
 69                                                   
 70 COMPAT_SYSCALL_DEFINE6(aarch32_pread64, unsign    
 71                        size_t, count, u32, __p    
 72 {                                                 
 73         return ksys_pread64(fd, buf, count, ar    
 74 }                                                 
 75                                                   
 76 COMPAT_SYSCALL_DEFINE6(aarch32_pwrite64, unsig    
 77                        const char __user *, bu    
 78                        arg_u32p(pos))             
 79 {                                                 
 80         return ksys_pwrite64(fd, buf, count, a    
 81 }                                                 
 82                                                   
 83 COMPAT_SYSCALL_DEFINE4(aarch32_truncate64, con    
 84                        u32, __pad, arg_u32p(le    
 85 {                                                 
 86         return ksys_truncate(pathname, arg_u64    
 87 }                                                 
 88                                                   
 89 COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, un    
 90                        arg_u32p(length))          
 91 {                                                 
 92         return ksys_ftruncate(fd, arg_u64(leng    
 93 }                                                 
 94                                                   
 95 COMPAT_SYSCALL_DEFINE5(aarch32_readahead, int,    
 96                        arg_u32p(offset), size_    
 97 {                                                 
 98         return ksys_readahead(fd, arg_u64(offs    
 99 }                                                 
100                                                   
101 COMPAT_SYSCALL_DEFINE6(aarch32_fadvise64_64, i    
102                        arg_u32p(offset), arg_u    
103 {                                                 
104         return ksys_fadvise64_64(fd, arg_u64(o    
105 }                                                 
106                                                   
107 COMPAT_SYSCALL_DEFINE6(aarch32_sync_file_range    
108                        arg_u32p(offset), arg_u    
109 {                                                 
110         return ksys_sync_file_range(fd, arg_u6    
111                                     flags);       
112 }                                                 
113                                                   
114 COMPAT_SYSCALL_DEFINE6(aarch32_fallocate, int,    
115                        arg_u32p(offset), arg_u    
116 {                                                 
117         return ksys_fallocate(fd, mode, arg_u6    
118 }                                                 
119                                                   
120 #define __SYSCALL_WITH_COMPAT(nr, sym, compat)    
121                                                   
122 #undef __SYSCALL                                  
123 #define __SYSCALL(nr, sym)      asmlinkage lon    
124 #include <asm/syscall_table_32.h>                 
125                                                   
126 #undef __SYSCALL                                  
127 #define __SYSCALL(nr, sym)      [nr] = __arm64    
128                                                   
129 const syscall_fn_t compat_sys_call_table[__NR_    
130         [0 ... __NR_compat32_syscalls - 1] = _    
131 #include <asm/syscall_table_32.h>                 
132 };                                                
133                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php