From: mole <mole@quadra.ru>
To: linux-ppp@vger.kernel.org
Subject: Re: 2.4.2 on AMD64 Linux: assumes 4-byte long - FIXED!
Date: Fri, 11 Jun 2004 08:12:59 +0000 [thread overview]
Message-ID: <40C9698B.4050909@quadra.ru> (raw)
In-Reply-To: <20040606021936.14c69b54@localhost>
Guy Rouillier wrote:
>Sorry for the top post, it's late and I'm tired and I'm replying to my
>own message anyway. I fixed this problem, and I'm now able to use
>pptp/ppp/mppe to connect to a Microsoft server at work.
>
me too :)
>The fix
>requires changes to the sha1 code both in ppp-2.4.2 and in the kernel.
>
>
Yes, and I have provided the patch to the list for both changes.
Have you tried my patch (as you wrote were going to do) and found it
doesn't work?
>To whom should I send the fixes?
>
Please CC it to me. I would like to know what else but two-liner you
think is needed.
>This is my first kernel fix so I don't
>really know how to proceed. Hmm, I guess half the fixes go to the ppp
>maintainers and the other half go to the kernel people.
>
>On Sun, 6 Jun 2004 02:19:36 -0400
>Guy Rouillier <guy-rouillier@speakeasy.net> wrote:
>
>
>
>>I'm new here. I hope this is the right place to post this question;
>>please point me to the correct place if I've gotten it wrong. I've
>>been trying to get 2.4.2 working on Mandrake 10.0 for AMD64, using
>>kernel 2.6.3. I've downloaded this version, along with a
>>corresponding 1.4.0 version of pptp, from the pptp-client site. I'm
>>getting a "Fatal signal 11", which I've traced to the SHA1_Final
>>function on sha1.c during CHAP Challenge phase of connection setup.
>>
>>Looking in sha1.h and sha1.c source code, I see data structures and
>>functions with longs in them, which sets off alarms. I think there
>>was an assumption when this code was written that a long is 4 bytes
>>long. On an AMD64 64-bit OS, a long is 8 bytes. What leads me to
>>think this is #define in sha1.c:
>>
>>#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 -
>>(bits))))
>>
>>Clearly, on a 64-bit long, this won't produce a correct rotate-left.
>>I've googled on sha1.c, and I've found several instances where the
>>code has switched to using u_int32 instead of long, including one by
>>the same author (Steve Reid) here:
>>
>>http://cvsweb.stop1984.com/index.cgi/entropy/src/sha1.c?rev=1.12&content-type=text/x-cvsweb-markup
>>
>>As a test, I tried simply changing all the longs to ints in sha1.h and
>>sha1.c. Unfortunately, I went from getting segfaults to getting
>>kernel panics. I'm suspecting this is not a valid thing to do, since
>>the corresponding files that the kernel was built from still have long
>>declarations. I'm guessing these need to match, correct? Or is pppd
>>standalone, and can I change sha1.c/h without worrying about the
>>kernel(which I compiled myself from Mandrake sources)?
>>
>>I also tried simply changing the definition of rol above to use 64
>>instead of 32. Predictably, that didn't work.
>>
>>I'm not an expert in networking. I'd appreciate any and all
>>suggestions anyone can provide to get this working. Thanks.
>>
>>--
>>Guy Rouillier
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-ppp"
>>in the body of a message to majordomo@vger.kernel.org
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>>
>
>
>
>
prev parent reply other threads:[~2004-06-11 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 6:19 2.4.2 on AMD64 Linux: assumes 4-byte long Guy Rouillier
2004-06-09 5:48 ` 2.4.2 on AMD64 Linux: assumes 4-byte long - FIXED! Guy Rouillier
2004-06-10 4:13 ` Guy Rouillier
2004-06-10 4:43 ` James Cameron
2004-06-10 5:52 ` Guy Rouillier
2004-06-11 8:12 ` mole [this message]
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=40C9698B.4050909@quadra.ru \
--to=mole@quadra.ru \
--cc=linux-ppp@vger.kernel.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.