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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC27BCDD1D6 for ; Mon, 30 Sep 2024 19:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Subject:References: In-Reply-To:Message-ID:Cc: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=b/2uAZDF5tH3fokBdZPJgorddTgZRTm+f1RFdXesPPo=; b=1W0cFJ0QBV5ianrIY2KrUGlRkx LanG3+Pqx6Kloij6Gib+AiKAHaF9fU525tgjAqI2ejihpw5NvTohXa2Bm3yLtY5AN1eN2mkVCgc6x DxTApXkaYDMqjt2bKFa+5Hj2SxrFVBPlb+Z0CIVpDOKfDYbZ9iyTRzbrenAU/QzCCfFJUwsMmDgqI VBR3yDagJjdLLheIdLwzo1NqEPyqAheplliQoc9YkcYKn8k9o8wr9SDG0krxR6Az+mnChSZpSINfR 6eR9Useazh7+ZrSRWYqsY5yBf+53q7684eIwae3hzJTjVzwouuyCR/Fsd0JidqfN98VRK91JDLdTi /TyOcrZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svMTT-00000000glG-30KJ; Mon, 30 Sep 2024 19:54:27 +0000 Received: from lithops.sigma-star.at ([195.201.40.130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svMTD-00000000ghC-0Byx for linux-mtd@lists.infradead.org; Mon, 30 Sep 2024 19:54:26 +0000 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 665C463CF3E8; Mon, 30 Sep 2024 21:54:08 +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 PkYbUnff558D; Mon, 30 Sep 2024 21:54:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id CFEF963CF3E7; Mon, 30 Sep 2024 21:54:07 +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 GHvTMUPSlfO9; Mon, 30 Sep 2024 21:54:07 +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 9286964CD87E; Mon, 30 Sep 2024 21:54:07 +0200 (CEST) Date: Mon, 30 Sep 2024 21:54:07 +0200 (CEST) From: Richard Weinberger To: Daniel Golle Cc: chengzhihao1 , Miquel Raynal , Vignesh Raghavendra , robh , Krzysztof Kozlowski , Conor Dooley , John Crispin , linux-mtd , devicetree , linux-kernel Message-ID: <1249604143.124110.1727726047386.JavaMail.zimbra@nod.at> In-Reply-To: References: <251386789.117942.1727612762462.JavaMail.zimbra@nod.at> <364911897.123906.1727721820227.JavaMail.zimbra@nod.at> Subject: Re: [PATCH RFC 2/2] mtd: ubi: add support for protecting critical volumes MIME-Version: 1.0 X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF130 (Linux)/8.8.12_GA_3809) Thread-Topic: add support for protecting critical volumes Thread-Index: aeGJjhImZZ32HQn7G/dgrummX5ojmQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_125411_248136_4D6FBC04 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org LS0tLS0gVXJzcHLDvG5nbGljaGUgTWFpbCAtLS0tLQo+IFZvbjogIkRhbmllbCBHb2xsZSIgPGRh bmllbEBtYWtyb3RvcGlhLm9yZz4KPj4gbGlrZSBhIHViaXJtdm9sIC4uLiAtLWkta25vdy13aGF0 LWltLWRvaW5nLgo+IAo+IFRydWUsIGVuZm9yY2VtZW50IGRvZXNuJ3QgbmVlZCB0byBoYXBwZW4g aW4ga2VybmVsICh0aG91Z2ggSSB0aGluayBpdCdzCj4gbmljZXIsIGJ1dCByZWFsbHkganVzdCBh IG1hdHRlciBvZiB0YXN0ZSwgSSBndWVzcykuIHViaS10b29scyB3b3VsZCBzdGlsbAo+IG5lZWQg dG8gYmUgYWJsZSB0byByZWNvZ25pemUgY3JpdGljYWwgdm9sdW1lcyBzb21laG93LCBhbmQgdGhh dCBjb3VsZCBiZQo+IGRvbmUgYnkgY2hlY2tpbmcgaWYgdGhlICd2b2x1bWUtaXMtY3JpdGljYWwn IHByb3BlcnR5IGlzIHByZXNlbnQgaW4KPiAvc3lzL2NsYXNzL3ViaS91YmkqXyovb2Zfbm9kZS8K CkV4YWN0bHkuCkkgYWxzbyBkb24ndCBtaW5kIGFkZGluZyBhIGluLW1lbW9yeSAndm9sdW1lLWlz LWNyaXRpY2FsJyBwcm9wZXJ0eSB0bwpVQkkgZGlyZWN0bHkuIEknbSBqdXN0IGEgbGl0dGxlIGhl c2l0YXRlZCB0byBjaGFuZ2UgdGhlIFVBUEkgb3IgdGhlIG9uLWRpc2sKZGF0YSBzdHJ1Y3R1cmVz IGZvciB0aGlzIGZlYXR1cmVzLgogCj4gSWYgeW91IHByZWZlciBnb2luZyBkb3duIHRoYXQgcm9h ZCBpbnN0ZWFkIEkgd2lsbCB3b3JrIG9uIHBhdGNoZXMgZm9yCj4gZ2l0LmluZnJhZGVhZC5vcmcv bXRkLXV0aWxzLmdpdCBpbnN0ZWFkLgoKWWVzLiBXaGVuIGRvbmUgaW4gdXNlcnNwYWNlLCBpdCdz IGFsc28gbXVjaCBlYXNpZXIgdG8gb2ZmZXIgdGhlIC0taS1rbm93LXdoYXQtaW0tZG9pbmcKZmxh ZyB0byBzdGlsbCByZW1vdmUgYSBjcml0aWNhbCB2b2x1bWUuCk5vIG5lZWQgdG8gdG91Y2ggVUFQ SS4KClpoaWhhbyBDaGVuZywgd2hhdCBkbyB5b3UgdGhpbmsgYWJvdXQgdGhpcyBhcHByb2FjaD8K ClRoYW5rcywKLy9yaWNoYXJkCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX18KTGludXggTVREIGRpc2N1c3Npb24gbWFpbGluZyBsaXN0Cmh0dHA6 Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtbXRkLwo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81BEC14F9D9; Mon, 30 Sep 2024 19:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.201.40.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727726053; cv=none; b=dRljzEELEMo1gE88/bxJ8P9eJyPbflXjl4pa84vUvICMcYPYBCexhZRid7/oOLJ+AqwACz7U1b480EPXehlGLzkigEZeTCPAD2kETWD9E4dfJkyYz8VuvMi4RrMB/0O+MCm1Bn/bUnY3sbV1/n0U6Lns9Pjpbq/zZP0w4VISDdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727726053; c=relaxed/simple; bh=RbHXxABmTEXZ06KmbyemtTfZCSrMOmq194z3V+gF2Bw=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=EdA95OrGzGNY8ajUdEvxugOL9TcIL4l/9x/bPeM1fhDVTDLHhkCrOvmYekZV/EgRdFxAcuNRrRDT8vFI+Db4YjqCfc5OX14aIVrX6NXbuGBCK+brv3YmQOaQ83hZne1pbq6wnv4JF7WSptI/e8xHL/nobmqOH8jxj/pdEMb9qZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=195.201.40.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 665C463CF3E8; Mon, 30 Sep 2024 21:54:08 +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 PkYbUnff558D; Mon, 30 Sep 2024 21:54:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id CFEF963CF3E7; Mon, 30 Sep 2024 21:54:07 +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 GHvTMUPSlfO9; Mon, 30 Sep 2024 21:54:07 +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 9286964CD87E; Mon, 30 Sep 2024 21:54:07 +0200 (CEST) Date: Mon, 30 Sep 2024 21:54:07 +0200 (CEST) From: Richard Weinberger To: Daniel Golle Cc: chengzhihao1 , Miquel Raynal , Vignesh Raghavendra , robh , Krzysztof Kozlowski , Conor Dooley , John Crispin , linux-mtd , devicetree , linux-kernel Message-ID: <1249604143.124110.1727726047386.JavaMail.zimbra@nod.at> In-Reply-To: References: <251386789.117942.1727612762462.JavaMail.zimbra@nod.at> <364911897.123906.1727721820227.JavaMail.zimbra@nod.at> Subject: Re: [PATCH RFC 2/2] mtd: ubi: add support for protecting critical volumes Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF130 (Linux)/8.8.12_GA_3809) Thread-Topic: add support for protecting critical volumes Thread-Index: aeGJjhImZZ32HQn7G/dgrummX5ojmQ== ----- Urspr=C3=BCngliche Mail ----- > Von: "Daniel Golle" >> like a ubirmvol ... --i-know-what-im-doing. >=20 > True, enforcement doesn't need to happen in kernel (though I think it's > nicer, but really just a matter of taste, I guess). ubi-tools would still > need to be able to recognize critical volumes somehow, and that could be > done by checking if the 'volume-is-critical' property is present in > /sys/class/ubi/ubi*_*/of_node/ Exactly. I also don't mind adding a in-memory 'volume-is-critical' property to UBI directly. I'm just a little hesitated to change the UAPI or the on-disk data structures for this features. =20 > If you prefer going down that road instead I will work on patches for > git.infradead.org/mtd-utils.git instead. Yes. When done in userspace, it's also much easier to offer the --i-know-wh= at-im-doing flag to still remove a critical volume. No need to touch UAPI. Zhihao Cheng, what do you think about this approach? Thanks, //richard