Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp156363rdb; Sun, 21 Jan 2024 22:56:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLXSrxJFy7w9Z3rMmjUbDB2uSo/GRODkOi+6d0bwZ1jFAP0DNUb96Uqi4WWPjMdiukMoNa X-Received: by 2002:a05:6a21:1a5:b0:19a:68b1:e973 with SMTP id le37-20020a056a2101a500b0019a68b1e973mr1544694pzb.0.1705906566514; Sun, 21 Jan 2024 22:56:06 -0800 (PST) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jb5-20020a170903258500b001d70b8d77b9si6694703plb.307.2024.01.21.22.56.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 22:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32403-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="B/9fy1H+"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-32403-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32403-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F8862836D2 for ; Mon, 22 Jan 2024 06:56:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECFF4DF70; Mon, 22 Jan 2024 06:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="B/9fy1H+" Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2081.outbound.protection.outlook.com [40.107.101.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DCDDDF54; Mon, 22 Jan 2024 06:55:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.81 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705906557; cv=fail; b=Kh1gyK2iA/WP2u1Igz25xnjNlSmQDR1eaUzv0+GKd9gPXSlPNwn4ZaaHF2pSR53rc4qulDSD97WjcbbzrHS+E022rAmTCZmmxwmf21vPtj4sfcYLtye0tPI2QjxZhkN6qQLA2h34lvOVYThS1aJZH4J7cIizZfThOcznd+/M0B4= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705906557; c=relaxed/simple; bh=ZFz2+Nfe22PtS4ekpnCV+eG/xylhW/3I17i4qoxIAdE=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=itaT1LaNZoT2TzGgG5lQgG9hejrUaGW0YOMHLmZHLcK5SIglddggU+sKRQBxdUuwuB5qaGsrj+4Gf0OCAMRmT4n7PtqgUa5tSWCPsabjLX6YnAwElTMNSfKmrC8hMMkv/72I85AzXO7XjxvwnGnUZZjBNIzllbAlORNVboD13Ls= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=B/9fy1H+; arc=fail smtp.client-ip=40.107.101.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzJskRYUhaRczFiA+ZVgjxe0rs/YL64hZGEy3lxrz0eMDbh68oCs+ZabTvKw3AgarP7Cn8EdxIHtVHY6ekuPfda48fbZUIC7wCdIdomvdBOasMhTPrXaAnUAddHmBNa52CKD4VylRE1p8UPP0plP6HAtNhKlF4X0/84fWXL3y1I0wbo+awt0vc3N699MVHBQJ9K+Qbri2q2W/ojQF3ZF6UE4kaykv0QpgMlxRxr4/O0Wxdw6wS0xlkhJVpnc+jNtY8SggBkwCutCy9JKaDg72YFYN01b8HDZyBDcOO059z42o8dGbRbpAhUvIwslsolB55RILR67MJFmu5zh2sVBVQ== 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=a/bTVhc1soV/Kyj7PXwmqqAo8M2AZUuP1jJr/FOsu/0=; b=fVIMU/m8ahH44y62YwlM6fduzyAtXf0nq9HATnMHjComqaHujvUR8Wfl+cZLDhLqz1opELQIrHkrYPSHXg3C02hJFftGQmVjkkBOZmbb2MbTiPpxUCL3MDvl/2HTEelqoPZdSZgT7FTZ32+2Z1tsdwSMFpnnDnCVUvQBLqZgngEXueHlAkJB7Apttww0IAl0huelty4S1Sm7AjcBmWqb0vPHTAzzhos2zZfZ6rdOoqa7XAF0oAk9zTCXSXvQwbNMv/MfztUNzA+MjW2oS2TIaQd8jjhi3YkDJe9Qxa3uHfdA8ZPKqwM4ZS1A1BMMpK+nygGxvt05v+YJzLHwIbdOow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a/bTVhc1soV/Kyj7PXwmqqAo8M2AZUuP1jJr/FOsu/0=; b=B/9fy1H+jevS4DoNrwTRFDh0WOB8KNbfZGZvbolUMQTL+JvWlw0a+QIdRHRPUWG//bKzjLZhN4PRJCcD6AfOpipG7zSwm6aZoL8fLQJM6ZAcZQmUReO4ElgYGsOqMRIL67DHLpDAq3EGFoaw5seHDv/t0R7nztmoqvM6Pzewozk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CYXPR12MB9337.namprd12.prod.outlook.com (2603:10b6:930:d8::20) by CH3PR12MB7524.namprd12.prod.outlook.com (2603:10b6:610:146::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.30; Mon, 22 Jan 2024 06:55:53 +0000 Received: from CYXPR12MB9337.namprd12.prod.outlook.com ([fe80::772d:da3d:154b:fa45]) by CYXPR12MB9337.namprd12.prod.outlook.com ([fe80::772d:da3d:154b:fa45%7]) with mapi id 15.20.7202.031; Mon, 22 Jan 2024 06:55:53 +0000 Message-ID: <6e9ae678-7301-4a99-8644-cfbc11816cc6@amd.com> Date: Mon, 22 Jan 2024 07:55:43 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] pinctrl: pinctrl-zynqmp: Use devm_kcalloc() instead of devm_kzalloc() To: Erick Archer , Linus Walleij , "Gustavo A. R. Silva" Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20240119181909.7079-1-erick.archer@gmx.com> Content-Language: en-US From: Michal Simek Autocrypt: addr=michal.simek@amd.com; keydata= xsFNBFFuvDEBEAC9Amu3nk79+J+4xBOuM5XmDmljuukOc6mKB5bBYOa4S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G+buA+9beElCmXDcXPI4PinMPqpwmLNcEhPVMQfvAYRqQp2fg 1vTEyK58Ms+0a9L1k5MvvbFg9QARAQABwsF8BBgBCAAmAhsMFiEEZzUMm/XM7ptTZDVqN3x/ If49H5EFAmQr1YsFCRZ/gFoACgkQN3x/If49H5H6BQ//TqDpfCh7Fa5v227mDISwU1VgOPFK eo/+4fF/KNtAtU/VYmBrwT/N6clBxjJYY1i60ekFfAEsCb+vAr1W9geYYpuA+lgR3/BOkHlJ eHf4Ez3D71GnqROIXsObFSFfZWGEgBtHBZ694hKwFmIVCg+lqeMV9nPQKlvfx2n+/lDkspGi epDwFUdfJLHOYxFZMQsFtKJX4fBiY85/U4X2xSp02DxQZj/N2lc9OFrKmFJHXJi9vQCkJdIj S6nuJlvWj/MZKud5QhlfZQsixT9wCeOa6Vgcd4vCzZuptx8gY9FDgb27RQxh/b1ZHalO1h3z kXyouA6Kf54Tv6ab7M/fhNqznnmSvWvQ4EWeh8gddpzHKk8ixw9INBWkGXzqSPOztlJbFiQ3 YPi6o9Pw/IxdQJ9UZ8eCjvIMpXb4q9cZpRLT/BkD4ttpNxma1CUVljkF4DuGydxbQNvJFBK8 ywyA0qgv+Mu+4r/Z2iQzoOgE1SymrNSDyC7u0RzmSnyqaQnZ3uj7OzRkq0fMmMbbrIvQYDS/ y7RkYPOpmElF2pwWI/SXKOgMUgigedGCl1QRUio7iifBmXHkRrTgNT0PWQmeGsWTmfRit2+i l2dpB2lxha72cQ6MTEmL65HaoeANhtfO1se2R9dej57g+urO9V2v/UglZG1wsyaP/vOrgs+3 3i3l5DA= In-Reply-To: <20240119181909.7079-1-erick.archer@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: VI1PR09CA0123.eurprd09.prod.outlook.com (2603:10a6:803:78::46) To CYXPR12MB9337.namprd12.prod.outlook.com (2603:10b6:930:d8::20) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CYXPR12MB9337:EE_|CH3PR12MB7524:EE_ X-MS-Office365-Filtering-Correlation-Id: 93c5a8ae-77bc-48b6-218a-08dc1b172d27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LycUgGcpgCMuBsOotmgz1Zas/A7Us+wIZlHj7rnQTvmdJslKoudwGzPgBYFgKMgIELrYWuSsgS6QDdWaMBctaDvTm7u2zhy4bf9622i4yx2gqqTqOkvt5ZwVkd+TOhcTfZxuYmz4ZFcITal4vVAXmzAlgpX4FOysaXF3rnXViBrbR8fYSvSH+KecSbWLjCYBpe8MOkigEJKmUontUw7CYIRGbVo95z0Q/+EjNAH0FhYoo8TxeiX4BIJT7p3LTDPHY6XtZ/iIrEyBFyRX/eJtXKn52ApfxbrHjUg60EzBURgVWbw1F7d11kceMVZZAvBOzPbISLd6aUWMxw+wM8YWE2vHSL6hGjd8KgcX3NWXZccqLlRm4R/KKKxpA/+nwjIrgCpRwFObsQS2fZrkgqUR2QtFEbWF/4cQ7paqT5TPM/5j5ydWH0Rre08ZF/GAfIzm3dVWyX2z2jsfNFi+YRe4ysi2YSd/znDic2oikNCXtET1Eof9VlBLaF0FGrFqiYMcBKZd3nBh6f4HFucP6eHvxMEUaHV1pi3ZYAE0Cl2pq4DsG23cCC38NIwrW9Fctp5vvrpwBgdQyUUX/gQkMO5XN+AwKG9dU9HnrwSBT5ONKNmq7qB3PN7pC+6wic7E2xX9k8VmLOu9y2vKy4v1IPjKI7Uaf4a0W/k7kLXZhmAexF7AHCb6Tbd1uNolSPM8vZYsy6A1v3R1Qi+YNfhQiuyeCw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CYXPR12MB9337.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(31686004)(6666004)(6506007)(6512007)(2616005)(26005)(38100700002)(53546011)(86362001)(83380400001)(31696002)(36756003)(2906002)(6486002)(966005)(5660300002)(41300700001)(44832011)(66946007)(316002)(4326008)(8936002)(110136005)(478600001)(8676002)(66476007)(66556008)(518174003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VGZYSW5nbHV6d1VlYVgraDVrbzNTcEg1MFNWVUw5SFNHRVR6bkFoSVNIbXVH?= =?utf-8?B?SFhndis3RGgwN1E2cStXWUhYSCtmUHNsVDl3cHpySDR2S21IR1p0OVU5MVFG?= =?utf-8?B?VHN3d0VicHFpMFN3bmxndkNRSkM4ZmhYZzVmUmNOZGMydmk1UEFTSm5zeHFq?= =?utf-8?B?alRNYmlQOVg1bENQdElQTzduSnRudlFybC9hck0ySXdPSkhwK1g3TGJNa2VI?= =?utf-8?B?VDNxVXBnNjVuWlhWTVF0U0tkUDNLTWprZEVkR214Y1ptL1ViL3M4aHNMUUJF?= =?utf-8?B?ZDVQYzNsR2NkR25vbDBjVVVHSTRtY3N6Y1FKR2NFMTJETnhNNUtFT3VGVHJs?= =?utf-8?B?cDdBMk9jTm1ua3dxcUpGU2UrVWt6U3dtR2hPUThFOGJpUVhPN3daRjVSbnMr?= =?utf-8?B?eERlR2dqaU1BNml2NHV3cEhDSGxVbjFqWWVDeWF5LzFZYTdudVdXdEFscGhh?= =?utf-8?B?NjFZT3pJYTNScHZVMmRPWHp5RjBQZXNlZnRNWUo2ZTVPZUtMMW56cWRSbStF?= =?utf-8?B?WWhySTFuMENIMDkzRzgvcWJBZHMvQndMNlQyZW52N1lEWTlYMDBkQXNYRFlH?= =?utf-8?B?NEtxUmVFMFJQY083UzlqdnRWMXk1OHpMU2dNUW91Z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czMm1wOXp0VkplRTRoWTJCdmFVdjdzWXAyQTkw?= =?utf-8?B?cnhvZHN5bGM3ZWh5YWNzWjRXUHAvKzNyZGx4WDJLQ3ZLQi9qa2c3Q0lGQTVl?= =?utf-8?B?YjVPejdDeXp0ZFFUQWo3R2xkcXpYaTZ4ZkFzcnoxelp3b1VGVHJhY3YrN2Nv?= =?utf-8?B?MjR4cWcxK2VBYklUVk03ZVJST2FBUWZiRm1ieEE2MllrMHVVYWw2QXlZOEQw?= =?utf-8?B?ZnFDKytGRGVGeXgwMWhyZ3dTSS9HVjhiK0hFSHlUVkJuWXZYVElycmFlSHhU?= =?utf-8?B?QWp5ODZ1U2pydk9sRjVwOGQ2d2QvbFhicEpZZVpXNHZoaWtQMTN5S1RkN2Nh?= =?utf-8?B?WTV1dU5jdXV1Qis2dlVUeldSOFNxaEw3SmY3T0hRcHVURGpXRXkzWHFZVW5a?= =?utf-8?B?TEh3cmNTUU5GcGdFR2h5bXNvY3MzZGJSQnJQaTJaNWE4SVNJbmdUelZTZVF4?= =?utf-8?B?ZFdwQTVXYUd4UmVRTjFrcURLOWxMeVNzUXpTY2NxUnlOWVdmbUp6S3pPL0xQ?= =?utf-8?B?UUVJVmZsNndkSGR4dmRydklNenM5VTVoZFE3OWZNOHlnSi9XUDZJS2JoUDBT?= =?utf-8?Q?DtiZSgNnO/MJi4peUnlLSjnNi?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93c5a8ae-77bc-48b6-218a-08dc1b172d27 X-MS-Exchange-CrossTenant-AuthSource: CYXPR12MB9337.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 06:55:53.8227 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TsrjPpExqYZ0WMXEHM7+iKyjulMT9JrryS18DRbZRRt8HDwsaxFSSPx6gBJl30A4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7524 On 1/19/24 19:19, Erick Archer wrote: > As noted in the "Deprecated Interfaces, Language Features, Attributes, > and Conventions" documentation [1], size calculations (especially > multiplication) should not be performed in memory allocator (or similar) > function arguments due to the risk of them overflowing. This could lead > to values wrapping around and a smaller allocation being made than the > caller was expecting. Using those allocations could lead to linear > overflows of heap memory and other misbehaviors. > > So, use the purpose specific devm_kcalloc() function instead of the > argument size * count in the devm_kzalloc() function. > > Link: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1] > Link: https://github.com/KSPP/linux/issues/162 > Signed-off-by: Erick Archer > --- > drivers/pinctrl/pinctrl-zynqmp.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-zynqmp.c b/drivers/pinctrl/pinctrl-zynqmp.c > index f2be341f73e1..5c46b7d7ebcb 100644 > --- a/drivers/pinctrl/pinctrl-zynqmp.c > +++ b/drivers/pinctrl/pinctrl-zynqmp.c > @@ -562,7 +562,7 @@ static int zynqmp_pinctrl_prepare_func_groups(struct device *dev, u32 fid, > const char **fgroups; > int ret, index, i; > > - fgroups = devm_kzalloc(dev, sizeof(*fgroups) * func->ngroups, GFP_KERNEL); > + fgroups = devm_kcalloc(dev, func->ngroups, sizeof(*fgroups), GFP_KERNEL); > if (!fgroups) > return -ENOMEM; > > @@ -754,7 +754,7 @@ static int zynqmp_pinctrl_prepare_function_info(struct device *dev, > if (ret) > return ret; > > - funcs = devm_kzalloc(dev, sizeof(*funcs) * pctrl->nfuncs, GFP_KERNEL); > + funcs = devm_kcalloc(dev, pctrl->nfuncs, sizeof(*funcs), GFP_KERNEL); > if (!funcs) > return -ENOMEM; > > @@ -768,7 +768,7 @@ static int zynqmp_pinctrl_prepare_function_info(struct device *dev, > pctrl->ngroups += funcs[i].ngroups; > } > > - groups = devm_kzalloc(dev, sizeof(*groups) * pctrl->ngroups, GFP_KERNEL); > + groups = devm_kcalloc(dev, pctrl->ngroups, sizeof(*groups), GFP_KERNEL); > if (!groups) > return -ENOMEM; > > @@ -830,7 +830,7 @@ static int zynqmp_pinctrl_prepare_pin_desc(struct device *dev, > if (ret) > return ret; > > - pins = devm_kzalloc(dev, sizeof(*pins) * *npins, GFP_KERNEL); > + pins = devm_kcalloc(dev, *npins, sizeof(*pins), GFP_KERNEL); > if (!pins) > return -ENOMEM; > > -- > 2.25.1 > Acked-by: Michal Simek Thanks, Michal