Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8021000imu; Thu, 15 Nov 2018 05:26:28 -0800 (PST) X-Google-Smtp-Source: AJdET5fJIpQTidHAALvNyQTzRFwAWdAklPrTzgtUNWuWw8gsCGWThUhVnW/VPBrYXnzu9mcO9aXu X-Received: by 2002:a63:e445:: with SMTP id i5mr5776750pgk.307.1542288388061; Thu, 15 Nov 2018 05:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542288388; cv=none; d=google.com; s=arc-20160816; b=nKLnrpOWjzoNqqZvShx+hCXfeZgJ1qnjLvWcxrG2Yf+Oh8cEpcjZWfS0gYnI4aCaAm z5w4PSXO+kih2Hjk5B5vcXbmiEXIJwoEyllbkwKRaYpORr8JU3yPHlb/356b7hTZ1scK NE4B58/1o3cy5SMaLYmbJs+gUC/7MO+4heLUCfPvWY6I5SfEauno2FKet9QvbPacB1wo /jkJZ8NGdLS1/e8xHxm3bXYaCAfLDHair++IMxzp7kI6tR5SafdrOQZzAtVxn2WkPGqw uHZ3MfNqgm7QYGjp8Kl9tMZLcYqdpuSBxKFNmqjPsggwxE4kr3/f8XsgS0hd16WEfPnN WOMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from; bh=YLl3HZtzNPormBMEHH0ESBhg4uG95NlhSzUOLHWRTHM=; b=02C5KDyWXgqzV3d8C1vIGqWlw37HfT5H+VnszZKe8q9dZ1ThxZmj60VMLspQStbfaG HpYYsCNGUgmQgc/PZZLn0Uj//aovLtPxZ6kB54In+FpMK20HRBtT6APZ8U4ivs6+QwY8 /nTLHb0Tej0pWVTOKEaQx9iO/yAGYN+MYfFCcv4IsfBRjPje7CnI/T25ihWEgBjwekWx A4O737znRN6cdrxXksXGJvw7H4Mk+YLwdMYFYzlRWHj8K3SA+6iKjZn0USmPFPiKn3Bb mLa927YVMXVUWO2an7d61dAbo7bG00EXhOKQ2Ta9N9NrkaIf1YtVR0seE9DgEG5CRA4a FH1A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w11si17891941pgp.161.2018.11.15.05.26.12; Thu, 15 Nov 2018 05:26:28 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388399AbeKOXdS (ORCPT + 99 others); Thu, 15 Nov 2018 18:33:18 -0500 Received: from mail.bootlin.com ([62.4.15.54]:40653 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388359AbeKOXdS (ORCPT ); Thu, 15 Nov 2018 18:33:18 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 7DDE020D73; Thu, 15 Nov 2018 14:25:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost.localdomain (aaubervilliers-681-1-13-146.w90-88.abo.wanadoo.fr [90.88.134.146]) by mail.bootlin.com (Postfix) with ESMTPSA id 30DBC20510; Thu, 15 Nov 2018 14:25:26 +0100 (CET) From: Boris Brezillon To: Tudor.Ambarus@microchip.com, marek.vasut@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, richard@nod.at Cc: Boris Brezillon , yogeshnarayan.gaur@nxp.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, cyrille.pitchen@wedev4u.fr Subject: Re: [v2,2/5] mtd: spi-nor: fix iteration over smpt array Date: Thu, 15 Nov 2018 14:25:26 +0100 Message-Id: <20181115132526.15556-1-boris.brezillon@bootlin.com> X-Mailer: git-send-email 2.17.1 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: c797bd81d10e648ec8c84c041191527113e63e85 In-Reply-To: <20181109165644.30534-3-tudor.ambarus@microchip.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-11-09 at 16:56:50 UTC, wrote: > Iterate over smpt array using its starting address and length > instead of the blind iterations that used data found in the array. > > This prevents possible memory accesses outside of the smpt array > boundaries in case software, or manufacturers, misrepresent smpt > array fields. > > Fixes: b038e8e3be72 ("mtd: spi-nor: parse SFDP Sector Map Parameter Table") > Suggested-by: Boris Brezillon > Signed-off-by: Tudor Ambarus Applied to http://git.infradead.org/linux-mtd.git mtd/fixes, thanks. Boris