All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: linux-ppp@vger.kernel.org
Subject: Re: [pptp-devel] Re: [2/2]: ppp_mppe inclusion
Date: Mon, 30 Aug 2004 22:42:05 +0000	[thread overview]
Message-ID: <20040830224205.GA31278@lists.us.dell.com> (raw)
In-Reply-To: <20040720204723.GC27576@lists.us.dell.com>

On Fri, Jul 30, 2004 at 11:33:09PM +0400, Oleg Makarenko wrote:
> Great work, Matt. Thank you for your patches. Any chances to see them 
> integrated in 2.6 any time soon?

That'll depend on how many people are testing it I suppose. :-)  I've
just now gotten back to this, sorry for the delay.
 
> The only problem is that they do not work for me and never did :) I get 
> kernel panic with your patches and wonder how others don't get the same 
> result?
> 
> Please find attached somewhat (I hope) improved patches that finaly do 
> work for me

Thanks much.  I've merged these into my bk tree at
http://mdomsch.bkbits.net/linux-2.6-mppe

along with this simple patch which makes use of setup_sg() rather than
hand-coding it four times.

ChangeSet@1.1803.13.4, 2004-08-30 15:29:05-04:00, Matt_Domsch@dell.com
  ppp_mppe: use setup_sg() in get_hew_key_from_sha(), bump version


 ppp_mppe.c |   27 +++++----------------------
 1 files changed, 5 insertions(+), 22 deletions(-)


diff -Nru a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c
--- a/drivers/net/ppp_mppe.c	2004-08-30 17:37:29 -04:00
+++ b/drivers/net/ppp_mppe.c	2004-08-30 17:37:29 -04:00
@@ -61,7 +61,7 @@
 MODULE_DESCRIPTION("Point-to-Point Protocol Microsoft Point-to-Point Encryption support");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_ALIAS("ppp-compress-" __stringify(CI_MPPE));
-MODULE_VERSION("1.0.0");
+MODULE_VERSION("1.0.1");
 
 static void
 setup_sg(struct scatterlist *sg, const void *address, unsigned int length)
@@ -122,28 +122,11 @@
 static void get_new_key_from_sha(struct ppp_mppe_state * state, unsigned char *InterimKey)
 {
 	struct scatterlist sg[4];
-	char *p;
-	
 
-	p = state->master_key;
-	sg[0].page = virt_to_page(p);
-	sg[0].offset = offset_in_page(p);
-	sg[0].length = state->keylen;
-
-	p = state->SHApad1;
-	sg[1].page = virt_to_page(p);
-	sg[1].offset = offset_in_page(p);
-	sg[1].length = sizeof(state->SHApad1);
-
-	p = state->session_key;
-	sg[2].page = virt_to_page(p);
-	sg[2].offset = offset_in_page(p);
-	sg[2].length = state->keylen;
-
-	p = state->SHApad2;
-	sg[3].page = virt_to_page(p);
-	sg[3].offset = offset_in_page(p);
-	sg[3].length = sizeof(state->SHApad2);
+	setup_sg(&sg[0], state->master_key, state->keylen);
+	setup_sg(&sg[1], state->SHApad1, sizeof(state->SHApad1));
+	setup_sg(&sg[2], state->session_key, state->keylen);
+	setup_sg(&sg[3], state->SHApad2, sizeof(state->SHApad2));
 
 	crypto_digest_digest (state->sha1, sg, 4, state->sha1_digest);
 


> 2.  For some reason you can not use non GFP_KERNEL memory and scatter 
> lists or at least mix them in crypto_digest().  That is why sha_pad is 
> now in struct state {}.

OK for now I suppose.  I'll ask the crypto folks what's up with that.
I obviously prefer to have that stuff in a .rodata section allocated
once, rather than "waste" 80 bytes per connection.

Thanks for being patient with me and for your continued testing.

-- 
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

  parent reply	other threads:[~2004-08-30 22:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-20 20:47 [2/2]: ppp_mppe inclusion Matt Domsch
2004-07-30 19:33 ` Oleg Makarenko
2004-07-31 18:34 ` Matt Domsch
2004-08-30 22:42 ` Matt Domsch [this message]
2004-08-30 22:48 ` [pptp-devel] " Matt Domsch
2004-08-31 22:23 ` Oleg Makarenko
2004-09-05 18:23 ` Oleg Makarenko
2004-10-12 17:14 ` Matt Domsch

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=20040830224205.GA31278@lists.us.dell.com \
    --to=matt_domsch@dell.com \
    --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.