Hi Ralf & others,
I found & fixed kernel bug in unaligned.c which was affecting the iptables code
in little mips32 endian.
The patch is against 2.4.17 on oss.sgi.com & should hopefully apply to the latest
kernel.
The fixes code for I did mips 64 is untested, I had no way to test them unfortunately.
An example of the bug is the bug following sequence of mips instructions
beqz v0,<destaddr>
lw v0,(t3)
say reg t3 points to an unaligned address
In the emulation the v0 register was being loaded & modified before
the computation of the destination address ( which depended on v0 )
this was incorrect so I had to save the updating of the v0 register
until the computation of the destination address was done.
=====
D.J. Barrow Linux kernel developer
eMail: dj_barrow@ariasoft.ie
Home: +353-22-47196.
Work: +353-91-758353
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--0-1071516413-1033143961=:72664
Content-Type: application/x-unknown; name="unaligned.diff"
Content-Transfer-Encoding: base64
Content-Description: unaligned.diff
Content-Disposition: attachment; filename="unaligned.diff"
LS0tIGtlcm5lbC5vcmlnL2FyY2gvbWlwcy9rZXJuZWwvdW5hbGlnbmVkLmMJ
VHVlIEphbiAxNSAwNDowODowOSAyMDAyCisrKyBrZXJuZWwvYXJjaC9taXBz
L2tlcm5lbC91bmFsaWduZWQuYwlGcmkgU2VwIDI3IDE2OjU4OjIyIDIwMDIK
QEAgLTgsNiArOCwxMSBAQAogICogQ29weXJpZ2h0IChDKSAxOTk2LCAxOTk4
IGJ5IFJhbGYgQmFlY2hsZQogICogQ29weXJpZ2h0IChDKSAxOTk5IFNpbGlj
b24gR3JhcGhpY3MsIEluYy4KICAqCisgKiBGaXhlczogCisgKiAgICAgICAg
ICAyMDAyIERlbmlzIEpvc2VwaCBCYXJyb3cgPGRqX2JhcnJvd0Bhcmlhc29m
dC5pZT4KKyAqICAgICAgICAgIEZpeCB0byBkb19hZGUgdG8gY29tcHV0ZSBk
ZXN0aW5hdGlvbiBhZGRyZXNzZXMgY29ycmVjdGx5IAorICogICAgICAgICAg
YWZ0ZXIgZml4aW5nIGRlbGF5IHNsb3QgaW5zdHJ1Y3R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j
YXRpb24gZm9yIGRlbGF5IHNsb3QgaW5zdHJ1Y3Rpb25zIAorICAgICAgICAg
ICAgICAgICAqIHdoaWNoIGNhbiBtaXNjb21wdXRlIGRlc3RpbmF0aW9uIGFk
ZHJlc3NlcworICAgICAgICAgICAgICAgICAqIGUuZy4gY29uc2lkZXIgdGhl
IHNlcXVlbmNlIAorICAgICAgICAgICAgICAgICAqIGJlcXogICAgICAgIHYw
LDxkZXN0YWRkcj4KKyAgICAgICAgICAgICAgICAgKiBsdyAgICAgICAgICB2
MCwodDMpIAorICAgICAgICAgICAgICAgICAqLyAKKwkJaWYocmVncHRyKQor
CQkJKnJlZ3B0cj1uZXd2YWw7CisJfQogI2lmZGVmIENPTkZJR19QUk9DX0ZT
CiAJdW5hbGlnbmVkX2luc3RydWN0aW9ucysrOwogI2VuZGlmCgoKCgoKCgoK
Cg==
--0-1071516413-1033143961=:72664--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/