View | Details | Raw Unified | Return to bug 65236
Collapse All | Expand All

(-)/usr/src/linux-2.4.21-286/arch/ia64/kernel/entry.S (-7 / +19 lines)
Lines 46-53 Link Here
46
	 * setup a null register window frame.
46
	 * setup a null register window frame.
47
	 */
47
	 */
48
ENTRY(ia64_execve)
48
ENTRY(ia64_execve)
49
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)
49
	/*
50
	alloc loc1=ar.pfs,3,2,4,0
50
	 * Allocate 8 input registers since ptrace() may clobber them
51
	 */
52
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
53
	alloc loc1=ar.pfs,8,2,4,0
51
	mov loc0=rp
54
	mov loc0=rp
52
	.body
55
	.body
53
	mov out0=in0			// filename
56
	mov out0=in0			// filename
Lines 89-96 ENTRY(ia64_execve) Link Here
89
END(ia64_execve)
92
END(ia64_execve)
90
93
91
GLOBAL_ENTRY(sys_clone2)
94
GLOBAL_ENTRY(sys_clone2)
92
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
95
	/*
93
	alloc r16=ar.pfs,3,2,4,0
96
	 * Allocate 8 input registers since ptrace() may clobber them
97
	 */
98
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
99
	alloc r16=ar.pfs,8,2,4,0
94
	DO_SAVE_SWITCH_STACK
100
	DO_SAVE_SWITCH_STACK
95
	mov loc0=rp
101
	mov loc0=rp
96
	mov loc1=r16				// save ar.pfs across do_fork
102
	mov loc1=r16				// save ar.pfs across do_fork
Lines 108-115 GLOBAL_ENTRY(sys_clone2) Link Here
108
END(sys_clone2)
114
END(sys_clone2)
109
115
110
GLOBAL_ENTRY(sys_clone)
116
GLOBAL_ENTRY(sys_clone)
111
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
117
	/*
112
	alloc r16=ar.pfs,2,2,4,0
118
	 * Allocate 8 input registers since ptrace() may clobber them
119
	 */
120
	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
121
	alloc r16=ar.pfs,8,2,4,0
113
	DO_SAVE_SWITCH_STACK
122
	DO_SAVE_SWITCH_STACK
114
	mov loc0=rp
123
	mov loc0=rp
115
	mov loc1=r16				// save ar.pfs across do_fork
124
	mov loc1=r16				// save ar.pfs across do_fork
Lines 938-944 END(sys_rt_sigsuspend) Link Here
938
947
939
ENTRY(sys_rt_sigreturn)
948
ENTRY(sys_rt_sigreturn)
940
	PT_REGS_UNWIND_INFO(0)
949
	PT_REGS_UNWIND_INFO(0)
941
	alloc r2=ar.pfs,0,0,1,0
950
	/*
951
	 * Allocate 8 input registers since ptrace() may clobber them
952
	 */
953
	alloc r2=ar.pfs,8,0,1,0
942
	.prologue
954
	.prologue
943
	PT_REGS_SAVES(16)
955
	PT_REGS_SAVES(16)
944
	adds sp=-16,sp
956
	adds sp=-16,sp
(-)/usr/src/linux-2.4.21-286/arch/ia64/kernel/ivt.S (-4 / +13 lines)
Lines 647-673 ENTRY(break_fault) Link Here
647
	SAVE_REST
647
	SAVE_REST
648
	br.call.sptk.many rp=demine_args	// clear NaT bits in (potential) syscall args
648
	br.call.sptk.many rp=demine_args	// clear NaT bits in (potential) syscall args
649
649
650
// demine_args exits with r2 containing the frame marker when the syscall was issued.
651
	and r18=0x7f,r2				// get sof of issuer's cfm
652
	extr.u r17=r2,7,7			// get sol of issuer's cfm
653
650
	mov r3=255
654
	mov r3=255
651
	adds r15=-1024,r15			// r15 contains the syscall number---subtract 1024
655
	adds r15=-1024,r15			// r15 contains the syscall number---subtract 1024
652
	adds r2=IA64_TASK_PTRACE_OFFSET,r13	// r2 = &current->ptrace
656
	adds r2=IA64_TASK_PTRACE_OFFSET,r13	// r2 = &current->ptrace
653
	;;
657
	;;
658
	add r17=8,r17				// sol + 8
654
	cmp.geu p6,p7=r3,r15		// (syscall > 0 && syscall <= 1024+255) ?
659
	cmp.geu p6,p7=r3,r15		// (syscall > 0 && syscall <= 1024+255) ?
655
	movl r16=sys_call_table
660
	movl r16=sys_call_table
656
	;;
661
	;;
662
(p6)	cmp.lt p7,p6=r17,r18			// frame size can't be more than local+8
663
	;;
657
(p6)	shladd r16=r15,3,r16
664
(p6)	shladd r16=r15,3,r16
658
	movl r15=ia64_ret_from_syscall
659
(p7)	adds r16=(__NR_ni_syscall-1024)*8,r16	// force __NR_ni_syscall
665
(p7)	adds r16=(__NR_ni_syscall-1024)*8,r16	// force __NR_ni_syscall
666
	ld8 r2=[r2]				// r2 = current->ptrace
667
	movl r15=ia64_ret_from_syscall
660
	;;
668
	;;
661
	ld8 r16=[r16]				// load address of syscall entry point
669
	ld8 r16=[r16]				// load address of syscall entry point
662
	mov rp=r15				// set the real return addr
670
	mov rp=r15				// set the real return addr
663
	;;
664
	ld8 r2=[r2]				// r2 = current->ptrace
665
	mov r19=PT_TRACEAUDITMASK		// r19 = PT_TRACESYS|PT_AUDITED
671
	mov r19=PT_TRACEAUDITMASK		// r19 = PT_TRACESYS|PT_AUDITED
666
	mov b6=r16
672
	;;
667
673
668
	// arrange things so we skip over break instruction when returning:
674
	// arrange things so we skip over break instruction when returning:
669
675
670
	adds r16=16,sp				// get pointer to cr_ipsr
676
	adds r16=16,sp				// get pointer to cr_ipsr
677
	mov b6=r16
671
	adds r17=24,sp				// get pointer to cr_iip
678
	adds r17=24,sp				// get pointer to cr_iip
672
	;;
679
	;;
673
	ld8 r18=[r16]				// fetch cr_ipsr
680
	ld8 r18=[r16]				// fetch cr_ipsr
Lines 693-698 ENTRY(break_fault) Link Here
693
	// NOT REACHED
700
	// NOT REACHED
694
END(break_fault)
701
END(break_fault)
695
702
703
// Ensure that the syscall arguments plus r15 (syscall number) are valid.
704
// Exit with r2 containing the frame size when the syscall was issued.
696
ENTRY(demine_args)
705
ENTRY(demine_args)
697
	alloc r2=ar.pfs,8,0,0,0
706
	alloc r2=ar.pfs,8,0,0,0
698
	tnat.nz p8,p0=in0
707
	tnat.nz p8,p0=in0
(-)/usr/src/linux-2.4.21-286/arch/ia64/kernel/process.c (-1 / +1 lines)
Lines 455-461 dump_fpu (struct pt_regs *pt, elf_fpregs Link Here
455
	return 1;	/* f0-f31 are always valid so we always return 1 */
455
	return 1;	/* f0-f31 are always valid so we always return 1 */
456
}
456
}
457
457
458
asmlinkage long
458
long
459
sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
459
sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
460
{
460
{
461
	int error;
461
	int error;

Return to bug 65236