entry_32.S 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. /*
  2. *
  3. * Copyright (C) 1991, 1992 Linus Torvalds
  4. */
  5. /*
  6. * entry.S contains the system-call and fault low-level handling routines.
  7. * This also contains the timer-interrupt handler, as well as all interrupts
  8. * and faults that can result in a task-switch.
  9. *
  10. * NOTE: This code handles signal-recognition, which happens every time
  11. * after a timer-interrupt and after each system call.
  12. *
  13. * I changed all the .align's to 4 (16 byte alignment), as that's faster
  14. * on a 486.
  15. *
  16. * Stack layout in 'syscall_exit':
  17. * ptrace needs to have all regs on the stack.
  18. * if the order here is changed, it needs to be
  19. * updated in fork.c:copy_process, signal.c:do_signal,
  20. * ptrace.c and ptrace.h
  21. *
  22. * 0(%esp) - %ebx
  23. * 4(%esp) - %ecx
  24. * 8(%esp) - %edx
  25. * C(%esp) - %esi
  26. * 10(%esp) - %edi
  27. * 14(%esp) - %ebp
  28. * 18(%esp) - %eax
  29. * 1C(%esp) - %ds
  30. * 20(%esp) - %es
  31. * 24(%esp) - %fs
  32. * 28(%esp) - orig_eax
  33. * 2C(%esp) - %eip
  34. * 30(%esp) - %cs
  35. * 34(%esp) - %eflags
  36. * 38(%esp) - %oldesp
  37. * 3C(%esp) - %oldss
  38. *
  39. * "current" is in register %ebx during any slow entries.
  40. */
  41. #include <linux/linkage.h>
  42. #include <asm/thread_info.h>
  43. #include <asm/irqflags.h>
  44. #include <asm/errno.h>
  45. #include <asm/segment.h>
  46. #include <asm/smp.h>
  47. #include <asm/page.h>
  48. #include <asm/desc.h>
  49. #include <asm/percpu.h>
  50. #include <asm/dwarf2.h>
  51. #include <asm/processor-flags.h>
  52. #include <asm/ftrace.h>
  53. #include <asm/irq_vectors.h>
  54. /*
  55. * We use macros for low-level operations which need to be overridden
  56. * for paravirtualization. The following will never clobber any registers:
  57. * INTERRUPT_RETURN (aka. "iret")
  58. * GET_CR0_INTO_EAX (aka. "movl %cr0, %eax")
  59. * ENABLE_INTERRUPTS_SYSEXIT (aka "sti; sysexit").
  60. *
  61. * For DISABLE_INTERRUPTS/ENABLE_INTERRUPTS (aka "cli"/"sti"), you must
  62. * specify what registers can be overwritten (CLBR_NONE, CLBR_EAX/EDX/ECX/ANY).
  63. * Allowing a register to be clobbered can shrink the paravirt replacement
  64. * enough to patch inline, increasing performance.
  65. */
  66. #define nr_syscalls ((syscall_table_size)/4)
  67. #ifdef CONFIG_PREEMPT
  68. #define preempt_stop(clobbers) DISABLE_INTERRUPTS(clobbers); TRACE_IRQS_OFF
  69. #else
  70. #define preempt_stop(clobbers)
  71. #define resume_kernel restore_nocheck
  72. #endif
  73. .macro TRACE_IRQS_IRET
  74. #ifdef CONFIG_TRACE_IRQFLAGS
  75. testl $X86_EFLAGS_IF,PT_EFLAGS(%esp) # interrupts off?
  76. jz 1f
  77. TRACE_IRQS_ON
  78. 1:
  79. #endif
  80. .endm
  81. #ifdef CONFIG_VM86
  82. #define resume_userspace_sig check_userspace
  83. #else
  84. #define resume_userspace_sig resume_userspace
  85. #endif
  86. #define SAVE_ALL \
  87. cld; \
  88. pushl %fs; \
  89. CFI_ADJUST_CFA_OFFSET 4;\
  90. /*CFI_REL_OFFSET fs, 0;*/\
  91. pushl %es; \
  92. CFI_ADJUST_CFA_OFFSET 4;\
  93. /*CFI_REL_OFFSET es, 0;*/\
  94. pushl %ds; \
  95. CFI_ADJUST_CFA_OFFSET 4;\
  96. /*CFI_REL_OFFSET ds, 0;*/\
  97. pushl %eax; \
  98. CFI_ADJUST_CFA_OFFSET 4;\
  99. CFI_REL_OFFSET eax, 0;\
  100. pushl %ebp; \
  101. CFI_ADJUST_CFA_OFFSET 4;\
  102. CFI_REL_OFFSET ebp, 0;\
  103. pushl %edi; \
  104. CFI_ADJUST_CFA_OFFSET 4;\
  105. CFI_REL_OFFSET edi, 0;\
  106. pushl %esi; \
  107. CFI_ADJUST_CFA_OFFSET 4;\
  108. CFI_REL_OFFSET esi, 0;\
  109. pushl %edx; \
  110. CFI_ADJUST_CFA_OFFSET 4;\
  111. CFI_REL_OFFSET edx, 0;\
  112. pushl %ecx; \
  113. CFI_ADJUST_CFA_OFFSET 4;\
  114. CFI_REL_OFFSET ecx, 0;\
  115. pushl %ebx; \
  116. CFI_ADJUST_CFA_OFFSET 4;\
  117. CFI_REL_OFFSET ebx, 0;\
  118. movl $(__USER_DS), %edx; \
  119. movl %edx, %ds; \
  120. movl %edx, %es; \
  121. movl $(__KERNEL_PERCPU), %edx; \
  122. movl %edx, %fs
  123. #define RESTORE_INT_REGS \
  124. popl %ebx; \
  125. CFI_ADJUST_CFA_OFFSET -4;\
  126. CFI_RESTORE ebx;\
  127. popl %ecx; \
  128. CFI_ADJUST_CFA_OFFSET -4;\
  129. CFI_RESTORE ecx;\
  130. popl %edx; \
  131. CFI_ADJUST_CFA_OFFSET -4;\
  132. CFI_RESTORE edx;\
  133. popl %esi; \
  134. CFI_ADJUST_CFA_OFFSET -4;\
  135. CFI_RESTORE esi;\
  136. popl %edi; \
  137. CFI_ADJUST_CFA_OFFSET -4;\
  138. CFI_RESTORE edi;\
  139. popl %ebp; \
  140. CFI_ADJUST_CFA_OFFSET -4;\
  141. CFI_RESTORE ebp;\
  142. popl %eax; \
  143. CFI_ADJUST_CFA_OFFSET -4;\
  144. CFI_RESTORE eax
  145. #define RESTORE_REGS \
  146. RESTORE_INT_REGS; \
  147. 1: popl %ds; \
  148. CFI_ADJUST_CFA_OFFSET -4;\
  149. /*CFI_RESTORE ds;*/\
  150. 2: popl %es; \
  151. CFI_ADJUST_CFA_OFFSET -4;\
  152. /*CFI_RESTORE es;*/\
  153. 3: popl %fs; \
  154. CFI_ADJUST_CFA_OFFSET -4;\
  155. /*CFI_RESTORE fs;*/\
  156. .pushsection .fixup,"ax"; \
  157. 4: movl $0,(%esp); \
  158. jmp 1b; \
  159. 5: movl $0,(%esp); \
  160. jmp 2b; \
  161. 6: movl $0,(%esp); \
  162. jmp 3b; \
  163. .section __ex_table,"a";\
  164. .align 4; \
  165. .long 1b,4b; \
  166. .long 2b,5b; \
  167. .long 3b,6b; \
  168. .popsection
  169. #define RING0_INT_FRAME \
  170. CFI_STARTPROC simple;\
  171. CFI_SIGNAL_FRAME;\
  172. CFI_DEF_CFA esp, 3*4;\
  173. /*CFI_OFFSET cs, -2*4;*/\
  174. CFI_OFFSET eip, -3*4
  175. #define RING0_EC_FRAME \
  176. CFI_STARTPROC simple;\
  177. CFI_SIGNAL_FRAME;\
  178. CFI_DEF_CFA esp, 4*4;\
  179. /*CFI_OFFSET cs, -2*4;*/\
  180. CFI_OFFSET eip, -3*4
  181. #define RING0_PTREGS_FRAME \
  182. CFI_STARTPROC simple;\
  183. CFI_SIGNAL_FRAME;\
  184. CFI_DEF_CFA esp, PT_OLDESP-PT_EBX;\
  185. /*CFI_OFFSET cs, PT_CS-PT_OLDESP;*/\
  186. CFI_OFFSET eip, PT_EIP-PT_OLDESP;\
  187. /*CFI_OFFSET es, PT_ES-PT_OLDESP;*/\
  188. /*CFI_OFFSET ds, PT_DS-PT_OLDESP;*/\
  189. CFI_OFFSET eax, PT_EAX-PT_OLDESP;\
  190. CFI_OFFSET ebp, PT_EBP-PT_OLDESP;\
  191. CFI_OFFSET edi, PT_EDI-PT_OLDESP;\
  192. CFI_OFFSET esi, PT_ESI-PT_OLDESP;\
  193. CFI_OFFSET edx, PT_EDX-PT_OLDESP;\
  194. CFI_OFFSET ecx, PT_ECX-PT_OLDESP;\
  195. CFI_OFFSET ebx, PT_EBX-PT_OLDESP
  196. ENTRY(ret_from_fork)
  197. CFI_STARTPROC
  198. pushl %eax
  199. CFI_ADJUST_CFA_OFFSET 4
  200. call schedule_tail
  201. GET_THREAD_INFO(%ebp)
  202. popl %eax
  203. CFI_ADJUST_CFA_OFFSET -4
  204. pushl $0x0202 # Reset kernel eflags
  205. CFI_ADJUST_CFA_OFFSET 4
  206. popfl
  207. CFI_ADJUST_CFA_OFFSET -4
  208. jmp syscall_exit
  209. CFI_ENDPROC
  210. END(ret_from_fork)
  211. /*
  212. * Return to user mode is not as complex as all this looks,
  213. * but we want the default path for a system call return to
  214. * go as quickly as possible which is why some of this is
  215. * less clear than it otherwise should be.
  216. */
  217. # userspace resumption stub bypassing syscall exit tracing
  218. ALIGN
  219. RING0_PTREGS_FRAME
  220. ret_from_exception:
  221. preempt_stop(CLBR_ANY)
  222. ret_from_intr:
  223. GET_THREAD_INFO(%ebp)
  224. check_userspace:
  225. movl PT_EFLAGS(%esp), %eax # mix EFLAGS and CS
  226. movb PT_CS(%esp), %al
  227. andl $(X86_EFLAGS_VM | SEGMENT_RPL_MASK), %eax
  228. cmpl $USER_RPL, %eax
  229. jb resume_kernel # not returning to v8086 or userspace
  230. ENTRY(resume_userspace)
  231. LOCKDEP_SYS_EXIT
  232. DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt
  233. # setting need_resched or sigpending
  234. # between sampling and the iret
  235. TRACE_IRQS_OFF
  236. movl TI_flags(%ebp), %ecx
  237. andl $_TIF_WORK_MASK, %ecx # is there any work to be done on
  238. # int/exception return?
  239. jne work_pending
  240. jmp restore_all
  241. END(ret_from_exception)
  242. #ifdef CONFIG_PREEMPT
  243. ENTRY(resume_kernel)
  244. DISABLE_INTERRUPTS(CLBR_ANY)
  245. cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ?
  246. jnz restore_nocheck
  247. need_resched:
  248. movl TI_flags(%ebp), %ecx # need_resched set ?
  249. testb $_TIF_NEED_RESCHED, %cl
  250. jz restore_all
  251. testl $X86_EFLAGS_IF,PT_EFLAGS(%esp) # interrupts off (exception path) ?
  252. jz restore_all
  253. call preempt_schedule_irq
  254. jmp need_resched
  255. END(resume_kernel)
  256. #endif
  257. CFI_ENDPROC
  258. /* SYSENTER_RETURN points to after the "sysenter" instruction in
  259. the vsyscall page. See vsyscall-sysentry.S, which defines the symbol. */
  260. # sysenter call handler stub
  261. ENTRY(ia32_sysenter_target)
  262. CFI_STARTPROC simple
  263. CFI_SIGNAL_FRAME
  264. CFI_DEF_CFA esp, 0
  265. CFI_REGISTER esp, ebp
  266. movl TSS_sysenter_sp0(%esp),%esp
  267. sysenter_past_esp:
  268. /*
  269. * Interrupts are disabled here, but we can't trace it until
  270. * enough kernel state to call TRACE_IRQS_OFF can be called - but
  271. * we immediately enable interrupts at that point anyway.
  272. */
  273. pushl $(__USER_DS)
  274. CFI_ADJUST_CFA_OFFSET 4
  275. /*CFI_REL_OFFSET ss, 0*/
  276. pushl %ebp
  277. CFI_ADJUST_CFA_OFFSET 4
  278. CFI_REL_OFFSET esp, 0
  279. pushfl
  280. orl $X86_EFLAGS_IF, (%esp)
  281. CFI_ADJUST_CFA_OFFSET 4
  282. pushl $(__USER_CS)
  283. CFI_ADJUST_CFA_OFFSET 4
  284. /*CFI_REL_OFFSET cs, 0*/
  285. /*
  286. * Push current_thread_info()->sysenter_return to the stack.
  287. * A tiny bit of offset fixup is necessary - 4*4 means the 4 words
  288. * pushed above; +8 corresponds to copy_thread's esp0 setting.
  289. */
  290. pushl (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
  291. CFI_ADJUST_CFA_OFFSET 4
  292. CFI_REL_OFFSET eip, 0
  293. pushl %eax
  294. CFI_ADJUST_CFA_OFFSET 4
  295. SAVE_ALL
  296. ENABLE_INTERRUPTS(CLBR_NONE)
  297. /*
  298. * Load the potential sixth argument from user stack.
  299. * Careful about security.
  300. */
  301. cmpl $__PAGE_OFFSET-3,%ebp
  302. jae syscall_fault
  303. 1: movl (%ebp),%ebp
  304. movl %ebp,PT_EBP(%esp)
  305. .section __ex_table,"a"
  306. .align 4
  307. .long 1b,syscall_fault
  308. .previous
  309. GET_THREAD_INFO(%ebp)
  310. /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
  311. testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
  312. jnz syscall_trace_entry
  313. cmpl $(nr_syscalls), %eax
  314. jae syscall_badsys
  315. call *sys_call_table(,%eax,4)
  316. movl %eax,PT_EAX(%esp)
  317. LOCKDEP_SYS_EXIT
  318. DISABLE_INTERRUPTS(CLBR_ANY)
  319. TRACE_IRQS_OFF
  320. movl TI_flags(%ebp), %ecx
  321. testw $_TIF_ALLWORK_MASK, %cx
  322. jne syscall_exit_work
  323. /* if something modifies registers it must also disable sysexit */
  324. movl PT_EIP(%esp), %edx
  325. movl PT_OLDESP(%esp), %ecx
  326. xorl %ebp,%ebp
  327. TRACE_IRQS_ON
  328. 1: mov PT_FS(%esp), %fs
  329. ENABLE_INTERRUPTS_SYSEXIT
  330. CFI_ENDPROC
  331. .pushsection .fixup,"ax"
  332. 2: movl $0,PT_FS(%esp)
  333. jmp 1b
  334. .section __ex_table,"a"
  335. .align 4
  336. .long 1b,2b
  337. .popsection
  338. ENDPROC(ia32_sysenter_target)
  339. # system call handler stub
  340. ENTRY(system_call)
  341. RING0_INT_FRAME # can't unwind into user space anyway
  342. pushl %eax # save orig_eax
  343. CFI_ADJUST_CFA_OFFSET 4
  344. SAVE_ALL
  345. GET_THREAD_INFO(%ebp)
  346. # system call tracing in operation / emulation
  347. /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
  348. testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
  349. jnz syscall_trace_entry
  350. cmpl $(nr_syscalls), %eax
  351. jae syscall_badsys
  352. syscall_call:
  353. call *sys_call_table(,%eax,4)
  354. movl %eax,PT_EAX(%esp) # store the return value
  355. syscall_exit:
  356. LOCKDEP_SYS_EXIT
  357. DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt
  358. # setting need_resched or sigpending
  359. # between sampling and the iret
  360. TRACE_IRQS_OFF
  361. movl TI_flags(%ebp), %ecx
  362. testw $_TIF_ALLWORK_MASK, %cx # current->work
  363. jne syscall_exit_work
  364. restore_all:
  365. movl PT_EFLAGS(%esp), %eax # mix EFLAGS, SS and CS
  366. # Warning: PT_OLDSS(%esp) contains the wrong/random values if we
  367. # are returning to the kernel.
  368. # See comments in process.c:copy_thread() for details.
  369. movb PT_OLDSS(%esp), %ah
  370. movb PT_CS(%esp), %al
  371. andl $(X86_EFLAGS_VM | (SEGMENT_TI_MASK << 8) | SEGMENT_RPL_MASK), %eax
  372. cmpl $((SEGMENT_LDT << 8) | USER_RPL), %eax
  373. CFI_REMEMBER_STATE
  374. je ldt_ss # returning to user-space with LDT SS
  375. restore_nocheck:
  376. TRACE_IRQS_IRET
  377. restore_nocheck_notrace:
  378. RESTORE_REGS
  379. addl $4, %esp # skip orig_eax/error_code
  380. CFI_ADJUST_CFA_OFFSET -4
  381. irq_return:
  382. INTERRUPT_RETURN
  383. .section .fixup,"ax"
  384. ENTRY(iret_exc)
  385. pushl $0 # no error code
  386. pushl $do_iret_error
  387. jmp error_code
  388. .previous
  389. .section __ex_table,"a"
  390. .align 4
  391. .long irq_return,iret_exc
  392. .previous
  393. CFI_RESTORE_STATE
  394. ldt_ss:
  395. larl PT_OLDSS(%esp), %eax
  396. jnz restore_nocheck
  397. testl $0x00400000, %eax # returning to 32bit stack?
  398. jnz restore_nocheck # allright, normal return
  399. #ifdef CONFIG_PARAVIRT
  400. /*
  401. * The kernel can't run on a non-flat stack if paravirt mode
  402. * is active. Rather than try to fixup the high bits of
  403. * ESP, bypass this code entirely. This may break DOSemu
  404. * and/or Wine support in a paravirt VM, although the option
  405. * is still available to implement the setting of the high
  406. * 16-bits in the INTERRUPT_RETURN paravirt-op.
  407. */
  408. cmpl $0, pv_info+PARAVIRT_enabled
  409. jne restore_nocheck
  410. #endif
  411. /* If returning to userspace with 16bit stack,
  412. * try to fix the higher word of ESP, as the CPU
  413. * won't restore it.
  414. * This is an "official" bug of all the x86-compatible
  415. * CPUs, which we can try to work around to make
  416. * dosemu and wine happy. */
  417. movl PT_OLDESP(%esp), %eax
  418. movl %esp, %edx
  419. call patch_espfix_desc
  420. pushl $__ESPFIX_SS
  421. CFI_ADJUST_CFA_OFFSET 4
  422. pushl %eax
  423. CFI_ADJUST_CFA_OFFSET 4
  424. DISABLE_INTERRUPTS(CLBR_EAX)
  425. TRACE_IRQS_OFF
  426. lss (%esp), %esp
  427. CFI_ADJUST_CFA_OFFSET -8
  428. jmp restore_nocheck
  429. CFI_ENDPROC
  430. ENDPROC(system_call)
  431. # perform work that needs to be done immediately before resumption
  432. ALIGN
  433. RING0_PTREGS_FRAME # can't unwind into user space anyway
  434. work_pending:
  435. testb $_TIF_NEED_RESCHED, %cl
  436. jz work_notifysig
  437. work_resched:
  438. call schedule
  439. LOCKDEP_SYS_EXIT
  440. DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt
  441. # setting need_resched or sigpending
  442. # between sampling and the iret
  443. TRACE_IRQS_OFF
  444. movl TI_flags(%ebp), %ecx
  445. andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
  446. # than syscall tracing?
  447. jz restore_all
  448. testb $_TIF_NEED_RESCHED, %cl
  449. jnz work_resched
  450. work_notifysig: # deal with pending signals and
  451. # notify-resume requests
  452. #ifdef CONFIG_VM86
  453. testl $X86_EFLAGS_VM, PT_EFLAGS(%esp)
  454. movl %esp, %eax
  455. jne work_notifysig_v86 # returning to kernel-space or
  456. # vm86-space
  457. xorl %edx, %edx
  458. call do_notify_resume
  459. jmp resume_userspace_sig
  460. ALIGN
  461. work_notifysig_v86:
  462. pushl %ecx # save ti_flags for do_notify_resume
  463. CFI_ADJUST_CFA_OFFSET 4
  464. call save_v86_state # %eax contains pt_regs pointer
  465. popl %ecx
  466. CFI_ADJUST_CFA_OFFSET -4
  467. movl %eax, %esp
  468. #else
  469. movl %esp, %eax
  470. #endif
  471. xorl %edx, %edx
  472. call do_notify_resume
  473. jmp resume_userspace_sig
  474. END(work_pending)
  475. # perform syscall exit tracing
  476. ALIGN
  477. syscall_trace_entry:
  478. movl $-ENOSYS,PT_EAX(%esp)
  479. movl %esp, %eax
  480. call syscall_trace_enter
  481. /* What it returned is what we'll actually use. */
  482. cmpl $(nr_syscalls), %eax
  483. jnae syscall_call
  484. jmp syscall_exit
  485. END(syscall_trace_entry)
  486. # perform syscall exit tracing
  487. ALIGN
  488. syscall_exit_work:
  489. testb $_TIF_WORK_SYSCALL_EXIT, %cl
  490. jz work_pending
  491. TRACE_IRQS_ON
  492. ENABLE_INTERRUPTS(CLBR_ANY) # could let syscall_trace_leave() call
  493. # schedule() instead
  494. movl %esp, %eax
  495. call syscall_trace_leave
  496. jmp resume_userspace
  497. END(syscall_exit_work)
  498. CFI_ENDPROC
  499. RING0_INT_FRAME # can't unwind into user space anyway
  500. syscall_fault:
  501. GET_THREAD_INFO(%ebp)
  502. movl $-EFAULT,PT_EAX(%esp)
  503. jmp resume_userspace
  504. END(syscall_fault)
  505. syscall_badsys:
  506. movl $-ENOSYS,PT_EAX(%esp)
  507. jmp resume_userspace
  508. END(syscall_badsys)
  509. CFI_ENDPROC
  510. #define FIXUP_ESPFIX_STACK \
  511. /* since we are on a wrong stack, we cant make it a C code :( */ \
  512. PER_CPU(gdt_page, %ebx); \
  513. GET_DESC_BASE(GDT_ENTRY_ESPFIX_SS, %ebx, %eax, %ax, %al, %ah); \
  514. addl %esp, %eax; \
  515. pushl $__KERNEL_DS; \
  516. CFI_ADJUST_CFA_OFFSET 4; \
  517. pushl %eax; \
  518. CFI_ADJUST_CFA_OFFSET 4; \
  519. lss (%esp), %esp; \
  520. CFI_ADJUST_CFA_OFFSET -8;
  521. #define UNWIND_ESPFIX_STACK \
  522. movl %ss, %eax; \
  523. /* see if on espfix stack */ \
  524. cmpw $__ESPFIX_SS, %ax; \
  525. jne 27f; \
  526. movl $__KERNEL_DS, %eax; \
  527. movl %eax, %ds; \
  528. movl %eax, %es; \
  529. /* switch to normal stack */ \
  530. FIXUP_ESPFIX_STACK; \
  531. 27:;
  532. /*
  533. * Build the entry stubs and pointer table with
  534. * some assembler magic.
  535. */
  536. .section .rodata,"a"
  537. ENTRY(interrupt)
  538. .text
  539. ENTRY(irq_entries_start)
  540. RING0_INT_FRAME
  541. vector=0
  542. .rept NR_IRQS
  543. ALIGN
  544. .if vector
  545. CFI_ADJUST_CFA_OFFSET -4
  546. .endif
  547. 1: pushl $~(vector)
  548. CFI_ADJUST_CFA_OFFSET 4
  549. jmp common_interrupt
  550. .previous
  551. .long 1b
  552. .text
  553. vector=vector+1
  554. .endr
  555. END(irq_entries_start)
  556. .previous
  557. END(interrupt)
  558. .previous
  559. /*
  560. * the CPU automatically disables interrupts when executing an IRQ vector,
  561. * so IRQ-flags tracing has to follow that:
  562. */
  563. ALIGN
  564. common_interrupt:
  565. SAVE_ALL
  566. TRACE_IRQS_OFF
  567. movl %esp,%eax
  568. call do_IRQ
  569. jmp ret_from_intr
  570. ENDPROC(common_interrupt)
  571. CFI_ENDPROC
  572. #define BUILD_INTERRUPT(name, nr) \
  573. ENTRY(name) \
  574. RING0_INT_FRAME; \
  575. pushl $~(nr); \
  576. CFI_ADJUST_CFA_OFFSET 4; \
  577. SAVE_ALL; \
  578. TRACE_IRQS_OFF \
  579. movl %esp,%eax; \
  580. call smp_##name; \
  581. jmp ret_from_intr; \
  582. CFI_ENDPROC; \
  583. ENDPROC(name)
  584. /* The include is where all of the SMP etc. interrupts come from */
  585. #include "entry_arch.h"
  586. KPROBE_ENTRY(page_fault)
  587. RING0_EC_FRAME
  588. pushl $do_page_fault
  589. CFI_ADJUST_CFA_OFFSET 4
  590. ALIGN
  591. error_code:
  592. /* the function address is in %fs's slot on the stack */
  593. pushl %es
  594. CFI_ADJUST_CFA_OFFSET 4
  595. /*CFI_REL_OFFSET es, 0*/
  596. pushl %ds
  597. CFI_ADJUST_CFA_OFFSET 4
  598. /*CFI_REL_OFFSET ds, 0*/
  599. pushl %eax
  600. CFI_ADJUST_CFA_OFFSET 4
  601. CFI_REL_OFFSET eax, 0
  602. pushl %ebp
  603. CFI_ADJUST_CFA_OFFSET 4
  604. CFI_REL_OFFSET ebp, 0
  605. pushl %edi
  606. CFI_ADJUST_CFA_OFFSET 4
  607. CFI_REL_OFFSET edi, 0
  608. pushl %esi
  609. CFI_ADJUST_CFA_OFFSET 4
  610. CFI_REL_OFFSET esi, 0
  611. pushl %edx
  612. CFI_ADJUST_CFA_OFFSET 4
  613. CFI_REL_OFFSET edx, 0
  614. pushl %ecx
  615. CFI_ADJUST_CFA_OFFSET 4
  616. CFI_REL_OFFSET ecx, 0
  617. pushl %ebx
  618. CFI_ADJUST_CFA_OFFSET 4
  619. CFI_REL_OFFSET ebx, 0
  620. cld
  621. pushl %fs
  622. CFI_ADJUST_CFA_OFFSET 4
  623. /*CFI_REL_OFFSET fs, 0*/
  624. movl $(__KERNEL_PERCPU), %ecx
  625. movl %ecx, %fs
  626. UNWIND_ESPFIX_STACK
  627. popl %ecx
  628. CFI_ADJUST_CFA_OFFSET -4
  629. /*CFI_REGISTER es, ecx*/
  630. movl PT_FS(%esp), %edi # get the function address
  631. movl PT_ORIG_EAX(%esp), %edx # get the error code
  632. movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
  633. mov %ecx, PT_FS(%esp)
  634. /*CFI_REL_OFFSET fs, ES*/
  635. movl $(__USER_DS), %ecx
  636. movl %ecx, %ds
  637. movl %ecx, %es
  638. movl %esp,%eax # pt_regs pointer
  639. call *%edi
  640. jmp ret_from_exception
  641. CFI_ENDPROC
  642. KPROBE_END(page_fault)
  643. ENTRY(coprocessor_error)
  644. RING0_INT_FRAME
  645. pushl $0
  646. CFI_ADJUST_CFA_OFFSET 4
  647. pushl $do_coprocessor_error
  648. CFI_ADJUST_CFA_OFFSET 4
  649. jmp error_code
  650. CFI_ENDPROC
  651. END(coprocessor_error)
  652. ENTRY(simd_coprocessor_error)
  653. RING0_INT_FRAME
  654. pushl $0
  655. CFI_ADJUST_CFA_OFFSET 4
  656. pushl $do_simd_coprocessor_error
  657. CFI_ADJUST_CFA_OFFSET 4
  658. jmp error_code
  659. CFI_ENDPROC
  660. END(simd_coprocessor_error)
  661. ENTRY(device_not_available)
  662. RING0_INT_FRAME
  663. pushl $-1 # mark this as an int
  664. CFI_ADJUST_CFA_OFFSET 4
  665. SAVE_ALL
  666. GET_CR0_INTO_EAX
  667. testl $0x4, %eax # EM (math emulation bit)
  668. jne device_not_available_emulate
  669. preempt_stop(CLBR_ANY)
  670. call math_state_restore
  671. jmp ret_from_exception
  672. device_not_available_emulate:
  673. pushl $0 # temporary storage for ORIG_EIP
  674. CFI_ADJUST_CFA_OFFSET 4
  675. call math_emulate
  676. addl $4, %esp
  677. CFI_ADJUST_CFA_OFFSET -4
  678. jmp ret_from_exception
  679. CFI_ENDPROC
  680. END(device_not_available)
  681. /*
  682. * Debug traps and NMI can happen at the one SYSENTER instruction
  683. * that sets up the real kernel stack. Check here, since we can't
  684. * allow the wrong stack to be used.
  685. *
  686. * "TSS_sysenter_sp0+12" is because the NMI/debug handler will have
  687. * already pushed 3 words if it hits on the sysenter instruction:
  688. * eflags, cs and eip.
  689. *
  690. * We just load the right stack, and push the three (known) values
  691. * by hand onto the new stack - while updating the return eip past
  692. * the instruction that would have done it for sysenter.
  693. */
  694. #define FIX_STACK(offset, ok, label) \
  695. cmpw $__KERNEL_CS,4(%esp); \
  696. jne ok; \
  697. label: \
  698. movl TSS_sysenter_sp0+offset(%esp),%esp; \
  699. CFI_DEF_CFA esp, 0; \
  700. CFI_UNDEFINED eip; \
  701. pushfl; \
  702. CFI_ADJUST_CFA_OFFSET 4; \
  703. pushl $__KERNEL_CS; \
  704. CFI_ADJUST_CFA_OFFSET 4; \
  705. pushl $sysenter_past_esp; \
  706. CFI_ADJUST_CFA_OFFSET 4; \
  707. CFI_REL_OFFSET eip, 0
  708. KPROBE_ENTRY(debug)
  709. RING0_INT_FRAME
  710. cmpl $ia32_sysenter_target,(%esp)
  711. jne debug_stack_correct
  712. FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
  713. debug_stack_correct:
  714. pushl $-1 # mark this as an int
  715. CFI_ADJUST_CFA_OFFSET 4
  716. SAVE_ALL
  717. xorl %edx,%edx # error code 0
  718. movl %esp,%eax # pt_regs pointer
  719. call do_debug
  720. jmp ret_from_exception
  721. CFI_ENDPROC
  722. KPROBE_END(debug)
  723. /*
  724. * NMI is doubly nasty. It can happen _while_ we're handling
  725. * a debug fault, and the debug fault hasn't yet been able to
  726. * clear up the stack. So we first check whether we got an
  727. * NMI on the sysenter entry path, but after that we need to
  728. * check whether we got an NMI on the debug path where the debug
  729. * fault happened on the sysenter path.
  730. */
  731. KPROBE_ENTRY(nmi)
  732. RING0_INT_FRAME
  733. pushl %eax
  734. CFI_ADJUST_CFA_OFFSET 4
  735. movl %ss, %eax
  736. cmpw $__ESPFIX_SS, %ax
  737. popl %eax
  738. CFI_ADJUST_CFA_OFFSET -4
  739. je nmi_espfix_stack
  740. cmpl $ia32_sysenter_target,(%esp)
  741. je nmi_stack_fixup
  742. pushl %eax
  743. CFI_ADJUST_CFA_OFFSET 4
  744. movl %esp,%eax
  745. /* Do not access memory above the end of our stack page,
  746. * it might not exist.
  747. */
  748. andl $(THREAD_SIZE-1),%eax
  749. cmpl $(THREAD_SIZE-20),%eax
  750. popl %eax
  751. CFI_ADJUST_CFA_OFFSET -4
  752. jae nmi_stack_correct
  753. cmpl $ia32_sysenter_target,12(%esp)
  754. je nmi_debug_stack_check
  755. nmi_stack_correct:
  756. /* We have a RING0_INT_FRAME here */
  757. pushl %eax
  758. CFI_ADJUST_CFA_OFFSET 4
  759. SAVE_ALL
  760. xorl %edx,%edx # zero error code
  761. movl %esp,%eax # pt_regs pointer
  762. call do_nmi
  763. jmp restore_nocheck_notrace
  764. CFI_ENDPROC
  765. nmi_stack_fixup:
  766. RING0_INT_FRAME
  767. FIX_STACK(12,nmi_stack_correct, 1)
  768. jmp nmi_stack_correct
  769. nmi_debug_stack_check:
  770. /* We have a RING0_INT_FRAME here */
  771. cmpw $__KERNEL_CS,16(%esp)
  772. jne nmi_stack_correct
  773. cmpl $debug,(%esp)
  774. jb nmi_stack_correct
  775. cmpl $debug_esp_fix_insn,(%esp)
  776. ja nmi_stack_correct
  777. FIX_STACK(24,nmi_stack_correct, 1)
  778. jmp nmi_stack_correct
  779. nmi_espfix_stack:
  780. /* We have a RING0_INT_FRAME here.
  781. *
  782. * create the pointer to lss back
  783. */
  784. pushl %ss
  785. CFI_ADJUST_CFA_OFFSET 4
  786. pushl %esp
  787. CFI_ADJUST_CFA_OFFSET 4
  788. addw $4, (%esp)
  789. /* copy the iret frame of 12 bytes */
  790. .rept 3
  791. pushl 16(%esp)
  792. CFI_ADJUST_CFA_OFFSET 4
  793. .endr
  794. pushl %eax
  795. CFI_ADJUST_CFA_OFFSET 4
  796. SAVE_ALL
  797. FIXUP_ESPFIX_STACK # %eax == %esp
  798. xorl %edx,%edx # zero error code
  799. call do_nmi
  800. RESTORE_REGS
  801. lss 12+4(%esp), %esp # back to espfix stack
  802. CFI_ADJUST_CFA_OFFSET -24
  803. jmp irq_return
  804. CFI_ENDPROC
  805. KPROBE_END(nmi)
  806. #ifdef CONFIG_PARAVIRT
  807. ENTRY(native_iret)
  808. iret
  809. .section __ex_table,"a"
  810. .align 4
  811. .long native_iret, iret_exc
  812. .previous
  813. END(native_iret)
  814. ENTRY(native_irq_enable_sysexit)
  815. sti
  816. sysexit
  817. END(native_irq_enable_sysexit)
  818. #endif
  819. KPROBE_ENTRY(int3)
  820. RING0_INT_FRAME
  821. pushl $-1 # mark this as an int
  822. CFI_ADJUST_CFA_OFFSET 4
  823. SAVE_ALL
  824. xorl %edx,%edx # zero error code
  825. movl %esp,%eax # pt_regs pointer
  826. call do_int3
  827. jmp ret_from_exception
  828. CFI_ENDPROC
  829. KPROBE_END(int3)
  830. ENTRY(overflow)
  831. RING0_INT_FRAME
  832. pushl $0
  833. CFI_ADJUST_CFA_OFFSET 4
  834. pushl $do_overflow
  835. CFI_ADJUST_CFA_OFFSET 4
  836. jmp error_code
  837. CFI_ENDPROC
  838. END(overflow)
  839. ENTRY(bounds)
  840. RING0_INT_FRAME
  841. pushl $0
  842. CFI_ADJUST_CFA_OFFSET 4
  843. pushl $do_bounds
  844. CFI_ADJUST_CFA_OFFSET 4
  845. jmp error_code
  846. CFI_ENDPROC
  847. END(bounds)
  848. ENTRY(invalid_op)
  849. RING0_INT_FRAME
  850. pushl $0
  851. CFI_ADJUST_CFA_OFFSET 4
  852. pushl $do_invalid_op
  853. CFI_ADJUST_CFA_OFFSET 4
  854. jmp error_code
  855. CFI_ENDPROC
  856. END(invalid_op)
  857. ENTRY(coprocessor_segment_overrun)
  858. RING0_INT_FRAME
  859. pushl $0
  860. CFI_ADJUST_CFA_OFFSET 4
  861. pushl $do_coprocessor_segment_overrun
  862. CFI_ADJUST_CFA_OFFSET 4
  863. jmp error_code
  864. CFI_ENDPROC
  865. END(coprocessor_segment_overrun)
  866. ENTRY(invalid_TSS)
  867. RING0_EC_FRAME
  868. pushl $do_invalid_TSS
  869. CFI_ADJUST_CFA_OFFSET 4
  870. jmp error_code
  871. CFI_ENDPROC
  872. END(invalid_TSS)
  873. ENTRY(segment_not_present)
  874. RING0_EC_FRAME
  875. pushl $do_segment_not_present
  876. CFI_ADJUST_CFA_OFFSET 4
  877. jmp error_code
  878. CFI_ENDPROC
  879. END(segment_not_present)
  880. ENTRY(stack_segment)
  881. RING0_EC_FRAME
  882. pushl $do_stack_segment
  883. CFI_ADJUST_CFA_OFFSET 4
  884. jmp error_code
  885. CFI_ENDPROC
  886. END(stack_segment)
  887. KPROBE_ENTRY(general_protection)
  888. RING0_EC_FRAME
  889. pushl $do_general_protection
  890. CFI_ADJUST_CFA_OFFSET 4
  891. jmp error_code
  892. CFI_ENDPROC
  893. KPROBE_END(general_protection)
  894. ENTRY(alignment_check)
  895. RING0_EC_FRAME
  896. pushl $do_alignment_check
  897. CFI_ADJUST_CFA_OFFSET 4
  898. jmp error_code
  899. CFI_ENDPROC
  900. END(alignment_check)
  901. ENTRY(divide_error)
  902. RING0_INT_FRAME
  903. pushl $0 # no error code
  904. CFI_ADJUST_CFA_OFFSET 4
  905. pushl $do_divide_error
  906. CFI_ADJUST_CFA_OFFSET 4
  907. jmp error_code
  908. CFI_ENDPROC
  909. END(divide_error)
  910. #ifdef CONFIG_X86_MCE
  911. ENTRY(machine_check)
  912. RING0_INT_FRAME
  913. pushl $0
  914. CFI_ADJUST_CFA_OFFSET 4
  915. pushl machine_check_vector
  916. CFI_ADJUST_CFA_OFFSET 4
  917. jmp error_code
  918. CFI_ENDPROC
  919. END(machine_check)
  920. #endif
  921. ENTRY(spurious_interrupt_bug)
  922. RING0_INT_FRAME
  923. pushl $0
  924. CFI_ADJUST_CFA_OFFSET 4
  925. pushl $do_spurious_interrupt_bug
  926. CFI_ADJUST_CFA_OFFSET 4
  927. jmp error_code
  928. CFI_ENDPROC
  929. END(spurious_interrupt_bug)
  930. ENTRY(kernel_thread_helper)
  931. pushl $0 # fake return address for unwinder
  932. CFI_STARTPROC
  933. movl %edx,%eax
  934. push %edx
  935. CFI_ADJUST_CFA_OFFSET 4
  936. call *%ebx
  937. push %eax
  938. CFI_ADJUST_CFA_OFFSET 4
  939. call do_exit
  940. CFI_ENDPROC
  941. ENDPROC(kernel_thread_helper)
  942. #ifdef CONFIG_XEN
  943. /* Xen doesn't set %esp to be precisely what the normal sysenter
  944. entrypoint expects, so fix it up before using the normal path. */
  945. ENTRY(xen_sysenter_target)
  946. RING0_INT_FRAME
  947. addl $5*4, %esp /* remove xen-provided frame */
  948. CFI_ADJUST_CFA_OFFSET -5*4
  949. jmp sysenter_past_esp
  950. CFI_ENDPROC
  951. ENTRY(xen_hypervisor_callback)
  952. CFI_STARTPROC
  953. pushl $0
  954. CFI_ADJUST_CFA_OFFSET 4
  955. SAVE_ALL
  956. TRACE_IRQS_OFF
  957. /* Check to see if we got the event in the critical
  958. region in xen_iret_direct, after we've reenabled
  959. events and checked for pending events. This simulates
  960. iret instruction's behaviour where it delivers a
  961. pending interrupt when enabling interrupts. */
  962. movl PT_EIP(%esp),%eax
  963. cmpl $xen_iret_start_crit,%eax
  964. jb 1f
  965. cmpl $xen_iret_end_crit,%eax
  966. jae 1f
  967. jmp xen_iret_crit_fixup
  968. ENTRY(xen_do_upcall)
  969. 1: mov %esp, %eax
  970. call xen_evtchn_do_upcall
  971. jmp ret_from_intr
  972. CFI_ENDPROC
  973. ENDPROC(xen_hypervisor_callback)
  974. # Hypervisor uses this for application faults while it executes.
  975. # We get here for two reasons:
  976. # 1. Fault while reloading DS, ES, FS or GS
  977. # 2. Fault while executing IRET
  978. # Category 1 we fix up by reattempting the load, and zeroing the segment
  979. # register if the load fails.
  980. # Category 2 we fix up by jumping to do_iret_error. We cannot use the
  981. # normal Linux return path in this case because if we use the IRET hypercall
  982. # to pop the stack frame we end up in an infinite loop of failsafe callbacks.
  983. # We distinguish between categories by maintaining a status value in EAX.
  984. ENTRY(xen_failsafe_callback)
  985. CFI_STARTPROC
  986. pushl %eax
  987. CFI_ADJUST_CFA_OFFSET 4
  988. movl $1,%eax
  989. 1: mov 4(%esp),%ds
  990. 2: mov 8(%esp),%es
  991. 3: mov 12(%esp),%fs
  992. 4: mov 16(%esp),%gs
  993. testl %eax,%eax
  994. popl %eax
  995. CFI_ADJUST_CFA_OFFSET -4
  996. lea 16(%esp),%esp
  997. CFI_ADJUST_CFA_OFFSET -16
  998. jz 5f
  999. addl $16,%esp
  1000. jmp iret_exc # EAX != 0 => Category 2 (Bad IRET)
  1001. 5: pushl $0 # EAX == 0 => Category 1 (Bad segment)
  1002. CFI_ADJUST_CFA_OFFSET 4
  1003. SAVE_ALL
  1004. jmp ret_from_exception
  1005. CFI_ENDPROC
  1006. .section .fixup,"ax"
  1007. 6: xorl %eax,%eax
  1008. movl %eax,4(%esp)
  1009. jmp 1b
  1010. 7: xorl %eax,%eax
  1011. movl %eax,8(%esp)
  1012. jmp 2b
  1013. 8: xorl %eax,%eax
  1014. movl %eax,12(%esp)
  1015. jmp 3b
  1016. 9: xorl %eax,%eax
  1017. movl %eax,16(%esp)
  1018. jmp 4b
  1019. .previous
  1020. .section __ex_table,"a"
  1021. .align 4
  1022. .long 1b,6b
  1023. .long 2b,7b
  1024. .long 3b,8b
  1025. .long 4b,9b
  1026. .previous
  1027. ENDPROC(xen_failsafe_callback)
  1028. #endif /* CONFIG_XEN */
  1029. #ifdef CONFIG_FTRACE
  1030. #ifdef CONFIG_DYNAMIC_FTRACE
  1031. ENTRY(mcount)
  1032. pushl %eax
  1033. pushl %ecx
  1034. pushl %edx
  1035. movl 0xc(%esp), %eax
  1036. subl $MCOUNT_INSN_SIZE, %eax
  1037. .globl mcount_call
  1038. mcount_call:
  1039. call ftrace_stub
  1040. popl %edx
  1041. popl %ecx
  1042. popl %eax
  1043. ret
  1044. END(mcount)
  1045. ENTRY(ftrace_caller)
  1046. pushl %eax
  1047. pushl %ecx
  1048. pushl %edx
  1049. movl 0xc(%esp), %eax
  1050. movl 0x4(%ebp), %edx
  1051. subl $MCOUNT_INSN_SIZE, %eax
  1052. .globl ftrace_call
  1053. ftrace_call:
  1054. call ftrace_stub
  1055. popl %edx
  1056. popl %ecx
  1057. popl %eax
  1058. .globl ftrace_stub
  1059. ftrace_stub:
  1060. ret
  1061. END(ftrace_caller)
  1062. #else /* ! CONFIG_DYNAMIC_FTRACE */
  1063. ENTRY(mcount)
  1064. cmpl $ftrace_stub, ftrace_trace_function
  1065. jnz trace
  1066. .globl ftrace_stub
  1067. ftrace_stub:
  1068. ret
  1069. /* taken from glibc */
  1070. trace:
  1071. pushl %eax
  1072. pushl %ecx
  1073. pushl %edx
  1074. movl 0xc(%esp), %eax
  1075. movl 0x4(%ebp), %edx
  1076. subl $MCOUNT_INSN_SIZE, %eax
  1077. call *ftrace_trace_function
  1078. popl %edx
  1079. popl %ecx
  1080. popl %eax
  1081. jmp ftrace_stub
  1082. END(mcount)
  1083. #endif /* CONFIG_DYNAMIC_FTRACE */
  1084. #endif /* CONFIG_FTRACE */
  1085. .section .rodata,"a"
  1086. #include "syscall_table_32.S"
  1087. syscall_table_size=(.-sys_call_table)