Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761993AbXIKQ5k (ORCPT ); Tue, 11 Sep 2007 12:57:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754372AbXIKQ5c (ORCPT ); Tue, 11 Sep 2007 12:57:32 -0400 Received: from fwstl1-1.wul.qc.ec.gc.ca ([205.211.132.24]:24351 "EHLO ecqcmtlbh.quebec.int.ec.gc.ca" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754247AbXIKQ5b (ORCPT ); Tue, 11 Sep 2007 12:57:31 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C7F494.C729ECEF" Subject: RE: Patch for Apani Nortel VPN Client to build against kernel 2.6.22 help/review Date: Tue, 11 Sep 2007 12:57:03 -0400 Message-ID: In-Reply-To: <20070822161828.GA16063@totient.ellipticsemi.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: Patch for Apani Nortel VPN Client to build against kernel 2.6.22 help/review Thread-Index: Acfk2Bm0iRhzcIXnRSy0UtCRnZi3JgPvIwIw References: <20070822161828.GA16063@totient.ellipticsemi.com> From: "Fortier,Vincent [Montreal]" To: "Nick Bowler" Cc: , =?iso-8859-1?Q?G=E9lineau=2CSamuel_=5BMontreal=5D?= X-OriginalArrivalTime: 11 Sep 2007 16:57:04.0157 (UTC) FILETIME=[C76E24D0:01C7F494] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 39085 Lines: 568 This is a multi-part message in MIME format. ------_=_NextPart_001_01C7F494.C729ECEF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > -----Message d'origine----- > De : linux-kernel-owner@vger.kernel.org=20 > [mailto:linux-kernel-owner@vger.kernel.org] De la part de Nick Bowler >=20 > I haven't read too much into the patch, but some quick=20 > comments. Most applies > throughout: >=20 > > +#if (LINUX_VERSION_CODE >=3D 0x020616) > KERNEL_VERSION(2,6,22) is much more readable than 0x020616. >=20 > > + return (struct iphdr*) skb->network_header; > Should be return ip_hdr(skb); >=20 > > + skb->network_header =3D skb->data; > Should be skb_reset_network_header(skb); >=20 > > + iph =3D skb->network_header.iph; > Probably meant skb->nh.iph. >=20 > > + if ( iph->protocol =3D=3D 17 ) /* if UDP, */ > (snip) > > + if ( iph->protocol =3D=3D 6 ) /* if TCP, */ > Could use IPPROTO_UDP and IPPROTO_TCP instead of 17 and 6,=20 > respectively. >=20 > Instead of littering the code with #if blah #else blah, you=20 > could also simply provide implementations for the 2.6.22=20 > functions #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22). >=20 (Forwarding info by Samuel to lkml...) Thanks for your comments, here is a new patch (bowler.patch) reflecting = the changes you suggested. Unfortunately, and unsurprisingly for such = cosmetic changes, the code still hangs. I have added a great many debugging statements in order to pinpoint the = problem (backtrace.patch); surprisingly, my custom backtraces didn't = show up in the console, but a kernel call trace did (call_trace). Here is the contents of the offending function. The {enter,exit}_func() = calls are my debugging statements, and I have verified that only the = else branch was compiled. As you can see, there are only function calls = here, no memory manipulation nor dereferencing at all. What could = possibly fail in this function? Shouldn`t the backtrace include one of = the subcalls? void nl_spin_lock_irqsave(spinlock_t *lockptr, DWORD *flagptr) { enter_func(__LINE__); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) assert(lockptr); assert(flagptr); spin_lock_irqsave((spinlock_t *)lockptr, (*flagptr)); #else spin_lock_irq((spinlock_t *)lockptr); #endif exit_func(__LINE__); } - Samuel G=E9lineau ------_=_NextPart_001_01C7F494.C729ECEF Content-Type: application/octet-stream; name="call_trace" Content-Transfer-Encoding: base64 Content-Description: call_trace Content-Disposition: attachment; filename="call_trace" Q2FsbCBUcmFjZToKIFs8ZjhlMy4uLi4+XSBubF9zcGluX2xvY2tfaXJxc2F2ZSsweDE0LzB4MWYg W21pc2hpbV0KIFs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B4MjgKIFs8 YzAxNy4uLi4+XSBjaGVja19wYWRfYnl0ZXMrMHgxNy8weDgyCiBbPGMwMTAuLi4uPl0gbXdhaXRf aWRsZV93aXRoX2hpbnRzKzB4MzQvMHgzOAogWzxjMDEwLi4uLj5dIG13YWl0X2lkbGUrMHgwLzB4 MTMKIFs8YzAxMC4uLi4+XSBjcHVfaWRsZSsweGFkLzB4Y2UKIFs8YzAzYy4uLi4+XSBzdGFydF9r ZXJuZWwrMHgyMzkvMHgyM2QKIFs8YzAzYy4uLi4+XSB1bmtub3duX2Jvb3RvcHRpb24rMHgwLzB4 MTgxCg== ------_=_NextPart_001_01C7F494.C729ECEF Content-Type: application/octet-stream; name="backtrace.patch" Content-Transfer-Encoding: base64 Content-Description: backtrace.patch Content-Disposition: attachment; filename="backtrace.patch" LS0tIGN2Y19saW51eC1yaC1nY2MzLTMuNS9zcmMvbGludXhfd3JhcHBlci5jCTIwMDctMDktMTAg MTU6Mzc6MDEuMDAwMDAwMDAwICswMDAwCisrKyBjdmNfbGludXgtcmgtZ2NjMy0zLjUvc3JjL2xp bnV4X3dyYXBwZXIuYwkyMDA3LTA5LTEwIDE1OjM2OjE1LjAwMDAwMDAwMCArMDAwMApAQCAtOTks MTcgKzk5LDQ1IEBACiAgIHN0cnVjdCBydGFibGU7CiAjZW5kaWYKIAoraW50IGJhY2t0cmFjZV9m bGFnOworaW50IGJhY2t0cmFjZV9kZWJ1Z1sxMDI0XTsKK3ZvaWQgZW50ZXJfZnVuYyhpbnQgbGlu ZSkgeworCWludCBpOworCWZvcihpPTA7IGk8MTAyNCAmJiBiYWNrdHJhY2VfZGVidWdbaV07ICsr aSk7CisJaWYgKGkgPT0gMTAyNCkgcHJpbnRrKCJvdmVyZmxvd1xuIik7CisJYmFja3RyYWNlX2Rl YnVnW2ldID0gbGluZTsKKwlpZiAoYmFja3RyYWNlX2ZsYWcpIHtwcmludGsoInsgIik7IGJhY2t0 cmFjZSgpO30KK30KK3ZvaWQgZXhpdF9md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Z1bmMoX19MSU5FX18pOworICByID0gKHN0cmxlbihuZXRfZGV2aWNl X2VudHJ5KGRldiktPm5hbWUpKTsKK2V4aXRfZnVuYygpOworICByZXR1cm4gcjsKIH0KIHVuc2ln bmVkICpkZXZfbXR1X3B0ciAobmV0X2RldmljZV9wICpkZXYpCiB7Ci0gIHJldHVybiAmKG5ldF9k ZXZpY2VfZW50cnkoZGV2KS0+bXR1KTsKKyAgdW5zaWduZWQgKnI7CitlbnRlcl9mdW5jKF9fTElO RV9fKTsKKyAgciA9ICYobmV0X2RldmljZV9lbnRyeShkZXYpLT5tdHUpOworZXhpdF9mdW5jKCk7 CisgIHJldHVybiByOwogfQogdW5zaWduZWQgZGV2X210dSAobmV0X2RldmljZV9wICpkZXYpCiB7 Ci0gIHJldHVybiAobmV0X2RldmljZV9lbnRyeShkZXYpLT5tdHUpOworICB1bnNpZ25lZCByOwor ZW50ZXJfZnVuYyhfX0xJTkVfXyk7CisgIHIgPSAobmV0X2RldmljZV9lbnRyeShkZXYpLT5tdHUp OworZXhpdF9mdW5jKCk7CisgIHJldHVybiByOwogfQogaW50IGRldl9pZmluZGV4IChuZXRfZGV2 aWNlX3AgKmRldikKIHsKLSAgcmV0dXJuIChuZXRfZGV2aWNlX2VudHJ5KGRldiktPmlmaW5kZXgp OworICBpbnQgcjsKK2VudGVyX2Z1bmMoX19MSU5FX18pOworICByID0gKG5ldF9kZXZpY2VfZW50 cnkoZGV2KS0+aWZpbmRleCk7CitleGl0X2Z1bmMoKTsKKyAgcmV0dXJuIHI7CiB9CiB2b2lkICpk ZXZfaXBfcHRyIChuZXRfZGV2aWNlX3AgKmRldikKIHsKLSAgcmV0dXJuIChuZXRfZGV2aWNlX2Vu dHJ5KGRldiktPmlwX3B0cik7CisgIHZvaWQqIHI7CitlbnRlcl9mdW5jKF9fTElORV9fKTsKKyAg ciA9IChuZXRfZGV2aWNlX2VudHJ5KGRldiktPmlwX3B0cik7CitleGl0X2Z1bmMoKTsKKyAgcmV0 dX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aXQgbmxzaGltX2V4aXQodm9pZCkKIHsKK2VudGVyX2Z1bmMoX19MSU5FX18pOwogICBt aXNoaW1fdW5pbml0KCk7CitleGl0X2Z1bmMoKTsKIH0KIAogbW9kdWxlX2luaXQobmxzaGltX2lu aXQpOwpAQCAtNzc2LDggKzk4MiwxMCBAQCB2b2lkIGRvX2NoZWNrc3VtX29mZmxvYWQoIHN0cnVj dCBza19idWZmCiAgIHN0cnVjdCBza19idWZmICpmcmFnX3B0cjsKICAgc3RydWN0IGlwaGRyICpp cGg7CiAKKyAgZW50ZXJfZnVuYyhfX0xJTkVfXyk7CiAjaWYgKExJTlVYX1ZFUlNJT05fQ09ERSA8 IEtFUk5FTF9WRVJTSU9OKDIsNSwwKSkKICAgaXBfc2VuZF9jaGVjayAoc2tiLT5uaC5pcGgpOwor ICBleGl0X2Z1bmMoKTsKICAgcmV0dXJuOwogI2Vsc2UKICAgaWYgKCAhc2tiLT5pcF9zdW1tZWQg KSAgICAgICAgICAgICAgICAgICAgICAgIC8qIGlmIG9mZmxvYWQgbm90IGVuYWJsZWQsICovCkBA IC04MTEsOSArMTAxOSwxMSBAQCB2b2lkIGRvX2NoZWNrc3VtX29mZmxvYWQoIHN0cnVjdCBza19i dWZmCiAgIHNrYi0+aXBfc3VtbWVkID0gMDsgICAgIC8qIGRvbid0IGNzdW0gaW4gaGFyZHdhcmUg Ki8KIAogZG9uZV9leGl0OgorICBleGl0X2Z1bmMoKTsKICAgcmV0dXJuOwogI2VuZGlmCi0KKyAg CisgIGV4aXRfZnVuYygpOwogfQogI2lmIDAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK ------_=_NextPart_001_01C7F494.C729ECEF Content-Type: application/octet-stream; name="bowler.patch" Content-Transfer-Encoding: base64 Content-Description: bowler.patch Content-Disposition: attachment; filename="bowler.patch" LS0tIGN2Y19saW51eC1yaC1nY2MzLTMuNS9zcmMvbGludXh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Pm5oLmlwaDsKKyAgICBzdHJ1Y3Qg aXBoZHIgKmlwaCA9IGlwX2hkcihza2IpOwogCiAgICAgaWYgKHNrYi0+ZHN0ID09IE5VTEwpCiAg ICAgICAgIHsKQEAgLTQ2NywzMiArNDg2LDMyIEBAIGludCBubF91bnJlZ2lzdGVyX25ldGRldmlj ZV9ub3RpZmllcihzdHIKICAgICByZXR1cm4gdW5yZWdpc3Rlcl9uZXRkZXZpY2Vfbm90aWZpZXIg KG5iKTsKIH0KIAotY2hhciAqZGV2X25hbWUgKG5ldF9kZXZpY2VfdCAqZGV2KQorY2hhciAqZGV2 X25hbWUgKG5ldF9kZXZpY2VfcCAqZGV2KQogewotICByZXR1cm4gKGRldi0+bmFtZSk7CisgIHJl dHVybiAobmV0X2RldmljZV9lbnRyeShkZXYpLT5uYW1lKTsKIH0KIAotaW50IGRldl9uYW1lX2xl biAobmV0X2RldmljZV90ICpkZXYpCitpbnQgZGV2X25hbWVfbGVuIChuZXRfZGV2aWNlX3AgKmRl dikKIHsKLSAgcmV0dXJuIChzdHJsZW4oZGV2LT5uYW1lKSk7CisgIHJldHVybiAoc3RybGVuKG5l dF9kZXZpY2VfZW50cnkoZGV2KS0+bmFtZSkpOwogfQotdW5zaWduZWQgKmRldl9tdHVfcHRyIChu ZXRfZGV2aWNlX3QgKmRldikKK3Vuc2lnbmVkICpkZXZfbXR1X3B0ciAobmV0X2RldmljZV9wICpk ZXYpCiB7Ci0gIHJldHVybiAoJmRldi0+bXR1KTsKKyAgcmV0dXJuICYobmV0X2RldmljZV9lbnRy eShkZXYpLT5tdHUpOwogfQotdW5zaWduZWQgZGV2X210dSAobmV0X2RldmljZV90ICpkZXYpCit1 bnNpZ25lZCBkZXZfbXR1IChuZXRfZGV2aWNlX3AgKmRldikKIHsKLSAgcmV0dXJuIChkZXYtPm10 dSk7CisgIHJldHVybiAobmV0X2RldmljZV9lbnRyeShkZXYpLT5tdHUpOwogfQotaW50IGRldl9p ZmluZGV4IChuZXRfZGV2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ZHIsIDAsIFJUX1RPUyhpcGgtPnRvcyksIDApOwotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAKKyAgICAKICAgICBpZiAocnZhbCA8IDApCiAgICAgICB7CiAgICAgICBwcmludGsoIk5MX1NF TkRfU0tCOiBpcF9yb3V0ZV9vdXRwdXQgZmFpbGVkLiIpOwpAQCAtNjMzLDcgKzY2OCw3IEBAIHZv aWQgbmxfc2VuZF9za2IgKHN0cnVjdCBza19idWZmICpza2IsIG4KICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgCiAgICAgaWYgKHNrYi0+ZHN0KQogICAgICAgewotI2lmICgoTElOVVhfVkVSU0lPTl9D T0RFIDwgMHgwMjA2MDcpIHx8IChMSU5VWF9WRVJTSU9OX0NPREUgPiAweDAyMDYwOSkpCisjaWYg KChMSU5VWF9WRVJTSU9OX0NPREUgPCBLRVJORUxfVkVSU0lPTigyLDYsNykpIHx8IChMSU5VWF9W RVJTSU9OX0NPREUgPiBLRVJORUxfVkVSU0lPTigyLDYsOSkpKQogICAgICAgc2tiLT5kc3QtPm91 dHB1dChza2IpOwogI2Vsc2UKICAgICAgIHNrYi0+ZHN0LT5vdXRwdXQoJnNrYik7CkBAIC02NjQs NyArNjk5LDcgQEAgdm9pZCB1cGRhdGVfaW5uZXJfcm91dGUgKHN0cnVjdCBza19idWZmIAogICBk c3RfcmVsZWFzZShza2ItPmRzdCk7CiAgIHNrYi0+ZHN0ID0gTlVMTDsKIH0KLSNpZiAoTElOVVhf VkVSU0lPTl9DT0RFIDwgMHgwMjA1MDApCisjaWYgKExJTlVYX1ZFUlNJT05fQ09ERSA8IEtFUk5F TF9WRVJTSU9OKDIsNSwwKSkKIAogZXh0ZXJuIGNoYXIga2VybmVsX3ZlcnNpb24gW107CiAKQEAg LTc0M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fZGF0YV9sZW4oIGZyYWdfcHRyICksIGNzdW0gKSApOwogICAg IH0KLSAgaWYgKCBza2ItPm5oLmlwaC0+cHJvdG9jb2wgPT0gMTcgKSAgICAgICAgICAgIC8qIGlm IFVEUCwgKi8KKyAgaWYgKCBpcGgtPnByb3RvY29sID09IElQUFJPVE9fVURQICkKICAgICB7CiAg ICAgKChzdHJ1Y3QgdWRwaGRyKiloX3B0ciktPmNoZWNrID0gY2hlY2s7CiAgICAgfQotICBpZiAo IHNrYi0+bmguaXBoLT5wcm90b2NvbCA9PSA2ICkgICAgICAgICAgICAgLyogaWYgVENQLCAqLwor ICBpZiAoIGlwaC0+cHJvdG9jb2wgPT0gSVBQUk9UT19UQ1AgKQogICAgIHsKICAgICAoKHN0cnVj dCB0Y3BoZHIqKWhfcHRyKS0+Y2hlY2sgPSBjaGVjazsKICAgICB9Cg== ------_=_NextPart_001_01C7F494.C729ECEF-- - 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/