Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp668447pxx; Wed, 28 Oct 2020 13:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXuwIFeks4XTbwfZh9KkX/lgDUydjmHIIG6YzmSczyYEYJ52LkH6g35kjqbk1eliF1P9+O X-Received: by 2002:a05:6402:1d13:: with SMTP id dg19mr799804edb.217.1603918713531; Wed, 28 Oct 2020 13:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603918713; cv=none; d=google.com; s=arc-20160816; b=cmn65YMeVvJFbo6HaVKj2KEcGhhnQuTPzX7w0nz2AymTG5x/GYMNABCBx21yFRjAqT EadyvCBiRHVWwgwqZTSwN3sFijHdD2LBa41OtSQvU6xO3yeinLunzkW/f7Xg7X7wD92j z0MMwH7qb1AReWl4qfpGS5VOT2dAL6wRLCx1HLHvxxSUwZCSOvryr1A96az2R6FOhMqg 5wCII82fTEVmVKgcw+AV0jLbzpBoEB8nZA57Uc1o1zsTP3HYEw48LD6UUtXg7dTYokfL qkP2AoqQB2uqVrI2UvcAIhDGiIOEn2+BJuDql+xfaHRcZdXxHZHOniFriqDYRdLDN73a JpJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=eEu0/+a78FZ3InsjmpXBp2HbwyzTazaJ6br0Jbthhsk=; b=F2M/XvfEApfD89tQ5wS9vCG3GAEfW/SQ/KguTgNvcuqxmdCIl8PPN5WP86/UkYxoee wKyvDcZMKO9+AHiGvQafOlftbPjgpZML3OOWRTAC7lscR6ZU7OI+mzcfsIX76czUEp7D wd/EMycgksZ/SIXi/OXkxfKFYM47oTmu18XVyTuX2+Q7wcXhLKnidq6tZfEfe/AyY8ye ZYwEAeeq0/DPcIeIKI0EzRatnePRcUOkQgJubyLwWaMxJjWt7MQtQijsTp7y+huoqIPa 4CedyIC3xkR5F4Y003kAloPIESNEQ6LaVOztujjbLjVc8M3JQXl53ef2dLGP1+o148el jdaA== 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 8si179023edx.375.2020.10.28.13.58.11; Wed, 28 Oct 2020 13:58:33 -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 S1802808AbgJ0Th3 (ORCPT + 99 others); Tue, 27 Oct 2020 15:37:29 -0400 Received: from verein.lst.de ([213.95.11.211]:42634 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2504178AbgJ0Th3 (ORCPT ); Tue, 27 Oct 2020 15:37:29 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 207E667373; Tue, 27 Oct 2020 20:37:26 +0100 (CET) Date: Tue, 27 Oct 2020 20:37:25 +0100 From: Christoph Hellwig To: Ulf Hansson Cc: =?utf-8?B?5Yav6ZSQ?= , Christoph Hellwig , Arnd Bergmann , Greg Kroah-Hartman , Linux Kernel Mailing List , "linux-mmc@vger.kernel.org" Subject: Re: [PATCH 3/3] mmc: rtsx: Add SD Express mode support for RTS5261 Message-ID: <20201027193725.GA5579@lst.de> References: <1600999061-13669-1-git-send-email-rui_feng@realsil.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 01:54:46PM +0100, Ulf Hansson wrote: > > For information security purpose, some companies or business users set their notebook SD as "read only". > > Because a lot of "read only" requirements from those companies or business users, notebook vendor controls reader write protect pin to achieve it. > > Notebook BIOS might have option to choose "read only" or not. > > This is why we think write protect is more important than speed. > > I understand that it may be used, in some way or the other to provide > a hint to the operating system to mount it in read-only mode. > > Although, if there were a real security feature involved, the internal > FW of the SD card would also monitor the switch, to support read-only > mode. As I understand it, that's not the common case. Yes. "Security" that relies on the driver to fall back to a different mode doesn't work. > > > If you prefer to consistent behavior, I can ignore the write protect switch for SD express. > > At this point, I prefer if you would ignore the write protect switch > in the SD controller driver. Same here. > According to Christoph, it should be possible to support read-only > mode via PCIe/NVMe. You may need to add some tweaks to support this in > the PCIe controller driver, but I can't advise you how to exactly do > this. The NVMe driver already supports write protected namespaces. I'll ask my contact in the JEDEC SD card working group if there was any consideration of the read-only handling for classic SD vs NVMe.