.long sys_mq_timedreceive /* 280 */
.long sys_mq_notify
.long sys_mq_getsetattr
- .long sys_ni_syscall /* reserved for kexec */
+ .long sys_kexec_load
.long sys_ioprio_set
.long sys_ioprio_get /* 285 */
syscall_table_size=(.-sys_call_table)
+
+#ifdef CONFIG_X86_STACK_CHECK
+.data
+.globl stack_overflowed
+stack_overflowed:
+ .long 0
+.text
+
+ENTRY(mcount)
+#warning stack check enabled
+ push %eax
+ movl $(THREAD_SIZE - 1),%eax
+ andl %esp,%eax
+ cmpl $STACK_WARN,%eax
+ jle 1f
+2:
+ popl %eax
+ ret
+1:
+ /* prevent infinite recursion from call to mcount from the
+ * stack_overflow function. Need to revisit this code for
+ * SMP based systems.
+ */
+ lock; btsl $0,stack_overflowed
+ jc 2b
+
+ /* prepare to jmp to stack_overflow directly, as if it were
+ * called directly by the caller of mcount.
+ */
+ pushl %ebp
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+
+ call stack_overflow
+ /* Note that stack_overflow() will clear the stack_overflowed
+ * variable.
+ */
+
+ popl %edi
+ popl %esi
+ popl %ebx
+ popl %ebp
+
+ popl %eax
+ ret
+#endif