Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp369681pxb; Thu, 30 Sep 2021 07:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFy51XF2w/67KM8VTdcUjC6rfIfpOGj2DGt3Cut2SqTQKOA93cW05GZEIJcsu56ajW5jqT X-Received: by 2002:a17:906:2f94:: with SMTP id w20mr7615089eji.14.1633013365029; Thu, 30 Sep 2021 07:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633013365; cv=none; d=google.com; s=arc-20160816; b=pGhgfzHTIyEz5RhlLgELAteTC4n6CDQ8iGVAbteFPOrhSMrj8gKaLm+vIEEUQkaFrn SLI1JzzYmZGMGQ2IR0x9oove8lzIlU6g7fZ3HY+B5aWFYTrXRGSP13JbRRN5oWhHZu95 0o/U5PhHgVhjvXzpfe47fyUBt2JB02W1XQmX7kZICxwZuOx/q9H2biwEDZf/MhH7Qtbt 9Ovoz67mmxuxidp8+cVBznzzdeDWXJqsZB3QF8NRVfnH8XLWf5nmw/WNX/oK4yGAeMns G4Ww2GUt9+94JwIpB5t1G4SI6TawMZ9+JEjv0pKbvYnk8Z8FnfRdxTDWowyTBhBIG7Dk 7qpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IdLMxkgri7V5entmZJQNJDz8zpFwVw1y07FV58dcbto=; b=WAJ26hDuS24/MUMYHdxZG7RRdXCpTkLOab1Qh4PaQ78bxy5dtABynXAc0AQjeqqpHc meOkgR/qpVFNAJkOiPAyhPVL/Q3znu6p7HxLZiDJtEf4BbTzRwjSXlk/AytdguksxYYU /e2reZQmG3JcPvKLXFA32lkVLH/jTOXJWI4BJirUF2tHceuh3GIUdxYBJYWQ91vV7xph PBUuhbWyu0VR35cxP/Vq730yttMmbDDavYjaeF0/OHd6s+GZgns3EUGsEMmNW0ULD1fH +5SVqlsqH7DPVRCXmJduQxnWQzlxJjTBymF9wm1QOxhcQdTzy4aLWbi2AJ1Tv/am8v19 q2Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kempniu.pl header.s=google header.b="ERulCy/f"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kempniu.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc14si403600ejc.747.2021.09.30.07.48.50; Thu, 30 Sep 2021 07:49:25 -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; dkim=pass header.i=@kempniu.pl header.s=google header.b="ERulCy/f"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=kempniu.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351518AbhI3Nz4 (ORCPT + 99 others); Thu, 30 Sep 2021 09:55:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351484AbhI3Nzz (ORCPT ); Thu, 30 Sep 2021 09:55:55 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CDEFC06176C for ; Thu, 30 Sep 2021 06:54:12 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id b20so25895520lfv.3 for ; Thu, 30 Sep 2021 06:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=IdLMxkgri7V5entmZJQNJDz8zpFwVw1y07FV58dcbto=; b=ERulCy/fsaITHIG0mWFm3/2gwLLrJI6tKL0vkkC4oD7KAbYsmkiy0BKmIqn/+pfmEJ 7t3Iah/ieg/J1wCyPzsfIRtmy+TRgB+Ae6DTdkeEIR2hbDFumh9ZZirPQ8GHVfnK3Jr0 xVnTofriDTprFctoGaE46m/G4WLc1C6m4M0UA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=IdLMxkgri7V5entmZJQNJDz8zpFwVw1y07FV58dcbto=; b=BhJy8EK+TPqqHyHogbzUFJXOCx4ShLd5oiy2KBC+OO/2Qa6mI6M5s+Gxmeg4qUT4BR IWynsqvTQ02/fK4oaNYNPpDglWHUMdL+BpsIoGFkSU74jn7L0s2VSXygTmqWATSVaULk NtJAC7E5+YAvPL951iF37x3DmGF9BCBXzHJG1oboNWYAGyAfmtQt0B+FhHrGE3CkY769 2SECAP8nFUPMJE9PSbxy/pVLO4zbCCznTMg510OJELESKVL8qBb9uTQAqYKBrJSwkQxu udGR0mtKFGDJ6mgM30AZq8xb6bfDckc8hC2GXzeFvKh+oo6McxhVz3PRLykedXlGxzx6 5BUw== X-Gm-Message-State: AOAM532tw9Z3kk4ra9VSz+Wnijq4lh3sdyQxi7lh1dlqOeM9AYfE4SeS cccXZs1/Sg1dQljWr6MtosHMeQ== X-Received: by 2002:a19:f249:: with SMTP id d9mr6080077lfk.229.1633010050307; Thu, 30 Sep 2021 06:54:10 -0700 (PDT) Received: from larwa.hq.kempniu.pl ([2001:470:64df:111::e02]) by smtp.gmail.com with ESMTPSA id 10sm346077ljp.12.2021.09.30.06.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 06:54:09 -0700 (PDT) Date: Thu, 30 Sep 2021 15:54:07 +0200 From: =?utf-8?B?TWljaGHFgiBLxJlwaWXFhA==?= To: Miquel Raynal 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: References: <20210920070221.10173-1-kernel@kempniu.pl> <20210928155859.433844cb@xps13> <20210928162402.6bb64fcf@collabora.com> <20210928163519.08cd1138@xps13> <20210930085133.13b5a228@collabora.com> <20210930104721.03dc45bb@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210930104721.03dc45bb@xps13> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > 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)? -- Best regards, Michał Kępień