* Re: Cross Memory Attach v3 [not found] <20110719003537.16b189ae@lilo> @ 2011-11-20 10:16 ` Geert Uytterhoeven 2011-11-21 0:13 ` Christopher Yeoh 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2011-11-20 10:16 UTC (permalink / raw) To: Christopher Yeoh Cc: Andrew Morton, linux-mm, linux-kernel, linux-man, linux-arch, Linux/m68k Hi Christopher, On Mon, Jul 18, 2011 at 17:05, Christopher Yeoh <cyeoh@au1.ibm.com> wrote: > For arch maintainers there are some simple tests to be able to quickly > verify that the syscalls are working correctly here: I'm wiring up these new syscalls on m68k. > http://ozlabs.org/~cyeoh/cma/cma-test-20110718.tgz The included README talks about: setup_process_readv_simple setup_process_readv_iovec setup_process_writev while the actual test executables are called: setup_process_vm_readv_simple setup_process_vm_readv_iovec setup_process_vm_writev On m68k (ARAnyM), the first and third test succeed. The second one fails, though: # Setting up target with num iovecs 10, test buffer size 100000 Target process is setup Run the following to test: ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 and in the other window: # ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 copy_from_process failed: Invalid argument error code: 29 # Any suggestions? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-11-20 10:16 ` Cross Memory Attach v3 Geert Uytterhoeven @ 2011-11-21 0:13 ` Christopher Yeoh 2011-12-04 14:19 ` Geert Uytterhoeven 0 siblings, 1 reply; 9+ messages in thread From: Christopher Yeoh @ 2011-11-21 0:13 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Andrew Morton, linux-mm, linux-kernel, linux-man, linux-arch, Linux/m68k Hi Geert, On Sun, 20 Nov 2011 11:16:17 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Mon, Jul 18, 2011 at 17:05, Christopher Yeoh <cyeoh@au1.ibm.com> > wrote: > > For arch maintainers there are some simple tests to be able to > > quickly verify that the syscalls are working correctly here: > > I'm wiring up these new syscalls on m68k. > > > http://ozlabs.org/~cyeoh/cma/cma-test-20110718.tgz > > The included README talks about: > > setup_process_readv_simple > setup_process_readv_iovec > setup_process_writev > > while the actual test executables are called: > > setup_process_vm_readv_simple > setup_process_vm_readv_iovec > setup_process_vm_writev Oops. Have fixed this and uploaded a new version http://ozlabs.org/~cyeoh/cma/cma-test-20111121.tgz It also includes another minor change (see below) > On m68k (ARAnyM), the first and third test succeed. The second one > fails, though: > > # Setting up target with num iovecs 10, test buffer size 100000 > Target process is setup > Run the following to test: > ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 > 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 > 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 > > and in the other window: > > # ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 > 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 > 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 > copy_from_process failed: Invalid argument That should say process_vm_readv instead of copy_from_process. The error message is fixed in the just updated test. > error code: 29 > # > > Any suggestions? > Given that the first and third tests succeed, I think the problem is with the iovec parameters. The -EINVAL is most likely coming from rw_copy_check_uvector. Any chance that something bad is happening to lvec/liovcnt or rvec/riovcnt in the wireup? The iovecs are checked in process_vm_rw before the core of the process_vm_readv/writev code is called so should be easy to confirm if this is the problem. The other couple of places where it could possibly come from is that for some reason the flags parameter ends up being non zero or when looking up the task the mm is NULL. But given that the first and second tests succeed I think its unlikely that either of these is the cause. Regards, Chris -- cyeoh@au.ibm.com -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-11-21 0:13 ` Christopher Yeoh @ 2011-12-04 14:19 ` Geert Uytterhoeven 2011-12-04 14:37 ` Thorsten Glaser 0 siblings, 1 reply; 9+ messages in thread From: Geert Uytterhoeven @ 2011-12-04 14:19 UTC (permalink / raw) To: Christopher Yeoh Cc: Andrew Morton, linux-mm, linux-kernel, linux-man, linux-arch, Linux/m68k, Debian m68k Hi Christopher, On Mon, Nov 21, 2011 at 01:13, Christopher Yeoh <cyeoh@au1.ibm.com> wrote: > On Sun, 20 Nov 2011 11:16:17 +0100 > Geert Uytterhoeven <geert@linux-m68k.org> wrote: >> On Mon, Jul 18, 2011 at 17:05, Christopher Yeoh <cyeoh@au1.ibm.com> >> wrote: >> > For arch maintainers there are some simple tests to be able to >> > quickly verify that the syscalls are working correctly here: >> >> I'm wiring up these new syscalls on m68k. >> >> On m68k (ARAnyM), the first and third test succeed. The second one >> fails, though: >> >> # Setting up target with num iovecs 10, test buffer size 100000 >> Target process is setup >> Run the following to test: >> ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 >> 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 >> 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 >> >> and in the other window: >> >> # ./t_process_vm_readv_iovec 1574 10 0x800030b0 89 0x80003110 38302 >> 0x8000c6b8 22423 0x80011e58 18864 0x80016810 583 0x80016a60 8054 >> 0x800189e0 3417 0x80019740 368 0x800198b8 897 0x80019c40 7003 >> copy_from_process failed: Invalid argument > > That should say process_vm_readv instead of copy_from_process. The > error message is fixed in the just updated test. > >> error code: 29 >> # >> >> Any suggestions? > > Given that the first and third tests succeed, I think the problem is > with the iovec parameters. The -EINVAL is most likely coming from > rw_copy_check_uvector. Any chance that something bad is > happening to lvec/liovcnt or rvec/riovcnt in the wireup? > > The iovecs are checked in process_vm_rw before the core of the > process_vm_readv/writev code is called so should be easy to confirm if > this is the problem. > > The other couple of places where it could possibly come from is that > for some reason the flags parameter ends up being non zero or when > looking up the task the mm is NULL. But given that the first and second > tests succeed I think its unlikely that either of these is the cause. It turned out the flags parameter was non-zero, due to syscall() only supporting up to 5 parameters in the glibc I was using for testing. I checked the eglibc sources (2.11.1-0ubuntu7.8), and it's still not fixed there, although I could find a fix for a similar issue in klibc (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=334917). When forcing flags to zero, it works ;-) So sorry for bothering you. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-04 14:19 ` Geert Uytterhoeven @ 2011-12-04 14:37 ` Thorsten Glaser 2011-12-04 16:28 ` Geert Uytterhoeven 2011-12-04 18:34 ` Andreas Schwab 0 siblings, 2 replies; 9+ messages in thread From: Thorsten Glaser @ 2011-12-04 14:37 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Christopher Yeoh, Andrew Morton, Linux/m68k, Debian m68k Geert Uytterhoeven dixit: >It turned out the flags parameter was non-zero, due to syscall() only supporting >up to 5 parameters in the glibc I was using for testing. > >I checked the eglibc sources (2.11.1-0ubuntu7.8), and it's still not >fixed there, >although I could find a fix for a similar issue in klibc >(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=334917). Does this work for you? Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S =================================================================== --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 @@ -24,9 +24,9 @@ .text ENTRY (syscall) move.l 4(%sp), %d0 /* Load syscall number. */ - _DOARGS_5 (24) /* Frob arguments. */ + _DOARGS_6 (28) /* Frob arguments. */ trap &0 /* Do the system call. */ - UNDOARGS_5 /* Unfrob arguments. */ + UNDOARGS_6 /* Unfrob arguments. */ cmp.l &-4095, %d0 /* Check %d0 for error. */ jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ rts /* Return to caller. */ bye, //mirabilos -- “Having a smoking section in a restaurant is like having a peeing section in a swimming pool.” -- Edward Burr ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-04 14:37 ` Thorsten Glaser @ 2011-12-04 16:28 ` Geert Uytterhoeven 2011-12-04 18:34 ` Andreas Schwab 1 sibling, 0 replies; 9+ messages in thread From: Geert Uytterhoeven @ 2011-12-04 16:28 UTC (permalink / raw) To: Thorsten Glaser; +Cc: Christopher Yeoh, Andrew Morton, Linux/m68k, Debian m68k Hi Thorsten, On Sun, Dec 4, 2011 at 15:37, Thorsten Glaser <tg@mirbsd.de> wrote: > Geert Uytterhoeven dixit: >>It turned out the flags parameter was non-zero, due to syscall() only supporting >>up to 5 parameters in the glibc I was using for testing. >> >>I checked the eglibc sources (2.11.1-0ubuntu7.8), and it's still not >>fixed there, >>although I could find a fix for a similar issue in klibc >>(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=334917). > > Does this work for you? Thanks! Your patch looks fine, but I'm not gonna compile eglibc now. > Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S > =================================================================== > --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 > +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 > @@ -24,9 +24,9 @@ > .text > ENTRY (syscall) > move.l 4(%sp), %d0 /* Load syscall number. */ > - _DOARGS_5 (24) /* Frob arguments. */ > + _DOARGS_6 (28) /* Frob arguments. */ > trap &0 /* Do the system call. */ > - UNDOARGS_5 /* Unfrob arguments. */ > + UNDOARGS_6 /* Unfrob arguments. */ > cmp.l &-4095, %d0 /* Check %d0 for error. */ > jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ > rts /* Return to caller. */ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-04 14:37 ` Thorsten Glaser 2011-12-04 16:28 ` Geert Uytterhoeven @ 2011-12-04 18:34 ` Andreas Schwab 2011-12-11 22:11 ` Thorsten Glaser 1 sibling, 1 reply; 9+ messages in thread From: Andreas Schwab @ 2011-12-04 18:34 UTC (permalink / raw) To: Thorsten Glaser Cc: Geert Uytterhoeven, Christopher Yeoh, Andrew Morton, Linux/m68k, Debian m68k Thorsten Glaser <tg@mirbsd.de> writes: > Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S > =================================================================== > --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 > +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 > @@ -24,9 +24,9 @@ > .text > ENTRY (syscall) > move.l 4(%sp), %d0 /* Load syscall number. */ > - _DOARGS_5 (24) /* Frob arguments. */ > + _DOARGS_6 (28) /* Frob arguments. */ > trap &0 /* Do the system call. */ > - UNDOARGS_5 /* Unfrob arguments. */ > + UNDOARGS_6 /* Unfrob arguments. */ > cmp.l &-4095, %d0 /* Check %d0 for error. */ > jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ > rts /* Return to caller. */ Thanks, installed. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-04 18:34 ` Andreas Schwab @ 2011-12-11 22:11 ` Thorsten Glaser 2011-12-13 10:59 ` Aurelien Jarno 0 siblings, 1 reply; 9+ messages in thread From: Thorsten Glaser @ 2011-12-11 22:11 UTC (permalink / raw) To: Andreas Schwab Cc: Geert Uytterhoeven, Christopher Yeoh, Andrew Morton, Linux/m68k, Debian m68k, GNU Libc Maintainers Andreas Schwab dixit: >Thorsten Glaser <tg@mirbsd.de> writes: > >> Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S >> =================================================================== >> --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 >> +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 >> @@ -24,9 +24,9 @@ >> .text >> ENTRY (syscall) >> move.l 4(%sp), %d0 /* Load syscall number. */ >> - _DOARGS_5 (24) /* Frob arguments. */ >> + _DOARGS_6 (28) /* Frob arguments. */ >> trap &0 /* Do the system call. */ >> - UNDOARGS_5 /* Unfrob arguments. */ >> + UNDOARGS_6 /* Unfrob arguments. */ >> cmp.l &-4095, %d0 /* Check %d0 for error. */ >> jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ >> rts /* Return to caller. */ > >Thanks, installed. (Where?) So, should $someone submit that to eglibc-ports and Debisn src:eglibc? Did it indeed do the trick? bye, //mirabilos -- “Having a smoking section in a restaurant is like having a peeing section in a swimming pool.” -- Edward Burr ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-11 22:11 ` Thorsten Glaser @ 2011-12-13 10:59 ` Aurelien Jarno 2011-12-17 3:18 ` Thorsten Glaser 0 siblings, 1 reply; 9+ messages in thread From: Aurelien Jarno @ 2011-12-13 10:59 UTC (permalink / raw) To: Thorsten Glaser Cc: Andreas Schwab, Geert Uytterhoeven, Christopher Yeoh, Andrew Morton, Linux/m68k, Debian m68k, GNU Libc Maintainers On Sun, Dec 11, 2011 at 10:11:03PM +0000, Thorsten Glaser wrote: > Andreas Schwab dixit: > > >Thorsten Glaser <tg@mirbsd.de> writes: > > > >> Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S > >> =================================================================== > >> --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 > >> +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 > >> @@ -24,9 +24,9 @@ > >> .text > >> ENTRY (syscall) > >> move.l 4(%sp), %d0 /* Load syscall number. */ > >> - _DOARGS_5 (24) /* Frob arguments. */ > >> + _DOARGS_6 (28) /* Frob arguments. */ > >> trap &0 /* Do the system call. */ > >> - UNDOARGS_5 /* Unfrob arguments. */ > >> + UNDOARGS_6 /* Unfrob arguments. */ > >> cmp.l &-4095, %d0 /* Check %d0 for error. */ > >> jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ > >> rts /* Return to caller. */ > > > >Thanks, installed. > > (Where?) So, should $someone submit that to eglibc-ports and > Debisn src:eglibc? Did it indeed do the trick? > This patch should be reported to libc-ports@sourceware.org. If it also needs to be applied to the Debian package quickly, please open a bug report in the Debian BTS. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Cross Memory Attach v3 2011-12-13 10:59 ` Aurelien Jarno @ 2011-12-17 3:18 ` Thorsten Glaser 0 siblings, 0 replies; 9+ messages in thread From: Thorsten Glaser @ 2011-12-17 3:18 UTC (permalink / raw) To: libc-ports; +Cc: Linux/m68k, Debian m68k, GNU Libc Maintainers I’ve tested the below patch locally in the meantime, and it does not break anything. Aurelien Jarno dixit: >On Sun, Dec 11, 2011 at 10:11:03PM +0000, Thorsten Glaser wrote: >> Andreas Schwab dixit: >> >> >Thorsten Glaser <tg@mirbsd.de> writes: >> > >> >> Index: eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S >> >> =================================================================== >> >> --- eglibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:16.000000000 +0000 >> >> +++ eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/syscall.S 2011-12-04 14:36:26.000000000 +0000 >> >> @@ -24,9 +24,9 @@ >> >> .text >> >> ENTRY (syscall) >> >> move.l 4(%sp), %d0 /* Load syscall number. */ >> >> - _DOARGS_5 (24) /* Frob arguments. */ >> >> + _DOARGS_6 (28) /* Frob arguments. */ >> >> trap &0 /* Do the system call. */ >> >> - UNDOARGS_5 /* Unfrob arguments. */ >> >> + UNDOARGS_6 /* Unfrob arguments. */ >> >> cmp.l &-4095, %d0 /* Check %d0 for error. */ >> >> jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */ >> >> rts /* Return to caller. */ >> > >> >Thanks, installed. >> >> (Where?) So, should $someone submit that to eglibc-ports and >> Debisn src:eglibc? Did it indeed do the trick? > >This patch should be reported to libc-ports@sourceware.org. If it also Reporting hereby. >needs to be applied to the Debian package quickly, please open a bug >report in the Debian BTS. @kernel people, is this needed / useful? Do we want/need this? (I wonder why it's not using _DOARGS_6 already, as that looks as if it were designed for it.) bye, //mirabilos -- 22:20⎜<asarch> The crazy that persists in his craziness becomes a master 22:21⎜<asarch> And the distance between the craziness and geniality is only measured by the success 18:35⎜<asarch> "Psychotics are consistently inconsistent. The essence of sanity is to be inconsistently inconsistent ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-17 3:18 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110719003537.16b189ae@lilo>
2011-11-20 10:16 ` Cross Memory Attach v3 Geert Uytterhoeven
2011-11-21 0:13 ` Christopher Yeoh
2011-12-04 14:19 ` Geert Uytterhoeven
2011-12-04 14:37 ` Thorsten Glaser
2011-12-04 16:28 ` Geert Uytterhoeven
2011-12-04 18:34 ` Andreas Schwab
2011-12-11 22:11 ` Thorsten Glaser
2011-12-13 10:59 ` Aurelien Jarno
2011-12-17 3:18 ` Thorsten Glaser
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox