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

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/ptrace.h

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/sh/include/asm/ptrace.h (Architecture i386) and /arch/sparc64/include/asm-sparc64/ptrace.h (Architecture sparc64)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 /*                                                
  3  * Copyright (C) 1999, 2000  Niibe Yutaka         
  4  */                                               
  5 #ifndef __ASM_SH_PTRACE_H                         
  6 #define __ASM_SH_PTRACE_H                         
  7                                                   
  8                                                   
  9 #include <linux/stringify.h>                      
 10 #include <linux/stddef.h>                         
 11 #include <linux/thread_info.h>                    
 12 #include <asm/addrspace.h>                        
 13 #include <asm/page.h>                             
 14 #include <uapi/asm/ptrace.h>                      
 15                                                   
 16 #define user_mode(regs)                 (((reg    
 17 #define kernel_stack_pointer(_regs)     ((unsi    
 18                                                   
 19 static inline unsigned long instruction_pointe    
 20 {                                                 
 21         return regs->pc;                          
 22 }                                                 
 23 static inline void instruction_pointer_set(str    
 24                 unsigned long val)                
 25 {                                                 
 26         regs->pc = val;                           
 27 }                                                 
 28                                                   
 29 static inline unsigned long frame_pointer(stru    
 30 {                                                 
 31         return regs->regs[14];                    
 32 }                                                 
 33                                                   
 34 static inline unsigned long user_stack_pointer    
 35 {                                                 
 36         return regs->regs[15];                    
 37 }                                                 
 38                                                   
 39 static inline void user_stack_pointer_set(stru    
 40                 unsigned long val)                
 41 {                                                 
 42         regs->regs[15] = val;                     
 43 }                                                 
 44                                                   
 45 #define arch_has_single_step()  (1)               
 46                                                   
 47 /*                                                
 48  * kprobe-based event tracer support              
 49  */                                               
 50 struct pt_regs_offset {                           
 51         const char *name;                         
 52         int offset;                               
 53 };                                                
 54                                                   
 55 #define REG_OFFSET_NAME(r) {.name = #r, .offse    
 56 #define REGS_OFFSET_NAME(num)   \                 
 57         {.name = __stringify(r##num), .offset     
 58 #define TREGS_OFFSET_NAME(num)  \                 
 59         {.name = __stringify(tr##num), .offset    
 60 #define REG_OFFSET_END {.name = NULL, .offset     
 61                                                   
 62 /* Query offset/name of register from its name    
 63 extern int regs_query_register_offset(const ch    
 64 extern const char *regs_query_register_name(un    
 65                                                   
 66 extern const struct pt_regs_offset regoffset_t    
 67                                                   
 68 /**                                               
 69  * regs_get_register() - get register value fr    
 70  * @regs:       pt_regs from which register va    
 71  * @offset:     offset number of the register.    
 72  *                                                
 73  * regs_get_register returns the value of a re    
 74  * offset of the register in struct pt_regs ad    
 75  * If @offset is bigger than MAX_REG_OFFSET, t    
 76  */                                               
 77 static inline unsigned long regs_get_register(    
 78                                                   
 79 {                                                 
 80         if (unlikely(offset > MAX_REG_OFFSET))    
 81                 return 0;                         
 82         return *(unsigned long *)((unsigned lo    
 83 }                                                 
 84                                                   
 85 /**                                               
 86  * regs_within_kernel_stack() - check the addr    
 87  * @regs:       pt_regs which contains kernel     
 88  * @addr:       address which is checked.         
 89  *                                                
 90  * regs_within_kernel_stack() checks @addr is     
 91  * If @addr is within the kernel stack, it ret    
 92  */                                               
 93 static inline int regs_within_kernel_stack(str    
 94                                            uns    
 95 {                                                 
 96         return ((addr & ~(THREAD_SIZE - 1))  =    
 97                 (kernel_stack_pointer(regs) &     
 98 }                                                 
 99                                                   
100 /**                                               
101  * regs_get_kernel_stack_nth() - get Nth entry    
102  * @regs:       pt_regs which contains kernel     
103  * @n:          stack entry number.               
104  *                                                
105  * regs_get_kernel_stack_nth() returns @n th e    
106  * is specified by @regs. If the @n th entry i    
107  * this returns 0.                                
108  */                                               
109 static inline unsigned long regs_get_kernel_st    
110                                                   
111 {                                                 
112         unsigned long *addr = (unsigned long *    
113         addr += n;                                
114         if (regs_within_kernel_stack(regs, (un    
115                 return *addr;                     
116         else                                      
117                 return 0;                         
118 }                                                 
119                                                   
120 struct perf_event;                                
121 struct perf_sample_data;                          
122                                                   
123 extern void ptrace_triggered(struct perf_event    
124                       struct perf_sample_data     
125                                                   
126 #define task_pt_regs(task) \                      
127         ((struct pt_regs *) (task_stack_page(t    
128                                                   
129 static inline unsigned long profile_pc(struct     
130 {                                                 
131         unsigned long pc = regs->pc;              
132                                                   
133         if (virt_addr_uncached(pc))               
134                 return CAC_ADDR(pc);              
135                                                   
136         return pc;                                
137 }                                                 
138                                                   
139 #endif /* __ASM_SH_PTRACE_H */                    
140                                                   

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