Re: [RFC] module: signature infrastructure

2012-09-06 Thread Rusty Russell
Lucas De Marchi writes: > Sorry to come up with this suggestion only now (and after you have > already talked to me at LPC). Only after seeing this implementation I > thought about the implications of having the module signed in this > format. ... > I'm worried about performance here. Module loadi

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Rusty Russell
Mimi Zohar writes: > On Wed, 2012-09-05 at 09:59 +0930, Rusty Russell wrote: >> "Kasatkin, Dmitry" writes: >> > Hi, >> > >> > Please read bellow... >> > >> > On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell >> > wrote: >> >> OK, I took a look at the module.c parts of David and Dmitry's patchsets,

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Lucas De Marchi
On Tue, Sep 4, 2012 at 9:19 PM, Rusty Russell wrote: > Lucas De Marchi writes: >> Hi Rusty, >> >> On Tue, Sep 4, 2012 at 2:55 AM, Rusty Russell wrote: >>> @@ -2399,7 +2437,50 @@ static inline void kmemleak_load_module(const struct >>> module *mod, >>> } >>> #endif >>> >>> -/* Sets info->hdr a

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Mimi Zohar
On Wed, 2012-09-05 at 09:59 +0930, Rusty Russell wrote: > "Kasatkin, Dmitry" writes: > > Hi, > > > > Please read bellow... > > > > On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell wrote: > >> OK, I took a look at the module.c parts of David and Dmitry's patchsets, > >> and didn't really like either,

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Rusty Russell
Lucas De Marchi writes: > Hi Rusty, > > On Tue, Sep 4, 2012 at 2:55 AM, Rusty Russell wrote: >> @@ -2399,7 +2437,50 @@ static inline void kmemleak_load_module(const struct >> module *mod, >> } >> #endif >> >> -/* Sets info->hdr and info->len. */ >> +#ifdef CONFIG_MODULE_SIG >> +static int modu

Re: [RFC] module: signature infrastructure

2012-09-05 Thread Rusty Russell
"Kasatkin, Dmitry" writes: > Hi, > > Please read bellow... > > On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell wrote: >> OK, I took a look at the module.c parts of David and Dmitry's patchsets, >> and didn't really like either, but I stole parts of David's to make >> this. >> >> So, here's the modu

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Kasatkin, Dmitry
On Wed, Sep 5, 2012 at 1:51 AM, David Howells wrote: > Lucas De Marchi wrote: > >> Or let the magic string as the last thing in the module and store the >> signature length, too. In this case no scanning is needed > > Indeed. This is the better way. > > The main problem is rendering the length f

Re: [RFC] module: signature infrastructure

2012-09-04 Thread David Howells
Lucas De Marchi wrote: > Or let the magic string as the last thing in the module and store the > signature length, too. In this case no scanning is needed Indeed. This is the better way. The main problem is rendering the length from a shell script. It's trivial to do as ASCII (there's a print

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Kasatkin, Dmitry
On Tue, Sep 4, 2012 at 5:25 PM, Lucas De Marchi wrote: > Hi Rusty, > > On Tue, Sep 4, 2012 at 2:55 AM, Rusty Russell wrote: >> OK, I took a look at the module.c parts of David and Dmitry's patchsets, >> and didn't really like either, but I stole parts of David's to make >> this. >> >> So, here's

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Lucas De Marchi
Hi Rusty, On Tue, Sep 4, 2012 at 2:55 AM, Rusty Russell wrote: > OK, I took a look at the module.c parts of David and Dmitry's patchsets, > and didn't really like either, but I stole parts of David's to make > this. > > So, here's the module.c part of module signing. I hope you two got time > to

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Mimi Zohar
On Tue, 2012-09-04 at 15:21 +0300, Kasatkin, Dmitry wrote: > On Tue, Sep 4, 2012 at 3:07 PM, Kasatkin, Dmitry > wrote: > > Hi, > > > > Please read bellow... > > > > On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell wrote: > >> OK, I took a look at the module.c parts of David and Dmitry's patchsets, >

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Kasatkin, Dmitry
On Tue, Sep 4, 2012 at 3:07 PM, Kasatkin, Dmitry wrote: > Hi, > > Please read bellow... > > On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell wrote: >> OK, I took a look at the module.c parts of David and Dmitry's patchsets, >> and didn't really like either, but I stole parts of David's to make >> th

Re: [RFC] module: signature infrastructure

2012-09-04 Thread Kasatkin, Dmitry
Hi, Please read bellow... On Tue, Sep 4, 2012 at 8:55 AM, Rusty Russell wrote: > OK, I took a look at the module.c parts of David and Dmitry's patchsets, > and didn't really like either, but I stole parts of David's to make > this. > > So, here's the module.c part of module signing. I hope you

[RFC] module: signature infrastructure

2012-09-03 Thread Rusty Russell
OK, I took a look at the module.c parts of David and Dmitry's patchsets, and didn't really like either, but I stole parts of David's to make this. So, here's the module.c part of module signing. I hope you two got time to discuss the signature format details? Mimi suggested a scheme where the pr