From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66546C4363C for ; Wed, 7 Oct 2020 18:42:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE6332173E for ; Wed, 7 Oct 2020 18:42:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SmewMUHP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Z+pf3UsZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE6332173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Oxi4A9KddoAdJqMNq3M6tazhCd3XG2ngwNyDaO/IdNI=; b=SmewMUHP0c3Wh6Z39PX/psYLU /K51zRuRMUeQnXgdEHdbFN+0lka30R9rEw0NTU9Ae+uUnNkVkqLxbDf+0yR3sNOxSXuZ8dOtZetAG WoPxPMYZioyq22/zeMGk1CIufhDE0aTT+5HExaBj7kLUf69O+7R+p8E4WY7LT+uYSAna006I6fbyG UEMigkv/S83+jPyLxTlNCouvJrDV85xHvh1gQsC+2QA0ZKv85KfXkAuWky4pI+nfBVH60oXWP5d+3 ZbHsaNF/p+X7TYKyuhLtcfCoUwrPBx8TArxKflYhtNpO/pGYrFO2jsAERa183sCDOZmnu5kE17Ahc Fx15itRMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQEMs-0006l0-Bn; Wed, 07 Oct 2020 18:40:50 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQEMk-0006kQ-Vm for linux-mtd@lists.infradead.org; Wed, 07 Oct 2020 18:40:43 +0000 Received: by mail-pg1-x52b.google.com with SMTP id y14so1939952pgf.12 for ; Wed, 07 Oct 2020 11:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xXW7LOkGsdr16DDohWm1S0zfTBlg5Yr0tvbTwZjyTlk=; b=Z+pf3UsZNiwu7xHh5ZQ9hZ+01ELjMbt2ed1X/ipL8w/k7hNHtgncWNAVjKR3tsKPXK vCdHRxspE/9bKTjmH6JyrvJ8l0A2xMrHq8foZR3ST9oSHzIguMUC7dILekx/k47JGsQH Bqmly9MJM+mmsLUmVY58dWE/53egUiOhO/MQs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xXW7LOkGsdr16DDohWm1S0zfTBlg5Yr0tvbTwZjyTlk=; b=GSSUZH3OGeyQ4/Rprs3tPGFdB49bCglK6SqsCLLIWuUntuuQ2BfmE2SOLy22rZJYBc 1JvJL6alqtE0y2CXD324sfbvEonQ3gdN+BE/Sq4sgjdXZVv3J4VrhKTz4ayu2kvXWhX+ H5Fps/HIRFLGWDP5n3DLIV7feK3zJT1nNJQ+hQluEXHkJmVJSiUA4ufUZ9ufWOvAYRGn esaRrqiDSjAXV5owdexcE75VpL5pexlT6jaWk0Xua6taSFFMUHJHaWEeYYn2fywqRe66 OWkNGZS1CumENNfZ6qs2cfZAt4fPFlcXtoMZpwqNM9nSMp+267pOecAPxzAOLKlM+O9A UJog== X-Gm-Message-State: AOAM532oxdNdAp2P1Jh7D5Cxx7P2tQfWrnsfzsz8gYhFRQwRzC+7xj/h ypA4gLr7c44iLusUE/CxfK3HNA== X-Google-Smtp-Source: ABdhPJx/izEb8o0j/KKQex6oJFq4oBwmBu/eZG5unfLyOm1bgO2WRau8jJCJqiM22rH4iSy75gAgpg== X-Received: by 2002:a17:90b:e87:: with SMTP id fv7mr3817625pjb.187.1602096038809; Wed, 07 Oct 2020 11:40:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id r6sm3889904pfq.11.2020.10.07.11.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 11:40:37 -0700 (PDT) Date: Wed, 7 Oct 2020 11:40:36 -0700 From: Kees Cook To: Christoph Hellwig Subject: Re: use case for register_pstore_blk? Message-ID: <202010071130.7EA00291@keescook> References: <20201006155220.GA11668@lst.de> <202010070007.8FF59EC42@keescook> <20201007075537.GA12531@lst.de> <20201007083715.GA15695@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201007083715.GA15695@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201007_144043_047169_BB948094 X-CRM114-Status: GOOD ( 17.30 ) 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: , Cc: Richard Weinberger , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, WeiXiong Liao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Wed, Oct 07, 2020 at 10:37:15AM +0200, Christoph Hellwig wrote: > Looking at this more: in addition to the block code being totally > broken, there is really no point in mtdpstore even using this code. > It does nothing but minimal parameter validation to just pass it > on to the pstore zone interface. IMHO writing the mtd code directly > to the zone interface makes a whole lot more sense even if we grow > a non-broken block backend at some point. Something like this: I really don't like this, sorry. I'm using the pstore/blk bits myself already, and I don't want that removed. Additionally I really don't want the structures open-coded in the MTD driver. The whole point was to encapsulate it. I've spent a lot of time clawing pstore back from the brink of open-coded argument and member explosion. :) I'm fine to drop the exported register_pstore_blk() API until someone actually uses it, but I want to keep pstore/blk itself and the existing separation between pstore backing devices and pstore storage logic so that configuration happens at the storage level, not the backing device level. My intent, for example, is to migrate ramoops to pstore/zone, etc, and remove all the ramoops-specific configuration which is common to pstore/zone. -- Kees Cook ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 359D0C4363C for ; Wed, 7 Oct 2020 18:40:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B825721707 for ; Wed, 7 Oct 2020 18:40:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Z+pf3UsZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728127AbgJGSkj (ORCPT ); Wed, 7 Oct 2020 14:40:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726323AbgJGSkj (ORCPT ); Wed, 7 Oct 2020 14:40:39 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43E3CC061755 for ; Wed, 7 Oct 2020 11:40:39 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id x22so1809802pfo.12 for ; Wed, 07 Oct 2020 11:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xXW7LOkGsdr16DDohWm1S0zfTBlg5Yr0tvbTwZjyTlk=; b=Z+pf3UsZNiwu7xHh5ZQ9hZ+01ELjMbt2ed1X/ipL8w/k7hNHtgncWNAVjKR3tsKPXK vCdHRxspE/9bKTjmH6JyrvJ8l0A2xMrHq8foZR3ST9oSHzIguMUC7dILekx/k47JGsQH Bqmly9MJM+mmsLUmVY58dWE/53egUiOhO/MQs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xXW7LOkGsdr16DDohWm1S0zfTBlg5Yr0tvbTwZjyTlk=; b=dwnJxD9kbjxA6Uw9C4Z3SrWTrhzvfU7hrOURJL8Mtw3SbFD4+gSiohjI3JWrGLK7Ct vKyDyfyY//2PKWF/mEyYZp5lwc0wTYEbZFr+9zUkMShXZdLlqVC0/9npVHtcKtveTD6f W6H/Mz44vCiAEpKSxYOOfkT+e9i2Tshnd3g8YsFH+MqTA/s++fLzV6WDJQggncqQBBsL 1odS8KrnpHAZMODQiynAMPb6fY0u56rMYwBh/tOgQV4zxCI5jRIw61PJqmCzh4rEYza8 rwaYUNPqlzxsyBZnsJs9r24HmW65LpmbEbSGXIAGMUSM/A6uHXQJvzWdqC3dxE+hRXrb g8aQ== X-Gm-Message-State: AOAM530W9444555sUUT2pE7SO4e2gy7+ayzb1GnbcNnpV2NRr2STqtO4 bqNiqk/+aSc8hw1PHEvDkOOg9g== X-Google-Smtp-Source: ABdhPJx/izEb8o0j/KKQex6oJFq4oBwmBu/eZG5unfLyOm1bgO2WRau8jJCJqiM22rH4iSy75gAgpg== X-Received: by 2002:a17:90b:e87:: with SMTP id fv7mr3817625pjb.187.1602096038809; Wed, 07 Oct 2020 11:40:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id r6sm3889904pfq.11.2020.10.07.11.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 11:40:37 -0700 (PDT) Date: Wed, 7 Oct 2020 11:40:36 -0700 From: Kees Cook To: Christoph Hellwig Cc: WeiXiong Liao , linux-kernel@vger.kernel.org, Richard Weinberger , linux-mtd@lists.infradead.org Subject: Re: use case for register_pstore_blk? Message-ID: <202010071130.7EA00291@keescook> References: <20201006155220.GA11668@lst.de> <202010070007.8FF59EC42@keescook> <20201007075537.GA12531@lst.de> <20201007083715.GA15695@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007083715.GA15695@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 10:37:15AM +0200, Christoph Hellwig wrote: > Looking at this more: in addition to the block code being totally > broken, there is really no point in mtdpstore even using this code. > It does nothing but minimal parameter validation to just pass it > on to the pstore zone interface. IMHO writing the mtd code directly > to the zone interface makes a whole lot more sense even if we grow > a non-broken block backend at some point. Something like this: I really don't like this, sorry. I'm using the pstore/blk bits myself already, and I don't want that removed. Additionally I really don't want the structures open-coded in the MTD driver. The whole point was to encapsulate it. I've spent a lot of time clawing pstore back from the brink of open-coded argument and member explosion. :) I'm fine to drop the exported register_pstore_blk() API until someone actually uses it, but I want to keep pstore/blk itself and the existing separation between pstore backing devices and pstore storage logic so that configuration happens at the storage level, not the backing device level. My intent, for example, is to migrate ramoops to pstore/zone, etc, and remove all the ramoops-specific configuration which is common to pstore/zone. -- Kees Cook