From patchwork Wed Oct 30 18:44:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 1186901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cogentembedded.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="duZxlB0r"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=cogentembedded-com.20150623.gappssmtp.com header.i=@cogentembedded-com.20150623.gappssmtp.com header.b="dPLz9uQO"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 473HSL72fsz9sCJ for ; Thu, 31 Oct 2019 05:44:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GAlVbMS4cEaQxxAnGrzJmZEKYMyOwyzvCNbhIZBn+yA=; b=duZxlB0rUEvAbI mz1hBSEuCD2ngX3pcYOMoTJd0lWF2ETmFVV+KYU2p96/KRaMGJNKmRXL8nxrK4bHTOXHrWTbz1Sab OVG8ojbLw5uH/BFo7xNNbXmc/NuZkBTebvPluaEvaMqrBHNAFk0e8GbKyEVNsNIqXvtO2AOlyXl9F djrQjqftjhTjpmqcD+Xvj5Ja/yfultqp/j5vVveoATTtOrDOpYQLL+TUwU15/C4OIUcDDXYN7MtfG dqhcaYvaETEXqRzND7qwNWlsNz1IM4pf+Yrk2YCm4HmsAjFOBW4DN6pNruP8oGK6ZxH21RSK08vov K/QIKwcEbgtuAlcY2NQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPsxb-0003b1-Do; Wed, 30 Oct 2019 18:44:47 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPsxU-0003YI-NB for linux-mtd@lists.infradead.org; Wed, 30 Oct 2019 18:44:42 +0000 Received: by mail-lj1-x235.google.com with SMTP id m9so3805541ljh.8 for ; Wed, 30 Oct 2019 11:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:organization:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=jfkVRA5Lj/WBoTfmAQ/y1AD3S7I01b1v7Xnmb4bzmoM=; b=dPLz9uQOLcnndR2HYQ0xOQS4kpdeYmMSLP5FmaWLvGejUaFMfUzF236GSpPyNl/neU V4vrSS22rjaEieczs2EJDA87s9mamE+gzUPmR4ervlHqSNPfThGa9dUCJ+QxaUt818qQ oAHjqy1m1I/jLIpWr7lNHQGPFo/LThahF0hdYVgkGIiIV1v5rUfYGcSUZguJMY8rwoGb 3AmwGMKZLrw/QAilgNJzQfNdkZhEo8tY4RnQ4Ix6FNJUjwHTH6IHqqXEFm2YGHq+hL8T b2sIJtHE2LGfJVxnOqGsVBY+6AuWMn18Ok6xkG0a2B/Y8rPQKFMgH/Rqh7O8oSjDnW6U LsxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:organization:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=jfkVRA5Lj/WBoTfmAQ/y1AD3S7I01b1v7Xnmb4bzmoM=; b=rz7/ZH7yHnyvFSQThY9hCm5LMFRgGD0SGIgXVgackLMgeHTzAWsC/GAYslyVo4Bm+n aYfo87g41iVo+NUHHCbo0Sd/IvyXMKxTVWIRh5VvSleMkcv9uQthxFSN9WtuDvSndi1X MQsfDfg2oQsMQEw0MVivrpzsxWtLfXNrukJ+TuZqIIvzkPoSh9fqIu1JrazOY+3194nY J5fW7/03WuBQ7ODT22btUl4cXYu5VpF0TEwl7gEY4pD4LtPnMn7gjuhRC1UmRCwIMbB7 DGeeBZqiDf5KBtG0izOpGCX35WOYF/HPFHpVMK8yf/ahq+ZJ4ilFc4htvX23dEmfR37Q DSrg== X-Gm-Message-State: APjAAAVQEHBp73m1ecK4uM82wbo6Uu3nNJ3G8h0vxp3/S3w0IsKgRSVY 5YuVtcULLW77kCbuu5CTqvLuWxEWiCo= X-Google-Smtp-Source: APXvYqxEMaR9jcpWyIngl6Njrn1DR0bZOki4VjLkROxepoJUuIsNK37hHM1h5WK8dkaZB9oDxgvf3Q== X-Received: by 2002:a2e:87c9:: with SMTP id v9mr810540ljj.65.1572461078168; Wed, 30 Oct 2019 11:44:38 -0700 (PDT) Received: from wasted.cogentembedded.com ([2a00:1fa0:454:89dd:4e25:eb47:574e:ea06]) by smtp.gmail.com with ESMTPSA id d28sm377745lfn.33.2019.10.30.11.44.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 11:44:37 -0700 (PDT) To: Marek Vasut , Tudor Ambarus , David Woodhouse , Brian Norris , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org From: Sergei Shtylyov Subject: [PATCH v2 0/2] Fix silent truncations in the SPI NOR driver Organization: Cogent Embedded Message-ID: Date: Wed, 30 Oct 2019 21:44:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-MW X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191030_114441_172638_AFBE44E6 X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello! Here's a set of 2 patches against the 'mtd/fixes' branch of the MTD 'linux.git' repo. The SPI NOR driver assigns th result of a function returning 'ssize_t' to the *int* variable in a couple of places, while 'ssize_t' is a 64-bit type and *int* is a 32-bit type on the 64-bit machines. The silent truncation that happens there isn't really valid, so we have to fix up the variable's type... [1/2] mtd: spi-nor: fix silent truncation in spi_nor_read() [2/2] mtd: spi-nor: fix silent truncation in spi_nor_read_raw() MBR, Sergei