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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/compat.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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/x86/include/asm/compat.h (Version linux-6.11-rc3) and /arch/i386/include/asm-i386/compat.h (Version linux-4.9.337)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _ASM_X86_COMPAT_H                         
  3 #define _ASM_X86_COMPAT_H                         
  4                                                   
  5 /*                                                
  6  * Architecture specific compatibility types      
  7  */                                               
  8 #include <linux/types.h>                          
  9 #include <linux/sched.h>                          
 10 #include <linux/sched/task_stack.h>               
 11 #include <asm/processor.h>                        
 12 #include <asm/user32.h>                           
 13 #include <asm/unistd.h>                           
 14                                                   
 15 #define compat_mode_t   compat_mode_t             
 16 typedef u16             compat_mode_t;            
 17                                                   
 18 #define __compat_uid_t  __compat_uid_t            
 19 typedef u16             __compat_uid_t;           
 20 typedef u16             __compat_gid_t;           
 21                                                   
 22 #define compat_dev_t    compat_dev_t              
 23 typedef u16             compat_dev_t;             
 24                                                   
 25 #define compat_ipc_pid_t compat_ipc_pid_t         
 26 typedef u16              compat_ipc_pid_t;        
 27                                                   
 28 #define compat_statfs   compat_statfs             
 29                                                   
 30 #include <asm-generic/compat.h>                   
 31                                                   
 32 #define COMPAT_UTS_MACHINE      "i686\0\0"        
 33                                                   
 34 typedef u16             compat_nlink_t;           
 35                                                   
 36 struct compat_stat {                              
 37         u32             st_dev;                   
 38         compat_ino_t    st_ino;                   
 39         compat_mode_t   st_mode;                  
 40         compat_nlink_t  st_nlink;                 
 41         __compat_uid_t  st_uid;                   
 42         __compat_gid_t  st_gid;                   
 43         u32             st_rdev;                  
 44         u32             st_size;                  
 45         u32             st_blksize;               
 46         u32             st_blocks;                
 47         u32             st_atime;                 
 48         u32             st_atime_nsec;            
 49         u32             st_mtime;                 
 50         u32             st_mtime_nsec;            
 51         u32             st_ctime;                 
 52         u32             st_ctime_nsec;            
 53         u32             __unused4;                
 54         u32             __unused5;                
 55 };                                                
 56                                                   
 57 /*                                                
 58  * IA32 uses 4 byte alignment for 64 bit quant    
 59  * compat flock64 structure.                      
 60  */                                               
 61 #define __ARCH_NEED_COMPAT_FLOCK64_PACKED         
 62                                                   
 63 struct compat_statfs {                            
 64         int             f_type;                   
 65         int             f_bsize;                  
 66         int             f_blocks;                 
 67         int             f_bfree;                  
 68         int             f_bavail;                 
 69         int             f_files;                  
 70         int             f_ffree;                  
 71         compat_fsid_t   f_fsid;                   
 72         int             f_namelen;      /* Sun    
 73         int             f_frsize;                 
 74         int             f_flags;                  
 75         int             f_spare[4];               
 76 };                                                
 77                                                   
 78 #ifdef CONFIG_X86_X32_ABI                         
 79 #define COMPAT_USE_64BIT_TIME \                   
 80         (!!(task_pt_regs(current)->orig_ax & _    
 81 #endif                                            
 82                                                   
 83 static inline bool in_x32_syscall(void)           
 84 {                                                 
 85 #ifdef CONFIG_X86_X32_ABI                         
 86         if (task_pt_regs(current)->orig_ax & _    
 87                 return true;                      
 88 #endif                                            
 89         return false;                             
 90 }                                                 
 91                                                   
 92 static inline bool in_32bit_syscall(void)         
 93 {                                                 
 94         return in_ia32_syscall() || in_x32_sys    
 95 }                                                 
 96                                                   
 97 #ifdef CONFIG_COMPAT                              
 98 static inline bool in_compat_syscall(void)        
 99 {                                                 
100         return in_32bit_syscall();                
101 }                                                 
102 #define in_compat_syscall in_compat_syscall       
103 #define compat_need_64bit_alignment_fixup in_i    
104 #endif                                            
105                                                   
106 struct compat_siginfo;                            
107                                                   
108 #ifdef CONFIG_X86_X32_ABI                         
109 int copy_siginfo_to_user32(struct compat_sigin    
110                 const kernel_siginfo_t *from);    
111 #define copy_siginfo_to_user32 copy_siginfo_to    
112 #endif /* CONFIG_X86_X32_ABI */                   
113                                                   
114 #endif /* _ASM_X86_COMPAT_H */                    
115                                                   

~ [ 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