Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3795985ybb; Tue, 31 Mar 2020 12:08:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKdC27aZR9F/6bPt0rBqMKr14D6UZvWPuEmtALuFWNljOMmORUFPnQxXtQ4mrJVetqi1uOP X-Received: by 2002:aca:cc08:: with SMTP id c8mr290559oig.42.1585681724424; Tue, 31 Mar 2020 12:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585681724; cv=none; d=google.com; s=arc-20160816; b=cQNGOEaPf5wznMKKWCudhrc74lagJG57XCUH/ywiSsLOEF8sa1GcUzWH9RFkbWohWa /wdrdqJllWr2kT2QC6W/mmm6dJNNG1euK+CJIuMnfz6vJWePa5IV9XO5jMcMnqou2L7O TFhNj4+/hT6n7sg+7IrK5Q+w+GwcZoYVFnG+9JpbM4bbs3XBjwMbEiM4TWaJorkAsuYt fN1N/AIWUnvhtuYkR2hORMSmKTAmBWL44YFYZlJnNXHOg1SaXlYEBRSaU/BcsTfLyVQ4 0PFoGBZ71y9XUFoclPZW99epI5YiMuVlbHsiL/D12lEs0p5gyR9PCVEwnSjxHmyWCga8 GpqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=y49/4mi78oscIaUYGv9AVS0nadJCHnj3mj2HOKheKoI=; b=n7Gxn7pib2vNsQks4OlZ16Cocf+uH+Yv7yCUgj0pCPaPSphxQ62YhoJhBQx4G/7Vw0 vpZSlSf7/6XXvuiSSzwJgMOO+58jv3fklk8zuRhbeLfB//DeurK8MCtlovPabRzRXvY4 /c+gfCF4HZr+CGvUULZNDGD+Es1j4l90xRjPATdGNHRtc4cqpIxDVqQZRR2ZksDWcsC2 oTwh8fhtOtS+sqg4wgguhFcN1n9oqodIr6njh2YRjeXTuUoucWUT4xLVnoRF9RtirFwg PDw69zp9RpvnIB2YBTDAbOxdPfOpm+ee26kqWbZscxl55YR4Wf2q4uLGth6gpDH8HHL4 xGmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v108si1865370otb.136.2020.03.31.12.08.30; Tue, 31 Mar 2020 12:08:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728240AbgCaTHm (ORCPT + 99 others); Tue, 31 Mar 2020 15:07:42 -0400 Received: from mx.sdf.org ([205.166.94.20]:55263 "EHLO mx.sdf.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbgCaTHm (ORCPT ); Tue, 31 Mar 2020 15:07:42 -0400 Received: from sdf.org (IDENT:lkml@sdf.lonestar.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 02VJ4nq9017121 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 31 Mar 2020 19:04:49 GMT Received: (from lkml@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 02VJ4nMt026853; Tue, 31 Mar 2020 19:04:49 GMT Date: Tue, 31 Mar 2020 19:04:48 +0000 From: George Spelvin To: Benjamin Block , Steffen Maier Cc: linux-kernel@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, lkml@sdf.org Subject: Re: [RFC PATCH v1 27/50] drivers/s390/scsi/zcsp_fc.c: Use prandom_u32_max() for backoff Message-ID: <20200331190448.GB9912@SDF.ORG> References: <202003281643.02SGhHN7015213@sdf.org> <20200331161321.GB17507@t480-pf1aa2c2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331161321.GB17507@t480-pf1aa2c2> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2020 at 06:13:21PM +0200, Benjamin Block wrote: > it would be nice, if you could address the mails to the > driver-maintainers (`scripts/get_maintainer.pl drivers/s390/scsi/zfcp_fc.c` > will tell you that this is me and Steffen); I'd certainly have noticed > it earlier then :-). How the $%$# did I mess that up? I know choosing recipients for this series was mostly manual, becase it didn't fit the usual pattern of the entire series going to everyone affectrd by any part of it. And then there waqs a whole lot of shuffling things into a logical order and grouping. But I checked MAINTAINERS originally, I really did. :-( > On Fri, Nov 29, 2019 at 03:39:41PM -0500, George Spelvin wrote: >> diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c >> index b018b61bd168e..d24cafe02708f 100644 >> --- a/drivers/s390/scsi/zfcp_fc.c >> +++ b/drivers/s390/scsi/zfcp_fc.c >> @@ -48,7 +48,7 @@ unsigned int zfcp_fc_port_scan_backoff(void) >> { >> if (!port_scan_backoff) >> return 0; >> - return get_random_int() % port_scan_backoff; >> + return prandom_u32_max(port_scan_backoff); > > I think the change is fine. You are right, we don't need a crypto nonce > here. > > I think I'd let the zero-check stand as is, because the internal > behaviour of prandom_u32_max() is, as you say, undocumented. This is not > a performance critical code-path for us anyway. I agree. Sorry, that comment in the commit message was a bit of a "not to self" that I didn't clean up. Feel free to rm it when queueing if you like. > Steffen, do you have any objections? Otherwise I can queue this up - > minus the somewhat mangled subject - for when we send something next time. Thank you, I'll put it in my "accepted" pile.