Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1704405imm; Thu, 12 Jul 2018 06:33:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfDnv7jjJeez45HmKPCYrEOsP+Ows6gps/jv+tb4V3K4WcsUTGOk4BXYsf/kTjRhcvojzm6 X-Received: by 2002:a63:4663:: with SMTP id v35-v6mr2128603pgk.178.1531402417156; Thu, 12 Jul 2018 06:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531402417; cv=none; d=google.com; s=arc-20160816; b=gatT0HWxhyx4hcUoUAUlEwnh3GImtG0aUvM5vkQVTUeBQHlilV4roL+zxdOpy7jRuw JNZ1fkZnaToU5r+VI3HGfPPoKIWvF0R7VuCCgy1e7BaGIAjqpUnokdhczCZS8ynfEgme G1kyzPGOieeOm+Xr2OjYxRqXrWzBmRO2hxwxStQIJJBcOHwEST8i4UPrgIATT8mq2+Nf 20pF3juArdgJttr2mTSqcTXluqn5caqubPD4bld/FSf0WEoVG7ecEva516u9xHJxLPZF LH6erslPU7k2+HzbDZopIvYCj5LABYN5IMM28qhB6LQcX/4N7OcxjWQjE8F0GJSQj41m HR1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:spamdiagnosticmetadata:spamdiagnosticoutput :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=5q+nERZ5Zp1urYLjKnB9pCIy9mNMXSif8MN9ns/qHTQ=; b=lbRzzVkntKf8hEaCkmtHlMnKfdq/5u6XvX6hMVqPwLDy2Nx1n0+YatXA1GnZWub59y BMVstRkWBTChOsjkc4faFU8gL+oIH4ftYQFlMV1wPR0HRze010pW7Xa17ZZK/h/cxPqY /Ppku+FoVWVNS9E5RqIxyUzmPB7Ynvzztl49YXQYlrPiwdEwhnLI9QHgifSjn47aT+As B0/AUTLhRl13UHGMpAAULYRFWNDvqXzJz64XY7thrDT4vN6hMayYuQ2WRYxCiqHLRuMh QeGe39dRlovreNuCdiA+OeXMMHw98YYcudaFdttvfFNzNiVWn30LGl6mHlPGo80pYrNb 0FXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toradex.com header.s=selector1 header.b=bKH1FAkS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14-v6si1799230pgk.562.2018.07.12.06.33.21; Thu, 12 Jul 2018 06:33:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@toradex.com header.s=selector1 header.b=bKH1FAkS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732430AbeGLNlh (ORCPT + 99 others); Thu, 12 Jul 2018 09:41:37 -0400 Received: from mail-eopbgr40110.outbound.protection.outlook.com ([40.107.4.110]:60890 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726782AbeGLNlh (ORCPT ); Thu, 12 Jul 2018 09:41:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5q+nERZ5Zp1urYLjKnB9pCIy9mNMXSif8MN9ns/qHTQ=; b=bKH1FAkSLydwXyVWwxzaqgln70ZBp6abUQNJsu29Q9vBmnbbVkVQg6HA/X7UjefE6NcwB3/mX9d/nyQ4CsZ3i+9Z61sLkknlslSRUHkL9d9DZBjPWgKH3YJPymsHd6KXTut0FBAAn9ATeWVUEPTPPrYQq1ik1+Pph/4FiJxhUcg= Received: from VI1PR0501MB2590.eurprd05.prod.outlook.com (10.168.137.14) by VI1PR0501MB2222.eurprd05.prod.outlook.com (10.169.134.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.18; Thu, 12 Jul 2018 13:31:58 +0000 Received: from VI1PR0501MB2590.eurprd05.prod.outlook.com ([fe80::5570:f225:bd5b:1aa3]) by VI1PR0501MB2590.eurprd05.prod.outlook.com ([fe80::5570:f225:bd5b:1aa3%10]) with mapi id 15.20.0930.022; Thu, 12 Jul 2018 13:31:57 +0000 From: Marcel Ziswiler To: "stefan@agner.ch" , "boris.brezillon@bootlin.com" , "miquel.raynal@bootlin.com" CC: "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "dan.carpenter@oracle.com" , "krzk@kernel.org" , "dev@lynxeye.de" , "benjamin.lindqvist@endian.se" , "digetx@gmail.com" , "mirza.krak@gmail.com" , "gaireg@gaireg.de" , "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "linux-tegra@vger.kernel.org" , "marek.vasut@gmail.com" , "richard@nod.at" Subject: Re: [PATCH] mtd: rawnand: tegra: check bounds of die_nr properly Thread-Topic: [PATCH] mtd: rawnand: tegra: check bounds of die_nr properly Thread-Index: AQHUGeS0pyEGRbQPRUWImmAyq6IKYw== Date: Thu, 12 Jul 2018 13:31:57 +0000 Message-ID: <1531402315.1390.6.camel@toradex.com> References: <20180704091310.22003-1-stefan@agner.ch> In-Reply-To: <20180704091310.22003-1-stefan@agner.ch> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=marcel.ziswiler@toradex.com; x-originating-ip: [46.140.72.82] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0501MB2222;7:Xks53G4XE5w2TPpiq0Z1ql9SSfb6vHetBCLtnW/Hhjg8AaNcnv2PtkYyN7mmqHbwQx/36W8xuYxdy6v3JLEobSyIQvNmEOapH3cZ8N1x03XjSgHvfI+b3+JMoYrV71aZcyMHC/YpTD9jwkvZg482AVfSxcpDTPf+c5PCLa6zRrSZQ17XhdSJ1Zs6oyLCwMlcbcq3+MVMudtszbrkU+x3baiUqfFNvk9ZcWCAdehbHoyUjMdQE5MgQHzoLw+DvKbG x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 495bf30a-d062-4bbb-5277-08d5e7fbd72f x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);SRVR:VI1PR0501MB2222; x-ms-traffictypediagnostic: VI1PR0501MB2222: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(146099531331640); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:VI1PR0501MB2222;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0501MB2222; x-forefront-prvs: 0731AA2DE6 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39850400004)(366004)(396003)(346002)(136003)(376002)(189003)(199004)(99286004)(316002)(39060400002)(25786009)(54906003)(110136005)(229853002)(6512007)(44832011)(2201001)(5250100002)(2501003)(105586002)(102836004)(6506007)(2906002)(186003)(11346002)(446003)(26005)(14454004)(4326008)(478600001)(476003)(2616005)(53936002)(106356001)(486006)(66066001)(36756003)(305945005)(8676002)(81156014)(81166006)(8936002)(14444005)(103116003)(256004)(76176011)(6246003)(6116002)(86362001)(7736002)(68736007)(7416002)(3846002)(575784001)(5660300001)(2900100001)(97736004)(6486002)(6436002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0501MB2222;H:VI1PR0501MB2590.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: toradex.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Piwpqy7JRZEX6ivUPZz0nBLPMSoOLNa4+MOXZueUO4GYSrL69+0IGIvjj1lpv2lE4bw0axZrxz4aoNktrjdrj40Ajq2S5NT+S6EtobOt+iF4MtH1HYGgmKHNXuC9eZzo0ePAinamwGdUrlNQ4Hvsl1IAuAspJuW4lqgO+eDaesdeYubnimvBaWPWxLW12NiKInmlAU1HS2Ip9z+7EynEePwI9ZswF/tGl5yJBgrxEVnhQ1RA9Jip/CE84hK+YIUPUQjt4HpAg3DpBkOfHRna73q3iNIvUSt27k5iUqT4489jN09vjAyTXSUUk9fgF50b2D6ci/dJfBoGsXLTVgkRW+Sme0FyX50zeKNUtPm1TUw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <9B4C462F86C8A84DB5B35B481971228B@eurprd05.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 495bf30a-d062-4bbb-5277-08d5e7fbd72f X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2018 13:31:57.3051 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2222 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDE4LTA3LTA0IGF0IDExOjEzICswMjAwLCBTdGVmYW4gQWduZXIgd3JvdGU6DQo+ IFRoZSBUZWdyYSBkcml2ZXIgY3VycmVudGx5IG9ubHkgc3VwcG9ydCBhIHNpbmdsZSBjaGlwIHNl bGVjdCwgaGVuY2UNCj4gY2hlY2sgYm91bmRhcmllcyBhY2NvcmRpbmdseS4gVGhpcyBmaXhlcyBh IG9mZiBieSBvbmUgaXNzdWUgY2F0Y2hlZA0KPiB3aXRoIFNtYXRjaDoNCj4gICAgIGRyaXZlcnMv bXRkL25hbmQvcmF3L3RlZ3JhX25hbmQuYzo0NzYgdGVncmFfbmFuZF9zZWxlY3RfY2hpcCgpDQo+ ICAgICB3YXJuOiBhcnJheSBvZmYgYnkgb25lPyAnbmFuZC0+Y3NbZGllX25yXScNCj4gDQo+IEFs c28gd2FybiBpbiBjYXNlIHRoZSBzdGFjayBhc2tzIGZvciBhIGNoaXAgc2VsZWN0IHdlIGN1cnJl bnRseSBkbw0KPiBub3Qgc3VwcG9ydC4NCj4gDQo+IFJlcG9ydGVkLWJ5OiBEYW4gQ2FycGVudGVy IDxkYW4uY2FycGVudGVyQG9yYWNsZS5jb20+DQo+IFNpZ25lZC1vZmYtYnk6IFN0ZWZhbiBBZ25l ciA8c3RlZmFuQGFnbmVyLmNoPg0KPiAtLS0NCj4gIGRyaXZlcnMvbXRkL25hbmQvcmF3L3RlZ3Jh X25hbmQuYyB8IDQgKysrLQ0KPiAgMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMSBk ZWxldGlvbigtKQ0KPiANCj4gZGlmZiAtLWdpdCBhL2RyaXZlcnMvbXRkL25hbmQvcmF3L3RlZ3Jh X25hbmQuYw0KPiBiL2RyaXZlcnMvbXRkL25hb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