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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 7E144C433DB for ; Mon, 22 Mar 2021 17:55:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E49C6196F for ; Mon, 22 Mar 2021 17:55:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231256AbhCVRyn convert rfc822-to-8bit (ORCPT ); Mon, 22 Mar 2021 13:54:43 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:36074 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbhCVRyS (ORCPT ); Mon, 22 Mar 2021 13:54:18 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id A714E60A357B; Mon, 22 Mar 2021 18:54:15 +0100 (CET) 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 Z28JrLjOa-cP; Mon, 22 Mar 2021 18:54:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 0C2A860A357C; Mon, 22 Mar 2021 18:54:13 +0100 (CET) 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 rnKQDEnnD768; Mon, 22 Mar 2021 18:54:12 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id D97E360A357B; Mon, 22 Mar 2021 18:54:12 +0100 (CET) Date: Mon, 22 Mar 2021 18:54:12 +0100 (CET) From: Richard Weinberger To: =?utf-8?Q?Rafa=C5=82_Mi=C5=82ecki?= Cc: Michael Walle , linux-mtd , linux-kernel , Miquel Raynal , Vignesh Raghavendra , Greg Kroah-Hartman Message-ID: <867376179.104878.1616435652773.JavaMail.zimbra@nod.at> In-Reply-To: <9fb7a635-75ed-2840-b751-3ab8764f0890@gmail.com> References: <20210303155735.25887-1-michael@walle.cc> <9fb7a635-75ed-2840-b751-3ab8764f0890@gmail.com> Subject: Re: [PATCH] mtd: require write permissions for locking and badblock ioctls 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 - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: require write permissions for locking and badblock ioctls Thread-Index: MD3YlBDD0Vk+6pgMtjmJD07E01YdqQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- Ursprüngliche Mail ----- > Von: "Rafał Miłecki" > An: "Michael Walle" , "linux-mtd" , "linux-kernel" > > CC: "Miquel Raynal" , "richard" , "Vignesh Raghavendra" , > "Greg Kroah-Hartman" > Gesendet: Montag, 22. März 2021 17:39:41 > Betreff: Re: [PATCH] mtd: require write permissions for locking and badblock ioctls > On 03.03.2021 16:57, Michael Walle wrote: >> MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require >> write permission. Depending on the hardware MEMLOCK might even be >> write-once, e.g. for SPI-NOR flashes with their WP# tied to GND. OTPLOCK >> is always write-once. >> >> MEMSETBADBLOCK modifies the bad block table. >> >> Fixes: f7e6b19bc764 ("mtd: properly check all write ioctls for permissions") >> Signed-off-by: Michael Walle > > Should be fine for OpenWrt tools to my best knowledge (and quick testing). > > Acked-by: Rafał Miłecki Nice! Acked-by: Richard Weinberger Thanks, //richard