Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6776660imu; Mon, 3 Dec 2018 02:37:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uq+KwrKOVJcdIV+jbBNslFLOTkHsCFRDCCg7M/xh6bypRG+sH3d6rTCjgOUezb/nackynN X-Received: by 2002:a63:7418:: with SMTP id p24mr12977381pgc.196.1543833431227; Mon, 03 Dec 2018 02:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543833431; cv=none; d=google.com; s=arc-20160816; b=0Bghzd/T/IQjzhWl+IkM/rQt0IU2JECgCu3XcN7rA6k3pzWaGJIbzbNMs7Ylq+wD4t ZBvyjqRkX7tVb6r8qGHcv5zUaOsn20ur969xtuEeDRIpYXUh2RClJCc5FXwjyn2xfy8H nYaAZOJKuOKCiVn3D+H+LsgLGWK4Vh5d2w6cFFaqenIyKKkCgyig2LW95Hpq48xr9rk+ OkYD1VQMBicgCkiqTF7lSDoNimgkjmUjBVY4Uq5Xn+9C375fe8q1KgFgmK6DIrk+jvfV df0c19zSmv7GB3lKAoWgoCVeUBeZIH1SG9dMQBaP074xcdDx7Uumqe0nESufHBzxbxZE eYhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=hIcuTAx7gd/fQwEM6VWNEIZvkbeeMB+Gk8pkrj/fzm0=; b=Hb+I+8gOYHZUv6yak53JBlJpV9dn151ROHQTWauveGpt0h5TsyneaYKLdI3Cff+v6q fTj+EZpItmk0+/lHC67FNTZqlxV0WD5zkmfUoYEfE1jKf0v0lb0IWjGaGgGglVQD0Wch GPVYA+5fh+lToAlGP/4VRW+ilDDvL+iNbFnBp8O5iKG5pC0DObg//S5rG4rBA4hjzmCB 7H+Tqm8v7sZO5RVNbOoKwqOUwBTM026SyaRWzNwVkjFMypIGcCZ6C9F+HZtmDiBwbWX2 qN2qdG2HuRUD8LkQVh9/awEws1N5wf1ZgU6BDD6daU27BZ9SddjNJdYdY9swkSoAcS1n AnSg== 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 e11si12610641pgf.450.2018.12.03.02.36.56; Mon, 03 Dec 2018 02:37:11 -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 S1726143AbeLCKfj (ORCPT + 99 others); Mon, 3 Dec 2018 05:35:39 -0500 Received: from mail.bootlin.com ([62.4.15.54]:57458 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbeLCKfj (ORCPT ); Mon, 3 Dec 2018 05:35:39 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 8831520CFA; Mon, 3 Dec 2018 11:35:09 +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 bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 471B0207B0; Mon, 3 Dec 2018 11:34:59 +0100 (CET) Date: Mon, 3 Dec 2018 11:34:59 +0100 From: Boris Brezillon To: Huijin Park , Boris Brezillon Cc: linux-kernel@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , linux-mtd@lists.infradead.org, bbanghj.park@gmail.com Subject: Re: [v3] mtd: spi-nor: cast to u64 to avoid uint overflows Message-ID: <20181203113459.05f29284@bbrezillon> In-Reply-To: <20181203075154.28637-1-boris.brezillon@bootlin.com> References: <1543392134-1443-1-git-send-email-huijin.park@samsung.com> <20181203075154.28637-1-boris.brezillon@bootlin.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 Dec 2018 08:51:54 +0100 Boris Brezillon wrote: > On Wed, 2018-11-28 at 08:02:14 UTC, Huijin Park wrote: > > From: "huijin.park" > > > > The "params->size" is defined as "u64". > > And "info->sector_size" and "info->n_sectors" are defined as > > unsigned int and u16. > > Thus, u64 data might have strange data(loss data) if the result > > overflows an unsigned int. > > This patch casts "info->sector_size" to an u64. > > > > Signed-off-by: huijin.park > > Reviewed-by: Geert Uytterhoeven > > Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks. Oops, should I been queued to spi-nor/next. I dropped the patch and will soon push it to spi-nor/next.