From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4367CC4332F for ; Thu, 17 Nov 2022 15:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=86za3Jszn2TbwWChcC+uS3lID+j2C9JM39pvMU/YUvg=; b=lirWpcVVcp/Gg2 MiKSx9pBh0lFHaM19U1zggzCCcOr4vd+O2C8QD02twU9k23P34pq1VtqlqNJb8BrScz0GqdSxGzOQ jCp1OC+uMOxREoYDOR9aeI8So8UGE74kJSVgvuLVPyhpW4kpnWGxMVq1yRID6ZDfAl0MDk8Gh3fWV Is1T1gYcipSTvCHpGcU8c+red72EX7Nw0rRpViy3nEmLkz0Q4PPoaHPlkWtM1VXitNfUg6hKA/b/4 ucDDQ6yBbSeCnLH1vz2COvilkFRpnjWRTO5NY6zO3f7ytMVeJRmgkpa76YAVyyitV1BLSIFeQ3ljT iXYFipGNPzfXpKmCiFFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovh3R-00FU8e-5S; Thu, 17 Nov 2022 15:43:54 +0000 Received: from outgoing-auth-1.mit.edu ([18.9.28.11] helo=outgoing.mit.edu) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovh3K-00FU1x-Uk for linux-arm-kernel@lists.infradead.org; Thu, 17 Nov 2022 15:43:49 +0000 Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 2AHFgbpU025691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Nov 2022 10:42:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1668699767; bh=Z8eRjDyW5LkCGXRIWQ/ehJoBTxfA+rKV6G90HV/lnfI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=a5RGA55J01HygsEqMJNP2VrZPtI8ZaGUHt2dY2LY5wF8DMtynBL3gxe4ssBSltxUc tGBtVlIBAOfcvHXP8OxNBxX/rSKyMd0+qgQqEihqLCmIIT5R91T0BV2UToxLFXN9NK qLPI7qFXLd4XspU67nh5HMMeBw4NAJ1ReJokdr95mAlk7ege100zyHPP5eUMyPQkdJ 2J/DoKBr5ulEfGsbUWpt2b/Jh4Fgk8Q/WSHSBEMDxX6G3lCTA/GKgvoNGo91ao1O85 B0gVxshfsoXUb4HsVOvv2uuEHdk9gVaKkI7GIFJ0/jwX2DtNAGU82pYQXeJCXpebQn 9YTcylqtbCwyg== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 2CB0415C34C3; Thu, 17 Nov 2022 10:42:37 -0500 (EST) Date: Thu, 17 Nov 2022 10:42:37 -0500 From: "Theodore Ts'o" To: Kees Cook Cc: "Jason A. Donenfeld" , Kees Cook , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Greg Kroah-Hartman , Jakub Kicinski , Russell King , Catalin Marinas , Thomas Bogendoerfer , Heiko Carstens , Herbert Xu , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Jani Nikula , Jason Gunthorpe , Sakari Ailus , "Martin K . Petersen" , Andreas Dilger , Jaegeuk Kim , Richard Weinberger , "Darrick J . Wong" , SeongJae Park , Thomas Gleixner , Andrew Morton , Michael Ellerman , Helge Deller , netdev@vger.kernel.org, linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mmc@vger.kernel.org, linux-parisc@vger.kernel.org, ydroneaud@opteya.com Subject: Re: [PATCH v2 3/3] treewide: use get_random_u32_between() when possible Message-ID: References: <20221114164558.1180362-1-Jason@zx2c4.com> <20221114164558.1180362-4-Jason@zx2c4.com> <202211161436.A45AD719A@keescook> <202211161628.164F47F@keescook> <0EE39896-C7B6-4CB6-87D5-22AA787740A9@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0EE39896-C7B6-4CB6-87D5-22AA787740A9@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221117_074347_308188_E966D78D X-CRM114-Status: GOOD ( 18.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 16, 2022 at 04:47:27PM -0800, Kees Cook wrote: > >> > - between > >> > - ranged > >> > - spanning > >> > > >> > https://www.thefreedictionary.com/List-of-prepositions.htm > >> > - amid > >> > > >> > Sigh, names. > >> > >> I think "inclusive" is best. > > > >I find it not very descriptive of what the function does. Is there one > >you like second best? Or are you convinced they're all much much much > >worse than "inclusive" that they shouldn't be considered? > > Right, I don't think any are sufficiently descriptive. "Incluisve" > with two arguments seems unambiguous and complete to me. :) The problem with "between", "ranged", "spanning" is that they don't tell the reader whether we're dealing with an "open interval" or a "closed interval". They are just different ways of saying that it's a range between, say, 0 and 20. But it doesn't tell you whether it includes 0 or 20 or not. The only way I can see for making it ambiguous is either to use the terminology "closed interval" or "inclusive". And "open" and "closed" can have other meanings, so get_random_u32_inclusive() is going to be less confusing than get_random_u32_closed(). Cheers, - Ted _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel