Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2648471rwb; Thu, 17 Nov 2022 14:01:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf59dGCNC/ErAmzLcePyGsA0ecEYOihIGxXGRwgOn2fbLAfRLvaTiHEX1o6ApJRuCq0yW0mF X-Received: by 2002:a63:5d3:0:b0:45f:c9d5:d490 with SMTP id 202-20020a6305d3000000b0045fc9d5d490mr3931397pgf.392.1668722513178; Thu, 17 Nov 2022 14:01:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668722513; cv=none; d=google.com; s=arc-20160816; b=gE0VsC3EB+ln+P9mjA3GwzeLuEaZI4xpYobEvO+pAnxfvj5gp4CHtjNX/y8Uxmvkqc yftKP8FJWDJdZpZsUlgfAIPhecPsq0fybM/NcZQVvQM5mWlEiFzuZiuK4qFrecVVm1sF 9M7cse0eCUALF8XMLK/2WI5zTU4CB3FNne8Pjy1YWk4B0KFhWK67O4uYxf7b68xyYhip fBwyLoDf2lCIDn4w5vWPHX5g0T5ZAvkSROWvHzOvH5mBu6nA9H7PkpI4viPeO96pQVKp 8y5960NLRg+eTj6UyiCfLOxW5Kuyu/dfOSl4H0gD7hA3e7qwXDeO78AW10pwvLN5HtMP 3i+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5js234S10qtjTG5ViD8Z5NsYYM8xXfh9lDGiYeYzTNk=; b=etXbux7YVud02se0Ah5rzW3VauF7dP+HvQxKe4wHJIgXvFdJM/00Wo8DbL3uNs57Dm yffnfFJUnLRfoaSMUnonYquJH3jyn9D4fZSjPoBoBsr/oTblN4QaKa20BXF9+ErdX5AC Ay8qjUzWqTnA8x7ESTFkrHp1fTxMrSJLI2ddhHz8nwX4lKqPs/iWfIoefixuM1QsJfuI LN62alI6DjTqeYS3wfYK76LYicpBYaWd21ivdj/g0nE+oDkDPH0+Kwirecr8LH7FxOOj E0fZXWMmuWiGrI9Lrza2PT+23H82hDrIhd6TYOMtJMyAoEIefnyIDWoH3SpbgQueAnGt rTwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FgMUyRzC; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g11-20020a17090a578b00b0020055731860si1670728pji.105.2022.11.17.14.01.38; Thu, 17 Nov 2022 14:01:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FgMUyRzC; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241057AbiKQWBB (ORCPT + 99 others); Thu, 17 Nov 2022 17:01:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241062AbiKQWAm (ORCPT ); Thu, 17 Nov 2022 17:00:42 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2901387A48 for ; Thu, 17 Nov 2022 13:59:07 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id h193so3277471pgc.10 for ; Thu, 17 Nov 2022 13:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5js234S10qtjTG5ViD8Z5NsYYM8xXfh9lDGiYeYzTNk=; b=FgMUyRzC1HQVet+tDCWA8ljDeGrHXk7NWmfvGzfwmovUinDK9knhVBWqOEaxR/WKhH wwHz/N4KP6pHF44qAgHaZHzh9z++AStihN6Ao5uRAf+yYgVBMZnVIZpD5gjuBWFIjThJ QsnQdQgUO9c1DQGCG/8tbnX/sYDH6HkHB7Fks= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5js234S10qtjTG5ViD8Z5NsYYM8xXfh9lDGiYeYzTNk=; b=y5xJ9I2yEV9In4Pf4GqVdBhg7qWLNP5cmesIqaneF82ymtdSszVP7ystkJ+ubL38U2 jMRoFpv6rc51SSGqYEqpNQlDsfzjW9Um/HXqJ8s6iMeYa8ZJsJ0jqvlQaNFqfGODcRef uDxW2klSe9kcl5VLdQmXTjWhzhQhYSBsPygqnydTvvfFFW65SwTdk1VuzhRA+HDZjMzk lVCkaFhi63q3SWUETbIYXgOKi5kkcAR6H6QD/aDuOWHgK5U5+/BGFXpjpEUaOgWUBjwA 4xfAHTsgdIum72TO20Uh45lkWHxoy+d9p/sZ0n3VDDbarGcS87Gc36kdxB+GSLO35aEQ Y/2Q== X-Gm-Message-State: ANoB5pkNB7BPAzkY9vWybLsZTRMnBYpO4NsUfZ6Kv4XCdRvooa5E16vf xi5mm3FMRoHaDo7qyd9C4ReoSA== X-Received: by 2002:a63:f00d:0:b0:458:f364:b00e with SMTP id k13-20020a63f00d000000b00458f364b00emr3876253pgh.577.1668722346647; Thu, 17 Nov 2022 13:59:06 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id u5-20020a17090341c500b00188fce6e8absm156864ple.280.2022.11.17.13.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 13:59:06 -0800 (PST) Date: Thu, 17 Nov 2022 13:59:05 -0800 From: Kees Cook To: "Jason A. Donenfeld" Cc: 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" , Theodore Ts'o , 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, Russell King , Ulf Hansson Subject: Re: [PATCH v3 1/3] treewide: use get_random_u32_below() instead of deprecated function Message-ID: <202211171359.412AEEE0@keescook> References: <20221114164558.1180362-1-Jason@zx2c4.com> <20221117202906.2312482-1-Jason@zx2c4.com> <20221117202906.2312482-2-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117202906.2312482-2-Jason@zx2c4.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Nov 17, 2022 at 09:29:04PM +0100, Jason A. Donenfeld wrote: > This is a simple mechanical transformation done by: > > @@ > expression E; > @@ > - prandom_u32_max > + get_random_u32_below > (E) > > Reviewed-by: Greg Kroah-Hartman > Acked-by: Darrick J. Wong # for xfs > Reviewed-by: SeongJae Park # for damon > Reviewed-by: Jason Gunthorpe # for infiniband > Reviewed-by: Russell King (Oracle) # for arm > Acked-by: Ulf Hansson # for mmc > Signed-off-by: Jason A. Donenfeld Reviewed-by: Kees Cook -- Kees Cook