Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3631554pxf; Mon, 22 Mar 2021 10:58:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+W9kwqKBSFalj7luy9/nbrW/CV5Eniih1Ro2RniQ6Oavhh4Z6umBC8W4O/oBn3f211nJQ X-Received: by 2002:aa7:de11:: with SMTP id h17mr787999edv.83.1616435886469; Mon, 22 Mar 2021 10:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616435886; cv=none; d=google.com; s=arc-20160816; b=rA8hhAYAxTw4YNimWrTHTchG9qE18PdAq5Q/SMKNUEsUziZEdyBLNnvht124Zx40Zd v386b7gMxmO5hrWZBdxLQ3NQdecwubsze09KjYX/S16p83es42Dv8eeJp9bO/B+kRshh WH8aVHyX2sp6+rrswfUbXJTk5V+AfV3yBiSCCDK6Zrz+MFHr9motJGWupwD53XxDUXgx pwUdevUJtoS9omYG8fBO4IlKIra07VFS/TNHXOq/tc+MVUdH1yj+Upn3UqFskG9RwZbQ OfRbajGIwDO6I2uXT347G+BKN5nsbdavxkL8plRmRsWGabUfALfRi5B0v5SuB/nG04wI C1kg== 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=e+8V7nMDApSm3v83Rx2YeAQRRv5MKnb423WPwWMoC7M=; b=p0QilWO8wCycOkJ5UC1FW32ufyA70Eo3o8DQtRvczuho0j+3jJZkNvF6RefiVnJDmi 0iLfZ5hu7L9ZPuIRU01SsC0JETn34DKMs+zbi74/JbEoxitFCbj0/EwJaJO7mLmPZbF/ gT8esJjBSuIKkFDaewAPa2dO2bo77WaZOyfEmjcMFoiaVyxMPKKJ//t4n58TlSqOyVDk Vs6z5s3q2vmh20FqCYYVXKe5d4Z0c86Yy2hQF7OJXvfQ4rB7p+bnpRmJn8stdhxH17EK MQ1zRRUUyQ2Q1n2IybQj8Uex8B/IebL0kVmvYfmvXTii67RTsVJfZFpQGT/sBR5rZUCb BMFw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si12153560eju.124.2021.03.22.10.57.43; Mon, 22 Mar 2021 10:58:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230473AbhCVRye convert rfc822-to-8bit (ORCPT + 99 others); Mon, 22 Mar 2021 13:54:34 -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