From: "Steven J. Hill" <sjhill@realitydiluted.com>
To: "Steven J. Hill" <sjhill@realitydiluted.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Improper handling of unaligned user address access?
Date: Mon, 03 Mar 2003 18:14:20 -0600 [thread overview]
Message-ID: <3E63EFDC.6090605@realitydiluted.com> (raw)
In-Reply-To: <3E63B17C.8000403@realitydiluted.com>
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
The first thing I tried to fix this issue was to use the
'memcpy.S' file from 2.4.7 and that actually worked, but
that was a step backwards. It was much simpler to just
add a 'nop' after the offending branch instruction. It
fixes all of my problems with 'copy_from_user'. I have
already checked these into both the 2.4 and 2.5 trees.
I do have one further question. In 'arch/mips/mm/fault.c'
when we need to do a fixup:
fixup = search_exception_table(regs->cp0_epc);
Why do we not check to see if the EPC is a branch insn
before looking in the exception table?
-Steve
[-- Attachment #2: memcpy-2.4.diff --]
[-- Type: text/plain, Size: 483 bytes --]
Index: memcpy.S
===================================================================
RCS file: /home/cvs/linux/arch/mips/lib/memcpy.S,v
retrieving revision 1.6.2.4
diff -u -r1.6.2.4 memcpy.S
--- memcpy.S 19 Sep 2002 14:01:24 -0000 1.6.2.4
+++ memcpy.S 4 Mar 2003 00:09:52 -0000
@@ -357,6 +357,7 @@
beqz len, done
and rem, len, NBYTES-1 # rem = len % NBYTES
beq rem, len, copy_bytes
+ nop
1:
EXC( LDFIRST t0, FIRST(0)(src), l_exc)
EXC( LDREST t0, REST(0)(src), l_exc_copy)
[-- Attachment #3: memcpy-2.5.diff --]
[-- Type: text/plain, Size: 474 bytes --]
Index: memcpy.S
===================================================================
RCS file: /home/cvs/linux/arch/mips/lib/memcpy.S,v
retrieving revision 1.11
diff -u -r1.11 memcpy.S
--- memcpy.S 19 Sep 2002 14:01:28 -0000 1.11
+++ memcpy.S 4 Mar 2003 00:10:58 -0000
@@ -357,6 +357,7 @@
beqz len, done
and rem, len, NBYTES-1 # rem = len % NBYTES
beq rem, len, copy_bytes
+ nop
1:
EXC( LDFIRST t0, FIRST(0)(src), l_exc)
EXC( LDREST t0, REST(0)(src), l_exc_copy)
next prev parent reply other threads:[~2003-03-04 0:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-03 19:48 Improper handling of unaligned user address access? Steven J. Hill
2003-03-03 21:22 ` Geert Uytterhoeven
2003-03-03 21:38 ` Mike Uhler
2003-03-03 21:38 ` Mike Uhler
2003-03-03 22:16 ` Steven J. Hill
2003-03-04 0:14 ` Steven J. Hill [this message]
2003-03-04 1:41 ` Jun Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E63EFDC.6090605@realitydiluted.com \
--to=sjhill@realitydiluted.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.