[PATCH] typo in 2.2.1[67] + 486 emulation

From: Willy Tarreau (willy@novworld.Novecom.Fr)
Date: Wed Jul 19 2000 - 02:12:21 EST


Hi all,

   well, since I can't reach Alan by email (his filter seems to be efficient !)
here's a fix for a little typo in the oops dumping code in 2.2.16 and 2.2.17pre
(basically, when EIP is wrong, "bad ESP value" is printed).

BTW, I have written some code to emulate these 3 i486 instructions not
available on i386 :
  - bswap (used in htonl)
  - cmpxchg (used in pthread_mutex_lock)
  - xadd (no encountered yet)

This is useful if you have an old 386 (embedded system or little router) and
you often have problems when developping for it from a more recent system,
because you link with a libc compiled for a 486.

This *WILL NOT* allow you to run a 486 kernel on a 386, but will just avoid
"illegal instruction" for user-land processes. I've personnaly been using it
for one month now on my internet router-firewall with no problems at all
(pdnsd and iptables work fine), and I've run lots of test patterns to validate
its behaviour (including security checks). But since this is a really nasty
trick and may still contain bugs, I strongly encourage you to recompile and
relink your apps for 386 when using them in production.

The patches are against 2.2.17pre6 and 2.4.0-test2, but should work on nearly
all versions since this portion of code has not really changed along releases.

Regards,

Willy







-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:12 EST