Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp482573pxb; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIaoCO+wv3B28rrySwWM66XjRRL1BKsvBqrnnJcjrq8rcUIv87lMMLeN0YnhSx6zBMlp2Z X-Received: by 2002:a17:907:16a3:: with SMTP id hc35mr15495500ejc.497.1635342217484; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635342217; cv=pass; d=google.com; s=arc-20160816; b=1LptVhAJ5GephOHknzTFTAxjUrgamiqeKKiiIFDXpMop+JQafjw+ez+ueIoKxHp+kC Nk8ddUDqid4LghAPSF91hcbHAlE/6oeKzmxvedeTTefJlhmMhlj+N4smH+0hjml2NsVs 58Jr8lan10HCOGv8D4i22lnVZMwMzTvA1vqZoKTqipzkpF2jJQDorLPBsKAdOospHUQs oXqLehKnaeQtQJ4eEUnwIoHoriel/Eh+inURgA5W7ntWzF6x8H5EXjpaVedU27JeAkXh gcwJxbtsJ41bGCHBdz8td0bVVbjVCfNhSCRZTKlPC1o1dtxGqa4NIdTf5tbZZt45/llA z+ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=nneFbQ7bRtlq+uAj7MPgmyaFWI3TkWvPTRoGZAUaoGk=; b=L7ws8/exVc3/U4vWAGC1DSx+cXBeur5+slU2Yn9VlGrLcASNX2KlhqHOExqPrGlB9G RAaOm40KMx080p7m0o9RQbKxq4029ElHQFCyk7rCze2BD8o7xFxbESM6ywSdtMpO511y /VhQ2Eca4xfPtK6/fSD1siLeAMGVh2qEnfksQlejATIqeqjVC/MyhqF5jFCL98qOBq5h 4CS4TYHB2wtBCBn6/sGNgtQlV0IFRDpVYy5ldMOju0FHUZaCknsHseVl8KJO8/Z8hhnC l9Zs6xnADlCj9zvzzrthskrlONwBhZSXERTT8lCIfaVSoi7lJbDNgqz+mb0lUURHcrbE hRgQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=atsDURpo; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si35621530edb.325.2021.10.27.06.42.32; Wed, 27 Oct 2021 06:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=atsDURpo; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240387AbhJ0AQU (ORCPT + 99 others); Tue, 26 Oct 2021 20:16:20 -0400 Received: from mail-sn1anam02on2084.outbound.protection.outlook.com ([40.107.96.84]:19332 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240388AbhJ0AQJ (ORCPT ); Tue, 26 Oct 2021 20:16:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ABh9zPggONGurFOlHrUoQM9TA2AYwm2pfupTleW03sbhTURyDsg6sg9HbPVfVjT5Sa2W4JPrBqCg4ac28m38R8hq5S1sLg4cybybP67fZmpzaV4leI4P5yTPZbHFbunWLoe9Zu94jJCut1zoju4IkYgF1S+lN8LIWnek4HGjoPxTYkBDyU2ZEBpAAaZQ3DnI2TTMyZPBYIvXz5xgqSpQ6PzWRs3CX2A5T2NfJZf/IFvwneAaqHlzrMm4mAWAwuFg1VhhJ4k9iBQHZrQeruLpNUkZw45FsLB5VlnXEMQ6AzdZnYONEAiVBxlg0ZF3Ak83VuH2L0cxcEiFhDYnDAFuMg== 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=nneFbQ7bRtlq+uAj7MPgmyaFWI3TkWvPTRoGZAUaoGk=; b=hNTliiJkH4qwq+O4okoBGAx5+2AeH5HFV1HQDvvS8sF9RwcpKJt35argwjI97hNLOzp4H/RlqLUtSKr9EiscH5wrm8re0FluCuKYYr+n2FsXLnjeOKXs6SG4ClBrnW75W6vXJ/792Utaw2F0ElIq9aoyBJzZnnozW5REMWaAOsOfwxcEGHP/eHPk8pwWjrH1BlELt7FA/EWSigxVesoFl0XS66eZih2bRFz6WOQZPxhAZYRB4Oi+AzOIj+JobGrq1EnTNrI3TquI3RI06PEaJu46nQRvXLvnFV1cvM0/xIayrqQ5UehLgmxJSe/F3M7OPG781jqYOjtpIQNPzoJ3tQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nneFbQ7bRtlq+uAj7MPgmyaFWI3TkWvPTRoGZAUaoGk=; b=atsDURpoZT+rBy/elgFTMlMrhsKVKGMver4yA6tmANcyl6F0liphEIGmQcRuIw/fKWRTRI/kQMT+9H3BpZsKtfkJT+SE+HPv1DXSnqWPjCk8tOg+9FwbkIurEAjV8p65jBNAC1/TdPZ1eki298sy+D4dGoqQZk2A7QRcsvlJJ3Fm7R5S8bcPD/JZHGW6QpLkrXZ1bU6EnZJUFhBc7UUNaOx5GAzInBSHO7Vwc4446wJD8ECQABg0XjRZny6Uy/d5JsKRlhIOt5erPXgJbH3QaIrj1WYSCMjUWqdEhWj81QHfXIvQPeQnmxPNuYIwmW+qwnw78+JOc0LJjH2xuWyDXA== Received: from MW2PR12MB4667.namprd12.prod.outlook.com (2603:10b6:302:12::28) by MW3PR12MB4409.namprd12.prod.outlook.com (2603:10b6:303:2d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Wed, 27 Oct 2021 00:13:42 +0000 Received: from MW2PR12MB4667.namprd12.prod.outlook.com ([fe80::3db1:105d:2524:524]) by MW2PR12MB4667.namprd12.prod.outlook.com ([fe80::3db1:105d:2524:524%7]) with mapi id 15.20.4628.020; Wed, 27 Oct 2021 00:13:42 +0000 From: Chaitanya Kulkarni To: Len Baker , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni CC: Kees Cook , "Gustavo A. R. Silva" , "linux-hardening@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] nvmet: prefer flex_array_size and struct_size over open coded arithmetic Thread-Topic: [PATCH] nvmet: prefer flex_array_size and struct_size over open coded arithmetic Thread-Index: AQHXyPzChVrZ24+VpEK7ak5rDkGCHavl/QSA Date: Wed, 27 Oct 2021 00:13:42 +0000 Message-ID: References: <20211024172921.4110-1-len.baker@gmx.com> In-Reply-To: <20211024172921.4110-1-len.baker@gmx.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 authentication-results: gmx.com; dkim=none (message not signed) header.d=none;gmx.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1e8f9fe9-1390-481d-9ef3-08d998dea257 x-ms-traffictypediagnostic: MW3PR12MB4409: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3lsjIq7TM81mRKlK7GNwZF9Lq++hvnstqvf59bzUXa9Km2fMmxbvlDHifx0bWYq8ksSM12KpEZfn1VX1BG//O0eNDfgTTq+iFRdtPQY7enP+Nd/P96yNTpY5TZJ8lA7LqQ5mplnwT/hFEt2zo3k+lL/Xdb00TovKkeFUCholPRkm73V16uTrt141eGZuU7qlCgZfhvqhGjFT2jPva9IawUbavYjfCUZZaOT3tEC81oDG6qUqPzwI84nza9PIY8cfMr/s02r4Pm4da1cLcabNShK2W/ciInbKz7V2/2QLzdrXq2KfKh4GGLsNJt9Iu7FkU01eYUi53CCeQVRn0wWnoxMaydRr+E3jW1O/4domF6UZQciCGKK30bILosc7RiKmDWdnlI+q/ZMG+KNVxMz8pQrGXE5FhyraZB92LA0AnVFm/5M86sGOz5G2EuLizrUya/RxIvKLJh9CYg9fK6lj4ANuFos+PdG/Zd/HU7eIaKZLB89dfZOZwd+8QFbget6XVsmEnN8m/zkebK8cGd6hXmR3vmQbr9e0O2JjeQu6RBswH7LnVcGo9hGl4HQPZvp6X1h07WfNCuN0wRK7i/DBcBxCKsuvVbnPghTtpX3Wlky2yibdPHmQljEjBbAfd5Dsum2g07NwOhxEj44GtxUkOE1U8ecaL74m3+GAFjDNGyxbZKVFO/yyIp+3yzx1IEML3rTy47QFuRBKc6uCVLffGhdtF5qUcxLu/gHmbxQwa/fV7LUxdKrl9s67rtKgcsexNhtLYAe0fVIRQKIscm5+9XLwCDBXycZ4N7F3FBH4Cn9wYSa2ROUTzIIbPjv+bdesKlouGi/vuxKZYYnpve4dhylhjwGmAETuQcPpHB12pAI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW2PR12MB4667.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(316002)(86362001)(54906003)(76116006)(4326008)(966005)(8936002)(66476007)(31686004)(508600001)(110136005)(5660300002)(6512007)(122000001)(53546011)(8676002)(71200400001)(2616005)(66446008)(64756008)(31696002)(186003)(4744005)(38070700005)(2906002)(38100700002)(36756003)(7416002)(6486002)(6506007)(66946007)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?bmFmNVZXYWN3VnRmYXFubmFkbHJNRWxTMWVjeVNzdTJzb3E5azZKTDNKbGk5?= =?utf-8?B?Q2ErcS84Q09GRHYxZUVsRmJ3d3BjUlJUMFJHdWpOVVc1K1VtaWFnN1NMTUVZ?= =?utf-8?B?aDY3S0pQNkZxRUR5WkFuMGRITWVSZUpNZ0phdURwa0MrWE16d09rQzJLK0hi?= =?utf-8?B?TkNkWFphcDJhbWQ4b040WU5TbVJsbGsvVTV1YUw5N0x3cG1RZFd5UCtXSWxT?= =?utf-8?B?dHlFQmNENjJjUlNFVTNLdEp1ejlqNGJ0RVJUMGt2THhHTitGZ2tKOHJFUm03?= =?utf-8?B?VTgyU0xGN0lzbjljaVFKS0lINDFvMHRoaEtqdk4reGJ5SmZIaWhVdWRDMGZB?= =?utf-8?B?dSs0S1FJODk5WkRMODFiWTBvM29nZEl5clNLbjVFb2RJVG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zT4fngqIdErUVbpnXUPkWQIe13Ufg?= Content-Type: text/plain; charset="utf-8" Content-ID: <8955F4B0CF2CD5478FC0B4BBA71B0CCA@namprd12.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB4667.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e8f9fe9-1390-481d-9ef3-08d998dea257 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2021 00:13:42.2299 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tipvyRK4jTUk+j8e+fYQZWKuI8EC0MwiShRgXZW6+gE7MGf2uvKOYlBBvBtjVMdPjxMMz6Bq3m52XA47CMOXcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4409 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMTAvMjQvMjEgMTA6MjkgQU0sIExlbiBCYWtlciB3cm90ZToNCj4gRXh0ZXJuYWwgZW1haWw6 IFVzZSBjYXV0aW9uIG9wZW5pbmcgbGlua3Mgb3IgYXR0YWNobWVudHMNCj4gDQo+IA0KPiBJbiBh biBlZmZvcnQgdG8gYXZvaWQgb3Blbi1jb2RlZCBhcml0aG1ldGljIGluIHRoZSBrZXJuZWwgWzFd LCB1c2UgdGhlDQo+IGZsZXhfYXJyYXlfc2l6ZSgpIGFuZCBzdHJ1Y3Rfc2l6ZSgpIGhlbHBlcnMg aW5zdGVhZCBvZiBhbiBvcGVuLWNvZGVkDQo+IGNhbGN1bGF0aW9uLg0KPiANCj4gWzFdIGh0dHBz Oi8vZ2l0aHViLmNvbS9LU1BQL2xpbnV4L2lzc3Vlcy8xNjANCj4gDQo+IFNpZ25lZC1vZmYtYnk6 IExlbiBCYWtlciA8bGVuLmJha2VyQGdteC5jb20+DQo+IC0tLQ0KDQpMb29rcyBnb29kLg0KDQpS ZXZpZXdlZC1ieTogQ2hhaXRhbnlhIEt1bGthcm5pIDxrY2hAbnZpZGlhLmNvbT4NCg0KDQo=