This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix ppc32


On Monday 06 January 2003 17:13, Jakub Jelinek wrote:
> On Sat, Jan 04, 2003 at 10:01:16PM +0100, Franz Sirl wrote:
> > On Saturday 04 January 2003 21:33, Jakub Jelinek wrote:
> > > On Sat, Jan 04, 2003 at 05:06:01PM +0100, Franz Sirl wrote:
> > > >	*
> > > > linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.
> > > >h: New file.
> > >
> > > Thanks for working on this.
> >
> > I'm forced to, if I want to keep my system uptodate :-). Any idea about
> > the AIO problem?
>
> Actually, I have - broken pread* and pwrite*.
> The following patch (on top of the LIBC_CANCEL_HANDLED patch) should fix
> it. __syscall_pread/__syscall_pwrite uses r3,r4,r5,r7,r8 regs to pass
> arguments, so syscalls.list needs to indicate that.
> Alternatively, you could do LIBC_CANCEL_ASYNC/LIBC_CANCEL_RESET in
> sysdeps/unix/sysv/linux/powerpc/p{read,write}{,64}.c.
>
> Also, sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S needs cancellation
> support.
>
> 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
>
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list
> 	(s_pread64, s_pwrite64): Add 6th argument.
> 	* sysdeps/unix/sysv/linux/powerpc/pread.c: Include sysdep-cancel.h,
> 	add LIBC_CANCEL_HANDLED.
> 	* sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
> linuxthreads/
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
> 	(DOCARGS_6, UNDOCARGS_6): Define.

Uhm, sorry for the delay, I have a patch already for that. Your analysis for 
the pread/pwrite problem is correct though, I noted this myself yesterday 
morning, but the machines I have access to are quite slow...

Anyway, since I realized there is now a possible failure point with 64bit args 
to syscalls and PSEUDO stubs as well, my refusal to use INLINE_SYSCALL 
unfortunately has no advantage anymore (before the args argument simply 
wasn't used and couldn't cause failures). The appended patch adds 
*truncate64.c, pread*.c and pwrite*.c to PPC32. Would someone please so kind 
and move the old files down to the powerpc64 directory?

There's also a small hunk for elf/dl-misc.c that makes it explicit that we 
want the address of the IOV array. That way the sizeof safety checks I added 
don't need to mess around with __builtin_classify_type.

Franz.

	* elf/dl-misc.c (_dl_debug_vdprintf): Make taking address of array
	explicit.
	* sysdeps/powerpc/powerpc32/sysdep.h (PSEUDO_RET): Add branch hint.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S: Add cancellation
	support.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Remove
	ftruncate64, truncate64, pread64 and pwrite64 entries.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
	(INLINE_SYSCALL): Add __builtin_expect.
	(LOADARGS_n): Add argument size safety checks.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: New file.

linuxthreads:
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Remove s_pread64 and
	s_pwrite64.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Add support for
	syscalls with 6 arguments.

Attachment: glibc-ppc-cancellation-2.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]