netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
@ 2014-07-31 20:08 Daniel Borkmann
  2014-07-31 20:11 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Borkmann @ 2014-07-31 20:08 UTC (permalink / raw)
  To: davem; +Cc: netdev, James Bottomley, James Smart

In prandom we have already reseeding mechanisms that trigger
periodically from a much better entropy source than just
feeding in jiffies through lpfc_mbx_cmpl_fcf_scan_read_fcf_rec()
[what a function name 8-)]. Therefore, just remove this.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: James Smart <james.smart@emulex.com>
---
 This can also go via James, how you prefer it.

 drivers/scsi/lpfc/lpfc_hbadisc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 2a17e31..5072bb2 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -2146,7 +2146,6 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
 	uint16_t fcf_index, next_fcf_index;
 	struct lpfc_fcf_rec *fcf_rec = NULL;
 	uint16_t vlan_id;
-	uint32_t seed;
 	bool select_new_fcf;
 	int rc;
 
@@ -2383,9 +2382,6 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
 		phba->fcf.fcf_flag |= FCF_AVAILABLE;
 		/* Setup initial running random FCF selection count */
 		phba->fcf.eligible_fcf_cnt = 1;
-		/* Seeding the random number generator for random selection */
-		seed = (uint32_t)(0xFFFFFFFF & jiffies);
-		prandom_seed(seed);
 	}
 	spin_unlock_irq(&phba->hbalock);
 	goto read_next_fcf;
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-07-31 20:08 [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver Daniel Borkmann
@ 2014-07-31 20:11 ` David Miller
  2014-08-01  4:12 ` James Bottomley
  2014-08-11 17:07 ` James Smart
  2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2014-07-31 20:11 UTC (permalink / raw)
  To: dborkman; +Cc: netdev, JBottomley, james.smart

From: Daniel Borkmann <dborkman@redhat.com>
Date: Thu, 31 Jul 2014 22:08:37 +0200

> In prandom we have already reseeding mechanisms that trigger
> periodically from a much better entropy source than just
> feeding in jiffies through lpfc_mbx_cmpl_fcf_scan_read_fcf_rec()
> [what a function name 8-)]. Therefore, just remove this.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: James Bottomley <JBottomley@Parallels.com>
> Cc: James Smart <james.smart@emulex.com>
> ---
>  This can also go via James, how you prefer it.

James can pick this up, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-07-31 20:08 [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver Daniel Borkmann
  2014-07-31 20:11 ` David Miller
@ 2014-08-01  4:12 ` James Bottomley
  2014-08-01 11:23   ` Daniel Borkmann
  2014-08-11 17:07 ` James Smart
  2 siblings, 1 reply; 7+ messages in thread
From: James Bottomley @ 2014-08-01  4:12 UTC (permalink / raw)
  To: dborkman; +Cc: davem, netdev, james.smart

On Thu, 2014-07-31 at 22:08 +0200, Daniel Borkmann wrote:
> In prandom we have already reseeding mechanisms that trigger
> periodically from a much better entropy source than just
> feeding in jiffies through lpfc_mbx_cmpl_fcf_scan_read_fcf_rec()
> [what a function name 8-)]. Therefore, just remove this.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: James Bottomley <JBottomley@Parallels.com>
> Cc: James Smart <james.smart@emulex.com>
> ---
>  This can also go via James, how you prefer it.

Could you send to linux-scsi@vger.kernel.org; Christoph Hellwig is
gathering patches for SCSI via that list.

Thanks,

James


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-08-01  4:12 ` James Bottomley
@ 2014-08-01 11:23   ` Daniel Borkmann
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2014-08-01 11:23 UTC (permalink / raw)
  To: James Bottomley; +Cc: davem, netdev, james.smart

On 08/01/2014 06:12 AM, James Bottomley wrote:
...
> Could you send to linux-scsi@vger.kernel.org; Christoph Hellwig is
> gathering patches for SCSI via that list.

Sure, done, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-07-31 20:08 [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver Daniel Borkmann
  2014-07-31 20:11 ` David Miller
  2014-08-01  4:12 ` James Bottomley
@ 2014-08-11 17:07 ` James Smart
  2014-08-11 18:18   ` Christoph Hellwig
  2 siblings, 1 reply; 7+ messages in thread
From: James Smart @ 2014-08-11 17:07 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: davem, netdev, James Bottomley, Smart, James, linux-scsi

Acked-by:  James Smart  <james.smart@emulex.com>

-- james  s



On 7/31/2014 4:08 PM, Daniel Borkmann wrote:
> In prandom we have already reseeding mechanisms that trigger
> periodically from a much better entropy source than just
> feeding in jiffies through lpfc_mbx_cmpl_fcf_scan_read_fcf_rec()
> [what a function name 8-)]. Therefore, just remove this.
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> Cc: James Bottomley <JBottomley@Parallels.com>
> Cc: James Smart <james.smart@emulex.com>
> ---
>   This can also go via James, how you prefer it.
>
>   drivers/scsi/lpfc/lpfc_hbadisc.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
> index 2a17e31..5072bb2 100644
> --- a/drivers/scsi/lpfc/lpfc_hbadisc.c
> +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
> @@ -2146,7 +2146,6 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
>   	uint16_t fcf_index, next_fcf_index;
>   	struct lpfc_fcf_rec *fcf_rec = NULL;
>   	uint16_t vlan_id;
> -	uint32_t seed;
>   	bool select_new_fcf;
>   	int rc;
>   
> @@ -2383,9 +2382,6 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
>   		phba->fcf.fcf_flag |= FCF_AVAILABLE;
>   		/* Setup initial running random FCF selection count */
>   		phba->fcf.eligible_fcf_cnt = 1;
> -		/* Seeding the random number generator for random selection */
> -		seed = (uint32_t)(0xFFFFFFFF & jiffies);
> -		prandom_seed(seed);
>   	}
>   	spin_unlock_irq(&phba->hbalock);
>   	goto read_next_fcf;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-08-11 17:07 ` James Smart
@ 2014-08-11 18:18   ` Christoph Hellwig
  2014-08-11 18:38     ` James Smart
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2014-08-11 18:18 UTC (permalink / raw)
  To: James Smart; +Cc: Daniel Borkmann, davem, netdev, James Bottomley, linux-scsi

On Mon, Aug 11, 2014 at 01:07:15PM -0400, James Smart wrote:
> Acked-by:  James Smart  <james.smart@emulex.com>

Can you jsut queue this up (and the pci fix as well) together with
anything else you have pending for 3.18?

I'd really like to move towards a model where maintainers of driver
collect everything for their area to spread work a bit better.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver
  2014-08-11 18:18   ` Christoph Hellwig
@ 2014-08-11 18:38     ` James Smart
  0 siblings, 0 replies; 7+ messages in thread
From: James Smart @ 2014-08-11 18:38 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Daniel Borkmann, davem, netdev, James Bottomley, linux-scsi

yep. I'll do so.

-- james s


On 8/11/2014 2:18 PM, Christoph Hellwig wrote:
> On Mon, Aug 11, 2014 at 01:07:15PM -0400, James Smart wrote:
>> Acked-by:  James Smart  <james.smart@emulex.com>
> Can you jsut queue this up (and the pci fix as well) together with
> anything else you have pending for 3.18?
>
> I'd really like to move towards a model where maintainers of driver
> collect everything for their area to spread work a bit better.
>
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-11 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-31 20:08 [PATCH net-next 2/2] random32: do not feed jiffies as seed from lpfc driver Daniel Borkmann
2014-07-31 20:11 ` David Miller
2014-08-01  4:12 ` James Bottomley
2014-08-01 11:23   ` Daniel Borkmann
2014-08-11 17:07 ` James Smart
2014-08-11 18:18   ` Christoph Hellwig
2014-08-11 18:38     ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).