Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1086766rdh; Mon, 25 Sep 2023 02:55:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWXPNhZZLjP+0Y9npk8MWrIKPR0GpXKfpKEPQeLI42CFhgmmhZYG4+PCi92P5Nz+N0Jchf X-Received: by 2002:a05:620a:470d:b0:774:23f8:6155 with SMTP id bs13-20020a05620a470d00b0077423f86155mr6060213qkb.47.1695635708595; Mon, 25 Sep 2023 02:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695635708; cv=none; d=google.com; s=arc-20160816; b=IQyGTXERSFfPfSdPxNnt0GOKHByJuqr4oVlfvoK+qd1RPm4126vmA2v8UoiugfGLOG +AcEkhZShCO6jiIlarPYV9HTsi6lrHj4c0WR0NhDFCLbXpv93fMPoovz+kcvt6evWDoX gwWmr0AFamHMn7l1fsxHbSnGvFlzSR9edgKqYSkBoEq/tayV6HjXNnWScmiYEaxv1E5w 4n3CewdoyXDaN3exFdyeP8iLz3qmQVP4Fb9YiNwrTVdu3HizdDySIojH907MKfyGdhxW iheoRC/x79VOpmdLk2w2hCoEUOxxTMlMn5ZLfqIivWFE2c4ytn/OYaaEvOsuQGO2W0oR ivxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=6CN3rlsnxLoWgAgB/OOyUV8RYD43NyOgqo6zGDJm7TQ=; fh=/EMS/8Gj3bhZaORFvfrnXg0KOYgm2pMf3ZYeedP1Ztk=; b=nvjR17TBWSGtPSaaAGDwDneugML4Ue81/vlwyYmFJrOaPyz8sob7nz7eD00ofxHLRh 8VxbKfRU4QgMsw0YhgZJXTp+DpdjtD/mlel2E4LyavN7rFdLR75NIWmf9p+ZqCavOeZ3 0nUw3oBo7egaYsYIQkJm2yGPIbesvrjcMINAPNgIev1OuVbMWcVAknwBPRV4rrxwTpgg t9mL+09I+5uAJjue7Ys5Fn2x74SELAZ3toHuOIpHta/wnmzsMPGgeLhrxqpNQDNe/G8B p5kXnCTb2lhY2W59IZQZgqZ9cZAlxBWwbFdZzkObG/pb7BN2V06S1ViqK6x688PxLwK1 0i1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b12-20020a056a00114c00b0068a557febfcsi9822696pfm.111.2023.09.25.02.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 02:55:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8FE6C803EE05; Mon, 25 Sep 2023 02:31:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233182AbjIYJb5 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Sep 2023 05:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbjIYJbz (ORCPT ); Mon, 25 Sep 2023 05:31:55 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 860FDC0 for ; Mon, 25 Sep 2023 02:31:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 43D0C635DB5B; Mon, 25 Sep 2023 11:31:48 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id M_5O8PH87ned; Mon, 25 Sep 2023 11:31:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id CE4CE622F591; Mon, 25 Sep 2023 11:31:47 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id R0w8n3XsPmXs; Mon, 25 Sep 2023 11:31:47 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 96F04635DB5B; Mon, 25 Sep 2023 11:31:47 +0200 (CEST) Date: Mon, 25 Sep 2023 11:31:47 +0200 (CEST) From: Richard Weinberger To: Miquel Raynal Cc: ZhaoLong Wang , Vignesh Raghavendra , linux-mtd , linux-kernel , chengzhihao1 , yi zhang , yangerkun Message-ID: <1385178592.80194.1695634307277.JavaMail.zimbra@nod.at> In-Reply-To: <20230925112853.6cb7fff3@xps-13> References: <20230923005856.2538223-1-wangzhaolong1@huawei.com> <20230925104938.3f7b4284@xps-13> <495954216.80155.1695633280285.JavaMail.zimbra@nod.at> <20230925112853.6cb7fff3@xps-13> Subject: Re: [RFC] mtd: Fix error code loss in mtdchar_read() function. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Fix error code loss in mtdchar_read() function. Thread-Index: W7/WnPiEM/oyGFOILGmf+sfD68BiaA== X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 02:31:56 -0700 (PDT) ----- Ursprüngliche Mail ----- > Von: "Miquel Raynal" >> As pointed out by Miquel, the comment makes it clean that this behavior is >> on purpose. If we return now all of a sudden -EBADMSG for the described >> scenario we might even break existing MTD userspace. > > The bugzilla link in the commit log [1] mentions: Ups. > * dd would just stop in the middle without showing errors > -> we probably don't care, we expect the userspace to know this is > NAND when dealing with mtd devices directly, dd is not mtd-aware > anyway. Yep. That's fine. > * ubiformat would loop forever > -> that one needs attention I guess :) Hmm. Let me check the source. Thanks, //richard