Re: Can't find macro SAVE_ALL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2012/5/18 HWSW Development <hwsw.development@xxxxxxxxxxxxxx>
The macro is defined in arch/x86/include/asm/calling.h

Regards,
Rooney


2012/5/18 Bill Traynor <wmat@xxxxxxxxxxxxxx>


On Thu, May 17, 2012 at 10:37 PM, 王哲 <wangzhe5004@xxxxxxxxx> wrote:


2012/5/17 Javier Martinez Canillas <martinez.javier@xxxxxxxxx>
On Thu, May 17, 2012 at 3:59 PM, 王哲 <wangzhe5004@xxxxxxxxx> wrote:
> Hi all:
>         i am a kernelnewbies.during studying the linux system call,and
> analysis the following code (linux kernel 2.6.38)
>
> 529ENTRY(system_call)
> 530 RING0_INT_FRAME # can't unwind into user space anyway
> 531 pushl %eax # save orig_eax
> 532 CFI_ADJUST_CFA_OFFSET 4
> 533 SAVE_ALL
> 534 GET_THREAD_INFO(%ebp)
> 535 # system call tracing in operation / emulation
> 536 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
> 537 jnz syscall_trace_entry
> 538 cmpl $(nr_syscalls), %eax
> 539 jae syscall_badsys
> 540syscall_call:
> 541 call *sys_call_table(,%eax,4)
> 542 movl %eax,PT_EAX(%esp) # store the return value
>
> Question:
>            i want to see what the SAVE_ALL have done.and can't find the
> Macro SAVE_ALL
> if anyone knows please help 
>
>          Thanks
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

http://lxr.free-electrons.com/ident?i=SAVE_ALL

   Thank you  Javier Martinez Canillas for reply!
   but the rearch result :
   Defined as a preprocessor macro in:

    is not in x86 Architecture.  


Couldn't you find it by doing something like this?  In your kernel source tree:

$cd arch/x86
$grep -ircl ".macro SAVE_ALL" *


 
Best regards,

--
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

     Thanks for all.
         I have sloved the problem. this macro is written with assembly ,not c .
        No wonder that i don't search it out in the lxr.linux.no
 
  arch/x86/kernel/entry_32.s
  
 192 .macro SAVE_ALL
 193         cld
 194         PUSH_GS
 195         pushl_cfi %fs
 196         /*CFI_REL_OFFSET fs, 0;*/
 197         pushl_cfi %es
 198         /*CFI_REL_OFFSET es, 0;*/
 199         pushl_cfi %ds
 200         /*CFI_REL_OFFSET ds, 0;*/
 201         pushl_cfi %eax
 202         CFI_REL_OFFSET eax, 0
 203         pushl_cfi %ebp
 204         CFI_REL_OFFSET ebp, 0
 205         pushl_cfi %edi
 206         CFI_REL_OFFSET edi, 0
 207         pushl_cfi %esi
 208         CFI_REL_OFFSET esi, 0
 209         pushl_cfi %edx
 210         CFI_REL_OFFSET edx, 0
 211         pushl_cfi %ecx
 212         CFI_REL_OFFSET ecx, 0
 213         pushl_cfi %ebx
 214         CFI_REL_OFFSET ebx, 0
 215         movl $(__USER_DS), %edx
 216         movl %edx, %ds
 217         movl %edx, %es
 218         movl $(__KERNEL_PERCPU), %edx
 219         movl %edx, %fs
 220         SET_KERNEL_GS %edx
 221 .endm
 



--
----------------------------------------------------------------------------------------------
WangZhe  Xi'an Shanxi CHINA
qq                             785924174
blog                           blog.163.com/zhe_wang_2009
----------------------------------------------------------------------------------------------

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux