On [Sun, 11.02.2007 18:35], Paul Brook wrote:
> On Sunday 11 February 2007 18:26, Thiemo Seufer wrote:
> > CVSROOT:    /sources/qemu
> > Module name:        qemu
> > Changes by: Thiemo Seufer <ths>     07/02/11 18:26:54
> >
> > Modified files:
> >     linux-user     : syscall.c
> >
> > Log message:
> >     Linux userland emulation of syslog, from Debian patchset.
> >
> > CVSWeb URLs:
> > http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&;
> >r1=1.83&r2=1.84
> 
> >       ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3));
> 
> This is wrong. It should use lock_user_string or similar. Please fix or 
> revert.
Patch in the attachment.

Imported only two syscall from Debian patchset. What about others(mount,
mount, uselib, mincore, clock_gettime)? Should I split it in
several patches?
Index: linux-user/syscall.c
===================================================================
RCS file: /sources/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.85
diff -u -r1.85 syscall.c
--- linux-user/syscall.c        11 Feb 2007 18:36:44 -0000      1.85
+++ linux-user/syscall.c        11 Feb 2007 19:23:28 -0000
@@ -2952,7 +2952,9 @@
 #endif
 
     case TARGET_NR_syslog:
-        ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3));
+        p = lock_user_string(arg2);
+        ret = get_errno(sys_syslog((int)arg1, p, (int)arg3));
+        unlock_user(p, arg2, 0);
         break;
 
     case TARGET_NR_setitimer:

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to