Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp371848pxb; Thu, 30 Sep 2021 07:52:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhU9b5o5qUOdalrhwknt1bTqjMIRbDpgz0cV6ewtm9NOZHZ3Xu2lDNN4cW/+C81UvE2eMG X-Received: by 2002:a17:906:69d3:: with SMTP id g19mr7270233ejs.521.1633013536065; Thu, 30 Sep 2021 07:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633013536; cv=none; d=google.com; s=arc-20160816; b=YdK0bc5w0jI4DWBXXbjPAHosSFT/Pwk2h3D0zgNPRLo87bmGeovaIgjmy1af3ooxqf fKaQj8870k+vHvZA8Xs1x8c9RRiFxJio7CF3X3gbXb5Yw71QmfYj25MQebIJ/79CblC/ VRs4QuZ1Mh0iszcWqzP7SsTuKbbM9xehe+hzaHW/SSvGq4hJrbrq2Z3vE2j65GIIpKXu zY2ujGAf8H1nqbDZz922p6avbm828bbRhGa/CryDZu16famG02hgKKCNtA/i5OSfYbS6 m4ezbP6cWz3GEaeRO1O2ZvPky8rEu/DB86d14NNvPogvVYTNYVp5oEjxQIQnygkhiSeW o21A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=LKxyVve7XhzBz0eLEMWVkHQDa7OAeA7WGldrli+hwyE=; b=i/3RVXQbb4zCJ9eWvDdaUIkt8v5Aq/CIifZYloDCYSpSQeeaEoqvObSV2vXCHNeJ2O H3pCvDSacAdflCNZLd//f2o1WmG6VsMYBY6GP/X8SsyNOMLCG18TfkSw9aP85Zx1tfVh 4eWYE3WdxyuWqoYa+ofe+YDQy7m/GAyrfh2atKQ9loRODFpS4kj1cIfihldHs8L5Pizt SmFrvUi5pIN4IP8U+hvL1n6gkO/ZL373rhtlyvylRro+c6BkNInKcd1BKNWfBJCaYplU vqhkj+Nm6P4CZ7ogh/7SBvVT5T0a8kXKhZl1Uj1MHSWKFewb2RGbYIGr2dFES1zn8c4t hIeg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dv10si2040335ejb.344.2021.09.30.07.51.50; Thu, 30 Sep 2021 07:52:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351582AbhI3OAS convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Sep 2021 10:00:18 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35201 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351513AbhI3OAS (ORCPT ); Thu, 30 Sep 2021 10:00:18 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C7F57240014; Thu, 30 Sep 2021 13:58:32 +0000 (UTC) Date: Thu, 30 Sep 2021 15:58:31 +0200 From: Miquel Raynal To: =?UTF-8?B?TWljaGHFgiBLxJlwaWXFhA==?= Cc: Boris Brezillon , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Boris Brezillon Subject: Re: [PATCH] mtd: add MEMREAD ioctl Message-ID: <20210930155831.672acdee@xps13> In-Reply-To: References: <20210920070221.10173-1-kernel@kempniu.pl> <20210928155859.433844cb@xps13> <20210928162402.6bb64fcf@collabora.com> <20210928163519.08cd1138@xps13> <20210930085133.13b5a228@collabora.com> <20210930104721.03dc45bb@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michał, kernel@kempniu.pl wrote on Thu, 30 Sep 2021 15:54:07 +0200: > > > > > > I remember discussing search a new READ ioctl with Sascha Hauer a few > > > > > > years back, but I can't find the discussion... > > > > > > > > I think this is the thread in question: > > > > > > > > https://www.infradead.org/pipermail/linux-mtd/2016-April/thread.html#67085 > > > > > > > > In fact, it looks like Boris beat me to preparing a draft patch adding a > > > > MEMREAD ioctl by some five years: > > > > > > > > https://www.infradead.org/pipermail/linux-mtd/2016-April/067187.html > > > > > > Exactly the one I was referring to. Note that this patch still contains > > > the unbounded malloc which I think is worth fixing, but other than > > > that and the addition of ECC stats, it looks pretty similar to yours. > > Right, thanks. > > > > > I guess the big question from my perspective is: should I revive Boris' > > > > original effort on the MEMREAD ioctl (which returns more detailed > > > > bitflip stats in the structure passed by user space) or would that be a > > > > waste of time because the subsystem will be switched over wholesale to a > > > > new way of doing I/O (mtd_io_op) in the foreseeable future and therefore > > > > exposing yet another ioctl to user space today would be frowned upon? > > > > > > > > > > That's not my call to make, but I think those 2 things are orthogonal > > > and can be addressed separately. > > > > Agreed. > > Thank you both - it sounds like I should start working on a v2 that will > make the new MEMREAD ioctl return more detailed ECC statistics to user > space. > > Boris, I think a Suggested-by tag crediting you is in order for both the > unbounded malloc issue and the MEMREAD ioctl, but submitting-patches.rst > says I should not add this tag without your permission. So, are you > okay with me adding it? > > Miquel, as for the unbounded malloc issue, should I address this in a > separate (preliminary) patch or rather submit a two-patch v2 series > (unbounded malloc fix + new MEMREAD ioctl)? Both work as long as you keep the changes in different commits :) Thanks, Miquèl