Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13944003rwd; Sat, 24 Jun 2023 09:03:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60tqkfQ91Ax5EMJ3eLBE7P9qSJ7gsqMAt3Xl16CDzER+QKWWkPc9cow+ZETkiuc4nf8LdC X-Received: by 2002:a05:6a20:9143:b0:122:cb38:637a with SMTP id x3-20020a056a20914300b00122cb38637amr11522010pzc.29.1687622584046; Sat, 24 Jun 2023 09:03:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687622584; cv=pass; d=google.com; s=arc-20160816; b=rB7EhYNEDdBF1BGBlUnqyzQs062Yl+Rok0pHD2e4MZPhrnwtIdQmafm/crQEBGv0O8 DPBHgAjKxxr+T4BIIUdbQoSVXMmle9xXo+c1PdOcUd6Z13U0LE3O8KBCBPLKT8XqZfPo kDJr62ODcoo5oJKlWaWZfHcZ55V2Ra8Tgl0uUjpjuCfaZKNwkBjlEY9/6GVGiH5Ucis5 g2UE++EH63fwWdQNKahcm6eQE9/kAlzeY20oUarsmpki0nX/KxcshvT0+nbREzLBBNBI o8Pjv6nvc4oigw71JtDhzCYFwVQH6rJ1rh9crKH0NXLaH4sXrPr6dINt0dpYbNrrHfOj fPjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jrzoa8Po3fOdarDAV9jXDDmmZA9l98WO5Dx18koznpU=; fh=tH6HR9G5jEdD+2u/F2ZEP1w8aPFPFP6+v8lU8IiPbTs=; b=KazdZ7kHnpHmvd4ECcXqgIWnG7jOsT3sP8g+cDcNaXhSzd1IcwkRwygJdc87evy47S QvLSaqMZmTJG+0nolzKT3pPhmEEKUfuvsl56WJnzgaL6FwSU49iRKTGhUNKi39zJbTRW qCKxIgseWqqdeKxe6mJhOa93yp9RGhO1jJE7rT2/VUICCI4r3fbEfzk4eYFrrNxt2d5Y JbEf+70URBV71k040JdEhPeJeLp1JqYemP9+Hy67s4nYT/7v/4+LH+utQTKNn8rBY2zj 7ZBVxwxJYK9bELt6SIGVb2cSANt+POOod/z4VYUyxiirg+lvBSwErnaLxOW3J7VNmafT MkYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=NIuATxFW; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a056a00004500b0065d39e113cfsi1450042pfk.228.2023.06.24.09.02.27; Sat, 24 Jun 2023 09:03:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b=NIuATxFW; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233225AbjFXPsr (ORCPT + 99 others); Sat, 24 Jun 2023 11:48:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233196AbjFXPsn (ORCPT ); Sat, 24 Jun 2023 11:48:43 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2096.outbound.protection.outlook.com [40.107.244.96]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44E8626B5; Sat, 24 Jun 2023 08:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YpHW8J0FODl10Me9COUsAKEGu/qPJx7IbIwqYhmNh83DklO3KhA4ZtQ5fjo3ibUCja3YBOKPUL7HuWoLEg6mz7QrQG4UXnuo48XGim64L0xX0GP9juYOc8mPsLTWWxaophxGbE1jatPbopFsuLGxbId1WxnTc7sqh7fR7JtSZsMMZwHUufeTMQUSMgD5/r3KEhx/xtq9DD3TLYN7da4cPBIg9ztQTylvDHEVM8ifGkFC5iGTTDL0IRvxk+6fqmeU/net65HwQIoK3tUU51b9RrvgxLxAIcAfZdSA1IqEPGzgJnvm+RLJVbkm9/yE3uxZbm7+o+r9QZ2Lh7v5G/8gWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jrzoa8Po3fOdarDAV9jXDDmmZA9l98WO5Dx18koznpU=; b=holw/jsOydNBjBM1Ul3rhkUYp6zKpDLJK6tOtarHwimWT84mGqQkpFxub/KIsN/i3sgairWccVPspz+OhFfUSLEzwclGkl4MR1FPPF9nDQLw1UR3bVu1XEina1jV/K9A56J/eq4vaMUPxoj+dogVB5UoLf8OBleYWJ43vNLoRHsLlgMXlnj3I8FOu5Xkpt4fvK8P5JM0umtjRVgzNuguzHnoONoVZvidCBihbI0zR39OVq83zGOhch+ShVU0NgnrLYRiBWxv3Ud2NoOAsyfqNLZm0g6SF/cihnlQUUFNLFF+A8xY/uviG9GHRhJsnEQSWfuljYsJNo1qhkBblzDFzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jrzoa8Po3fOdarDAV9jXDDmmZA9l98WO5Dx18koznpU=; b=NIuATxFWWhunwS6EyKip4q26EULXuF7wYl0bMgFxOMbeNHFxf8KPKxgt3NA9+310rqZe8u5ah52sTDYIAdDqA6b82rCQcG+qKIXPr+hOrbEyKNrp2P2ec/byo2sV8rPm5aKv6eb5i5O1gtz7ZsxkiBoB7Ilsv9IomUfSVxHYSws= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by SA1PR13MB4895.namprd13.prod.outlook.com (2603:10b6:806:188::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Sat, 24 Jun 2023 15:48:23 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%5]) with mapi id 15.20.6521.023; Sat, 24 Jun 2023 15:48:23 +0000 Date: Sat, 24 Jun 2023 17:48:17 +0200 From: Simon Horman To: Julia Lawall Cc: Claudiu Manoil , keescook@chromium.org, kernel-janitors@vger.kernel.org, Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 18/26] net: enetc: use array_size Message-ID: References: <20230623211457.102544-1-Julia.Lawall@inria.fr> <20230623211457.102544-19-Julia.Lawall@inria.fr> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230623211457.102544-19-Julia.Lawall@inria.fr> X-ClientProxiedBy: AM0PR03CA0094.eurprd03.prod.outlook.com (2603:10a6:208:69::35) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|SA1PR13MB4895:EE_ X-MS-Office365-Filtering-Correlation-Id: 78b65993-30b0-4f97-dd68-08db74ca714d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yLWcfHh6vVMtZVeIMTNPb1KWCrQCMP66Q2ZRnOy0mbww4kcPN7/hcMRjMy+KC4XIcgU4Ir82INEcEQ3fppn2TNALldzt7rT4sULsPdpjSHQJfQBwEM1jbrAfpQ6mvXMAVEULvrz4wMfhLzVYFegoeUOlk6vljqqzw6wXQQod5HvLayGpOf4VkWdZWQ8osG8PuNbGBXlzMGq8vqiAffP5BrGQ/qbT0K7GMV/vhxeWmq98RRbyyQstx32ieHp1e+HGzqLqkn0ciHmjqHKnitLpSpErqcaO3+8MaY7jfPtLmUyvAuupLLE+a+Ytezy8ACVeMkrTfvIW7xom/VQr1f3ZbIop8bmUHwsFnD+d9vEM83aSJGesiny726HPxb9kocWybCKCzKQZalwOAdjtCu+bxWLm7s1Q8wPedi49dTQ9aiFy3KhQHKrzXUPAKedJLjnBN0vHh9TGzLbUFk3ak4nsecb3Oqw87EyZyyfALtiQjms2k5YmSiBrtO/097kdFBSJuvWLewM/UOeacx1XVgOTWHqvxpn45OkAPU2tMF5oLO4Rfi0tMw7IDOcHsXGYnwR3mheiurKq5S4ado+zTJhSPDAshpYscSLojPxjYjY5YwY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(366004)(376002)(39830400003)(136003)(451199021)(36756003)(5660300002)(44832011)(7416002)(41300700001)(316002)(86362001)(66476007)(6916009)(8936002)(8676002)(66556008)(4326008)(38100700002)(66946007)(6486002)(6512007)(6506007)(4744005)(2906002)(186003)(478600001)(54906003)(6666004)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?NV/ft4vVPmPhCgs1ui/gfFjMKWwyM9ahbixEQLEuCMpTV7oCWfbuTi4n5Me4?= =?us-ascii?Q?DLGC5J1MGq7nauqKwhURUXLHmrfGl2f/YNcu18yBzQYpOYDMc3makHhjI7iq?= =?us-ascii?Q?oAP+f0czYY5KoQEanM1ybz6fJT39DZb5n8NMeiNrsZZCducAlyB6ikY2l9dV?= =?us-ascii?Q?i5s+f6c4Y151UfVaQz/N8tTXiV8kaf4/Oikdf8gmRUz0MdKf32hNu07zaPHb?= =?us-ascii?Q?j5IRCsy4l0efVM8nT4nMCv6cwCi9Tx3aAj0tw97Gq9OLwImpX2I9DwpULiN6?= =?us-ascii?Q?Wb/h4l3fuEnpV6i0j1aei23F7kJPpeRbX0U71rNVv9rYXqo8YCOMTspUe7o/?= =?us-ascii?Q?60RqQgEKZy95i0j1PRv+FhGKSSCNl6fscZ3Jg1nNFqZtZQMHPSFpVBkvcV4Z?= =?us-ascii?Q?eTHClX/pJQxbiL8YTNY9Rk2FhxJUR3AEBRN4pGicVEhpobw4VbBnnvZNMNeE?= =?us-ascii?Q?27Nq7U5NZMxdzES7U3HTfSc6YE5oPSczjnxo9lrEnF1fYGbIxrKuEYxpVY+R?= =?us-ascii?Q?yJaYEjAMoUR0n3EtW6x0VnnMM2aVjkRdR+iFb1iUgVttx7PcHbbzGIXyzxdX?=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8ptmk0BLRwx+wrJyO5jzR?= =?us-ascii?Q?51W7r+FLSrSkuNR0BSaZbj8ydzR+apDAxtazh17Q09umEr+O3bDqGNOi0Q/0?= =?us-ascii?Q?qdAhYFl2sTFWq4tZ46xdy0S9R75zXzs0QYaY7FkmzRKxMuK21rZJvLz0fcvF?= =?us-ascii?Q?d3Ln0EKaniEg/BWFa36EY+nO28NwwgXX52nKvewk4O+JB8F00Mp840Va7j5k?= =?us-ascii?Q?qhOIiQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78b65993-30b0-4f97-dd68-08db74ca714d X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2023 15:48:23.7191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Zuzg93Aldh0az2qv9vZLMTOu7zjEUnEAyqxoA1ztSNogfRq3M5vu9hCzFIvC2YCY1nBnCO9sOdd067kPUKTdatpKes8L6ALQ9brmPK54VLw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB4895 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Fri, Jun 23, 2023 at 11:14:49PM +0200, Julia Lawall wrote: > Use array_size to protect against multiplication overflows. > > The changes were done using the following Coccinelle semantic patch: > > // > @@ > expression E1, E2; > constant C1, C2; > identifier alloc = {vmalloc,vzalloc}; > @@ > > ( > alloc(C1 * C2,...) > | > alloc( > - (E1) * (E2) > + array_size(E1, E2) > ,...) > ) > // > > Signed-off-by: Julia Lawall Reviewed-by: Simon Horman