On Wed, Dec 20, 2006 at 12:34:34PM +0200, Clay Renko wrote: > Hi ppl, > > I'm really puzzled about those CFI_* directives in system_call handler > (i386). Hm, they don't start with . and they are uppercase. Looks like they are actually macros, not directives, no? Actually, they are. They expand to directives and above their definition is said what they are and where they are documented. LOOK THERE! > what are them ? i found some red hat documentation, but which really > doesn't help. > I'm really trying to understand the first 4 lines in the system_call > handler... > what are them ? what do they do ? why in this order ? > thanks a lot... > > Clay > > for convenience here's the code: > > ENTRY(system_call) > RING0_INT_FRAME # can't unwind into user space anyway > pushl %eax # save orig_eax > CFI_ADJUST_CFA_OFFSET 4 > SAVE_ALL > ...rest fo the code > > here are the defines: > > > #define RING0_INT_FRAME \ > CFI_STARTPROC simple;\ > CFI_SIGNAL_FRAME;\ > CFI_DEF_CFA esp, 3*4;\ > /*CFI_OFFSET cs, -2*4;*/\ > CFI_OFFSET eip, -3*4 > > and in SAVE_ALL there are those CFI lines after each register push: > > #define SAVE_ALL \ > cld; \ > pushl %es; \ > CFI_ADJUST_CFA_OFFSET 4;\ > /*CFI_REL_OFFSET es, 0;*/\ > pushl %ds; \ > CFI_ADJUST_CFA_OFFSET 4;\ > /*CFI_REL_OFFSET ds, 0;*/\ > pushl %eax; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET eax, 0;\ > pushl %ebp; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET ebp, 0;\ > pushl %edi; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET edi, 0;\ > pushl %esi; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET esi, 0;\ > pushl %edx; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET edx, 0;\ > pushl %ecx; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET ecx, 0;\ > pushl %ebx; \ > CFI_ADJUST_CFA_OFFSET 4;\ > CFI_REL_OFFSET ebx, 0;\ > movl $(__USER_DS), %edx; \ > movl %edx, %ds; \ > movl %edx, %es; > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ -------------------------------------------------------------------------------- - Jan Hudec `Bulb' <bulb@xxxxxx> -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/