From: Philipp R. <pr...@pa...> - 2000-11-23 18:51:14
|
On Thu, Nov 23, 2000 at 03:36:33PM +0000, David Mckay wrote: > On Nov 23, 2:57pm, pr...@pa... wrote: > > Subject: Re: [linuxsh-dev] Re: bad alignment fixup > > > > On Thu, Nov 23, 2000 at 02:28:57PM +0000, David Howells wrote: > > > > > > > and adds unaligned userspace access emulation, which I still think is a > > > > terribly bad idea; > > > > > > insmod can do this a lot. > > > > fix insmod. it seems to work on other architectures that don't support > > unaligned accesses. > > What version of insmod are you using? I've used it a fair bit here, and have > seen no problems with it. We are using 2.3.16 plus a few superH specific > patches. Is the problem being caused by loading a specific module? > > I'm also not keen on having the kernel fix up unaligned accesses for me, as > if I have a bug in my program I want to know about it. Much of the software > I work with has to run under different OSes and processors, some of which > silently truncate the bottom bits when you do unaligned accesses! This is > not a fun bug to try to track down. Many CPUs don't architecturally support unaligned accesses. We're currently lucky in that Linux doesn't run on those CPUs, or no users use weird network protocols on them. > The fact that the i386 handles unaligned accesses for you is the exception > rather than the rule. It's also not strictly speaking true; 486 and newer CPUs can generate unaligned traps if asked to, and KNI requires aligned operands. The rule for Linux definitely seems to be not to emulate unaligned user accesses. The exception is alpha, which seems to have some architectural support for unaligned accesses. SuperH doesn't. |