bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#45605: marked as done (gnumach: update of __generic_memcpy_tofs)


From: Debian Bug Tracking System
Subject: Bug#45605: marked as done (gnumach: update of __generic_memcpy_tofs)
Date: Thu, 07 Mar 2002 17:33:17 -0600

Your message dated Fri, 8 Mar 2002 00:22:46 +0100
with message-id <20020307232246.GD1425@212.23.136.22>
and subject line closing bugs
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 20 Sep 1999 17:39:51 +0000
Received: (qmail 16706 invoked from network); 20 Sep 1999 17:39:51 -0000
Received: from sunu450.rz.ruhr-uni-bochum.de (134.147.222.33)
  by master.debian.org with SMTP; 20 Sep 1999 17:39:51 -0000
Received: (qmail 21859 invoked from network); 20 Sep 1999 17:39:38 -0000
Received: from dialppp-5-171.rz.ruhr-uni-bochum.de (HELO localhost) 
(mail@134.147.5.171)
  by mailhost.rz.ruhr-uni-bochum.de with SMTP; 20 Sep 1999 17:39:38 -0000
Received: from marcus by localhost with local (Exim 2.11 #1 (Debian))
        id 11T6zf-00006M-00; Mon, 20 Sep 1999 19:12:47 +0200
From: Marcus.Brinkmann@ruhr-uni-bochum.de
Subject: gnumach: update of __generic_memcpy_tofs
To: submit@bugs.debian.org
X-Mailer: bug 3.2.2
Message-Id: <E11T6zf-00006M-00@localhost>
Date: Mon, 20 Sep 1999 19:12:47 +0200
Organization: Marcus Brinkmann's Home

Package: gnumach
Version: N/A
Severity: normal

Hello,

the __generic_memcpy_tofs in linux/dev/include/asm-i386/segment.h has a bug:
If size is 1, something bad happens and GNU Mach panics.

Instead fixing this bug in the current code (which I can't because the last
time I programmed in assembler was on a 6510), I suggest updating to the
equivalent code from Linux 2.2.12 (it is from linux/include/asm-i386/uaccess.h
and has the name __copy_user, but does exactly the same job).

BTW, the reason that the code is formatted this way is because it is a macro
in linux 2.2.10. I didn't want to break anything, so I did not touch it
further. Feel free to clean it up.

With this fix, and the char driver patch, random works! (and not only
urandom, as reported).

Thanks,
Marcus

--- gnumach/linux/dev/include/asm-i386/segment.h        Mon Apr 26 07:47:29 1999
+++ /mnt/marcus/gnu/hurd/patch/gnumach.cvs/linux/dev/include/asm-i386/segment.h 
Mon Sep 20 18:58:43 1999
@@ -94,28 +94,24 @@
 
 static inline void __generic_memcpy_tofs(void * to, const void * from, 
unsigned long n)
 {
-    __asm__ volatile
-       ("      cld
-               push %%es
-               push %%fs
-               cmpl $3,%0
-               pop %%es
-               jbe 1f
-               movl %%edi,%%ecx
-               negl %%ecx
-               andl $3,%%ecx
-               subl %%ecx,%0
-               rep; movsb
-               movl %0,%%ecx
-               shrl $2,%%ecx
-               rep; movsl
-               andl $3,%0
-       1:      movl %0,%%ecx
-               rep; movsb
-               pop %%es"
-       :"=abd" (n)
-       :"0" (n),"D" ((long) to),"S" ((long) from)
-       :"cx","di","si");
+    int __d0, __d1;
+    __asm__ __volatile__(
+                "0:     rep; movsl\n"
+                "       movl %3,%0\n"
+                "1:     rep; movsb\n"
+                "2:\n"
+                ".section .fixup,\"ax\"\n"
+                "3:     lea 0(%3,%0,4),%0\n"
+                "       jmp 2b\n"
+                ".previous\n"
+                ".section __ex_table,\"a\"\n"
+                "       .align 4\n"
+                "       .long 0b,3b\n"
+                "       .long 1b,2b\n"
+                ".previous"
+                : "=&c"(n), "=&D" (__d0), "=&S" (__d1)
+                : "r"(n & 3), "0"(n / 4), "1"(to), "2"(from)
+                : "memory");
 }
 
 static inline void __constant_memcpy_tofs(void * to, const void * from, 
unsigned long n)


-- System Information
Debian Release: potato
Kernel Version: Linux ulysses 2.2.12 #1 Mit Sep 15 03:28:57 CEST 1999 i586 
unknown

---------------------------------------
Received: (at 45605-done) by bugs.debian.org; 7 Mar 2002 23:22:50 +0000
>From Marcus.Brinkmann@ruhr-uni-bochum.de Thu Mar 07 17:22:50 2002
Return-path: <Marcus.Brinkmann@ruhr-uni-bochum.de>
Received: from porta.u64.de [194.77.88.106] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 16j7Dm-0008Ls-00; Thu, 07 Mar 2002 17:22:50 -0600
Received: from (localhost) [212.23.136.22] 
        by porta.u64.de with asmtp (Exim 3.12 #1 (Debian))
        id 16j7M0-0001qL-00; Fri, 08 Mar 2002 00:31:20 +0100
Received: from marcus by localhost with local (Exim 3.34 #1 (Debian))
        id 16j7Di-0001wa-00; Fri, 08 Mar 2002 00:22:46 +0100
Date: Fri, 8 Mar 2002 00:22:46 +0100
From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
To: 42156-done@bugs.debian.org, 45605-done@bugs.debian.org
Subject: closing bugs
Message-ID: <20020307232246.GD1425@212.23.136.22>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.27i
Sender: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
Delivered-To: 45605-done@bugs.debian.org

cleaning up obsolete items

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]