Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1967007rwi; Tue, 11 Oct 2022 03:03:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7O1FwMskYD7ltr1ri1fdn9OXfe10DSJLaJ91rht+Be62BMNTfsTeU10MGlYF/U1DEHS0Oi X-Received: by 2002:a63:441b:0:b0:439:103b:25a4 with SMTP id r27-20020a63441b000000b00439103b25a4mr19946049pga.487.1665482586183; Tue, 11 Oct 2022 03:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665482586; cv=none; d=google.com; s=arc-20160816; b=aOb7JKBBTMtyWeOm7sZDNpecciYzePykVguP1mEbZkPTodYZFpgAnGkhMCkdgd3A00 2t3h+m3ft9ijAjSM4BLbcY9I0TLFUKn7m9Jwj4Xq7OZ2oQGaLKVdFIS8kZHSD2lP6Ydq CuQT2jpd1uPfmeFMFpyxp6eG8OGVVSDdQNufqp9r2UIDv5DbeN42XO6eyrgtJ/pRrmEP r1mGpWodBXrgFItwUY+xW6rx094cqp6KXiLMlGfdm4rUK0NEcicR3Q57zvsUqTtJ70yA oylc+i7rxRv4m7wnlKyxq19LlXRd6EqRvXHk0LJsWQoc3tPKpVJyDtfT467hg+t896PL XhoA== 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=8TskdJLbpvnFxRnfdNl/vSrXgO12T2EGmWRBhayoU1c=; b=iPlImfEdG5Vey2lpn/qrkTv+Qau9Gin1dFsbAJujlfmtO3lP2Ke+AeFsffaQB7by5/ 6q4RUtBQZq9OAv/BmHIDhi4/+jeAzgEvA1/PXSdWEDIbBQGI4yW14KdxH/U9a3677Frn wgXrSzt88sve++OrgQHDRiLXfmL/hpgxXSiJY2QOwCAb6IlCP6nvaD4zjyu+YPonWJKF 7qWawv3fDK75U48awu0uAdSzncS60pkCXXFD6ME+kpIOYbEEPdpUD9TVrLfUq9w8TVyF KqP0KuHofrILBNG1+XooLv2/c982xVZNxYfage5vEgcyhxleZfJyt4e+E5XENUANp/9Z hjog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=MpaqjBwC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k13-20020a170902ce0d00b0017f93ef47e5si15150638plg.370.2022.10.11.03.02.57; Tue, 11 Oct 2022 03:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@ibm.com header.s=pp1 header.b=MpaqjBwC; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbiJKKBm (ORCPT + 61 others); Tue, 11 Oct 2022 06:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiJKKB2 (ORCPT ); Tue, 11 Oct 2022 06:01:28 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1EED543EE; Tue, 11 Oct 2022 03:00:31 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29B8C6Q8029887; Tue, 11 Oct 2022 09:59:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=8TskdJLbpvnFxRnfdNl/vSrXgO12T2EGmWRBhayoU1c=; b=MpaqjBwC+HaB5ger1fy963S2ffNRUt9sccx7dMemTiKvK2UOIsFlZ0JHT9Gs5IZ4zfml qY/jTzuNZjaUReCUjv42AnLRO4eNoxigZTG2dgSmPToOzMfNv0ToUI/BdkCxvcv0jZs4 KAfH+NcmCx1EoGONxvK9UIdFcnH037z7+M8Cge1O3Gm91hpPhIaVOR3E7UakX+Ns+D1J 9IgxsJVgqsn7p0lRiNFwySlGKoccp3FfMWW6q9jFe1uzvQm4VJu1RS/KoTRzH9juXZn8 p6aQXogukT8UVn5I1ksAPmVHXwNxLPpZf9k5ISCQwdeFnZJsEh1PK22RTy5wAg4rcNLf xg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k510jh4kq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 09:59:51 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 29B9qDas000691; Tue, 11 Oct 2022 09:59:50 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3k510jh4jg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 09:59:49 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 29B9otYM003872; Tue, 11 Oct 2022 09:59:46 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 3k30u9c3jg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Oct 2022 09:59:46 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 29BA0ET842008878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Oct 2022 10:00:14 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 77311A4060; Tue, 11 Oct 2022 09:59:43 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 842F1A405B; Tue, 11 Oct 2022 09:59:41 +0000 (GMT) Received: from osiris (unknown [9.152.212.239]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 11 Oct 2022 09:59:41 +0000 (GMT) Date: Tue, 11 Oct 2022 11:59:41 +0200 From: Heiko Carstens To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Andreas Noever , Andrew Morton , Andy Shevchenko , Borislav Petkov , Catalin Marinas , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Christoph Hellwig , Christophe Leroy , Daniel Borkmann , Dave Airlie , Dave Hansen , "David S . Miller" , Eric Dumazet , Florian Westphal , Greg Kroah-Hartman , "H . Peter Anvin" , Helge Deller , Herbert Xu , Huacai Chen , Hugh Dickins , Jakub Kicinski , "James E . J . Bottomley" , Jan Kara , Jason Gunthorpe , Jens Axboe , Johannes Berg , Jonathan Corbet , Jozsef Kadlecsik , KP Singh , Kees Cook , Marco Elver , Mauro Carvalho Chehab , Michael Ellerman , Pablo Neira Ayuso , Paolo Abeni , Peter Zijlstra , Richard Weinberger , Russell King , "Theodore Ts'o" , Thomas Bogendoerfer , Thomas Gleixner , Thomas Graf , Ulf Hansson , Vignesh Raghavendra , WANG Xuerui , Will Deacon , Yury Norov , dri-devel@lists.freedesktop.org, kasan-dev@googlegroups.com, kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-media@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-parisc@vger.kernel.org, linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v6 4/7] treewide: use get_random_{u8,u16}() when possible, part 2 Message-ID: References: <20221010230613.1076905-1-Jason@zx2c4.com> <20221010230613.1076905-5-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221010230613.1076905-5-Jason@zx2c4.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: IT3Pw0mhIjHzqnHZZlCKJFwT-v1d8pz0 X-Proofpoint-GUID: Otg1b0ZLN3TnXHminz2qr4szScFjPSmT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-10-11_03,2022-10-10_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 phishscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 mlxlogscore=473 spamscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210110053 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-wireless@vger.kernel.org On Mon, Oct 10, 2022 at 05:06:10PM -0600, Jason A. Donenfeld wrote: > Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value, > simply use the get_random_{u8,u16}() functions, which are faster than > wasting the additional bytes from a 32-bit value. This was done by hand, > identifying all of the places where one of the random integer functions > was used in a non-32-bit context. > > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Kees Cook > Reviewed-by: Yury Norov > Signed-off-by: Jason A. Donenfeld > --- > arch/s390/kernel/process.c | 2 +- For s390: Acked-by: Heiko Carstens