2002-03-20 13:34:51

by Manon Goo

[permalink] [raw]
Subject: Hooks for random device entropy generation missing in cpqarray.c

Hi,

All hooks for the random ganeration (add_blkdev_randomness() ) are ignored
in the cpqarray / ida driver.
Is a patch available ?
or an other updated driver ?
any hints where to put add_blkdev_randomness() in your driver ?

is add_interrupt_randomness() called on an i386 SMP IO-APCI system ?


Thanks
Manon

PS: Folks on linux-kernel please CC to [email protected] I am not on the list



Attachments:
(No filename) (396.00 B)
(No filename) (229.00 B)
Download all attachments

2002-03-20 14:26:05

by White, Charles

[permalink] [raw]
Subject: RE: Hooks for random device entropy generation missing in cpqarray.c

Yes.. I was reported that it some how got dropped from our 2.4 version of the driver..
DON'T add add_interrupt_randomness, just add "| SA_SAMPLE_RANDOM" to the call to request_irq.

Patch to follow.


-----Original Message-----
From: Manon Goo [mailto:[email protected]]
Sent: Wednesday, March 20, 2002 7:34 AM
To: Arrays
Cc: [email protected]; [email protected]; Markus Schr?der
Subject: Hooks for random device entropy generation missing in
cpqarray.c


Hi,

All hooks for the random ganeration (add_blkdev_randomness() ) are ignored
in the cpqarray / ida driver.
Is a patch available ?
or an other updated driver ?
any hints where to put add_blkdev_randomness() in your driver ?

is add_interrupt_randomness() called on an i386 SMP IO-APCI system ?


Thanks
Manon

PS: Folks on linux-kernel please CC to [email protected] I am not on the list


2002-03-20 15:17:03

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

On Wed, 20 Mar 2002, Manon Goo wrote:

> All hooks for the random ganeration (add_blkdev_randomness() ) are ignored
> in the cpqarray / ida driver.
> Is a patch available ?
> or an other updated driver ?
> any hints where to put add_blkdev_randomness() in your driver ?

Its all handled by drivers/scsi/scsi_lib.c, its a generic service so is
done for all drivers.

> is add_interrupt_randomness() called on an i386 SMP IO-APCI system ?

Yes, check out arch/i386/kernel/irq.c:handle_IRQ_event, irq.c is the
generic code which sits on top of the real interrupt controller driver, be
it an IOAPIC or regular PIC.

Cheers,
Zwane


2002-03-20 15:27:43

by Alan

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

> Its all handled by drivers/scsi/scsi_lib.c, its a generic service so is
> done for all drivers.

Thats only for scsi ones. cpqarray appears as a block device

2002-03-20 15:40:33

by Manon Goo

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

No its is not there are certain bloc devices like cpqarray an mylex DAC960
(which handles this correctly)
which do noether use the SCSI or the IDE driver.

Manon

--On Mittwoch, 20. M?rz 2002 16:38 Uhr +0200 Zwane Mwaikambo
<[email protected]> wrote:

> On Wed, 20 Mar 2002, Manon Goo wrote:
>
>> All hooks for the random ganeration (add_blkdev_randomness() ) are
>> ignored in the cpqarray / ida driver.
>> Is a patch available ?
>> or an other updated driver ?
>> any hints where to put add_blkdev_randomness() in your driver ?
>
> Its all handled by drivers/scsi/scsi_lib.c, its a generic service so is
> done for all drivers.
>
>> is add_interrupt_randomness() called on an i386 SMP IO-APCI system ?
>
> Yes, check out arch/i386/kernel/irq.c:handle_IRQ_event, irq.c is the
> generic code which sits on top of the real interrupt controller driver,
> be it an IOAPIC or regular PIC.
>
> Cheers,
> Zwane
>
>


Attachments:
(No filename) (927.00 B)
(No filename) (229.00 B)
Download all attachments

2002-03-20 15:52:04

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

On Wed, 20 Mar 2002, Manon Goo wrote:

> No its is not there are certain bloc devices like cpqarray an mylex DAC960
> (which handles this correctly)
> which do noether use the SCSI or the IDE driver.

Sorry, my mistake.

Zwane


2002-03-20 16:07:44

by Manon Goo

[permalink] [raw]
Subject: RE: Hooks for random device entropy generation missing in cpqarray.c

I have a quick and drity patch for 1 contorlller:

I patched as floows:



--- ./drivers/block/cpqarray.c.old Wed Mar 20 14:53:16 2002
+++ drivers/block/cpqarray.c Wed Mar 20 15:31:32 2002
@@ -1009,6 +1009,7 @@

startio:
start_io(h);
+ add_blkdev_randomness(MAJOR_NR);
}

/*


other Driver (handling more the 1 drive) find out the
Major driver number ...


./drivers/scsi/scsi_lib.c: add_blkdev_randomness(MAJOR(req->rq_dev));
./drivers/ide/ide.c: add_blkdev_randomness(MAJOR(rq->rq_dev));
./drivers/block/DAC960.c: add_blkdev_randomness(DAC960_MAJOR +
Controller->ControllerNumber);

How would I do this for the cpqarray ?

--On Mittwoch, 20. M?rz 2002 8:25 Uhr -0600 "White, Charles"
<[email protected]> wrote:

> Yes.. I was reported that it some how got dropped from our 2.4 version of
> the driver.. DON'T add add_interrupt_randomness, just add "|
> SA_SAMPLE_RANDOM" to the call to request_irq.
>
> Patch to follow.
>
>
> -----Original Message-----
> From: Manon Goo [mailto:[email protected]]
> Sent: Wednesday, March 20, 2002 7:34 AM
> To: Arrays
> Cc: [email protected]; [email protected]; Markus Schr?der
> Subject: Hooks for random device entropy generation missing in
> cpqarray.c
>
>
> Hi,
>
> All hooks for the random ganeration (add_blkdev_randomness() ) are
> ignored in the cpqarray / ida driver.
> Is a patch available ?
> or an other updated driver ?
> any hints where to put add_blkdev_randomness() in your driver ?
>
> is add_interrupt_randomness() called on an i386 SMP IO-APCI system ?
>
>
> Thanks
> Manon
>
> PS: Folks on linux-kernel please CC to [email protected] I am not on the list
>
>


Attachments:
(No filename) (1.65 kB)
(No filename) (229.00 B)
Download all attachments

2002-03-20 16:17:24

by Dave Jones

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

On Wed, Mar 20, 2002 at 05:06:54PM +0100, Manon Goo wrote:
> I have a quick and drity patch for 1 contorlller:
> ...
>
> --On Mittwoch, 20. M?rz 2002 8:25 Uhr -0600 "White, Charles"
> <[email protected]> wrote:
>
> >Yes.. I was reported that it some how got dropped from our 2.4 version of
> >the driver.. DON'T add add_interrupt_randomness, just add "|
> >SA_SAMPLE_RANDOM" to the call to request_irq.
> How would I do this for the cpqarray ?

Exactly like Charles explained how to. See also...
http://www.codemonkey.org.uk/patches/merged/2.5.4/dj2/random-cpqirq.diff
if it still isnt' clear.
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2002-03-20 16:30:34

by Manon Goo

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

Hmmm in cpqarray.c this appers to be called in cpqarray_init() is this only
called when the driver initalizes or at every access ?


--On Mittwoch, 20. M?rz 2002 17:16 Uhr +0100 Dave Jones <[email protected]>
wrote:

> On Wed, Mar 20, 2002 at 05:06:54PM +0100, Manon Goo wrote:
> > I have a quick and drity patch for 1 contorlller:
> > ...
> >
> > --On Mittwoch, 20. M?rz 2002 8:25 Uhr -0600 "White, Charles"
> > <[email protected]> wrote:
> >
> > >Yes.. I was reported that it some how got dropped from our 2.4
> version of > >the driver.. DON'T add add_interrupt_randomness, just add
> "| > >SA_SAMPLE_RANDOM" to the call to request_irq.
> > How would I do this for the cpqarray ?
>
> Exactly like Charles explained how to. See also...
> http://www.codemonkey.org.uk/patches/merged/2.5.4/dj2/random-cpqirq.diff
> if it still isnt' clear.
> --
>| Dave Jones. http://www.codemonkey.org.uk
>| SuSE Labs


Attachments:
(No filename) (928.00 B)
(No filename) (229.00 B)
Download all attachments

2002-03-20 21:15:31

by Cameron, Steve

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

On Wed, 20 Mar 2002, Manon Goo wrote:

> All hooks for the random ganeration (add_blkdev_randomness() )
> are ignored=20 in the cpqarray / ida driver

Try OR-ing in SA_SAMPLE_RANDOM in the call to request_irq().

You don't say what kernel you're using, I think
this is already in the latest 2.2, 2.4, 2.5 kernels,
if I remember right... I see it in my copy of 2.2.21-pre3
anyway.

-- steve

2002-03-20 21:25:02

by Manon Goo

[permalink] [raw]
Subject: Re: Hooks for random device entropy generation missing in cpqarray.c

excuse me I am using 2.4.18

Manon

--On Mittwoch, 20. M?rz 2002 15:07 Uhr -0600 Stephen Cameron
<[email protected]> wrote:

> On Wed, 20 Mar 2002, Manon Goo wrote:
>
>> All hooks for the random ganeration (add_blkdev_randomness() )
>> are ignored=20 in the cpqarray / ida driver
>
> Try OR-ing in SA_SAMPLE_RANDOM in the call to request_irq().
>
> You don't say what kernel you're using, I think
> this is already in the latest 2.2, 2.4, 2.5 kernels,
> if I remember right... I see it in my copy of 2.2.21-pre3
> anyway.
>
> -- steve
>


Attachments:
(No filename) (547.00 B)
(No filename) (229.00 B)
Download all attachments