Received: by 10.213.65.68 with SMTP id h4csp787254imn; Tue, 20 Mar 2018 15:36:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELu2vOH/T/N2jg5N2KnLyHitTX9kNilWPkrmlNHH9Sw69aa6PZimm5bUViAVAqvu9G77u78g X-Received: by 10.98.198.146 with SMTP id x18mr14974086pfk.22.1521585410733; Tue, 20 Mar 2018 15:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521585410; cv=none; d=google.com; s=arc-20160816; b=oJQYQhcCGlSmCkUrXZ85H1MjDfEDolTKT66f5YpdGIJwOFp4XO2d1aL2lYJJauN5il OoIXQamH5jhBNgEXLlDqbdihTqGF0vvxtd3S7Kll3sYBT4elErXJ8rVRGLUrMlq8VPJ5 F1iiHE+3+LH1myqJCq6CRD73NWg6X0d7ArrqsV5wUce1JurorvU7QUlxNBwzShoC7tqq HSNlXJJ+wolhWCi4XpfBvnMMQ81YNFQG2yKanTuPOJwHrCucCCyYimbWXJzd+vZB8Z7R sgzGJuNGqu51x6SP9uK5xj6KfxjAr6iFqN38MHBJVg9YvzVgodUxdeefrlOCVCZguCom NQYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=yhBfW9D7ba2E4S6UwRqwb6+O6m92YMTji/6F/FJKmsE=; b=bhSEms/nHvxjdfHCQgdARZrPbdZKyLLJd8qfHB6xjpadfmqc1sQZWijM82vgwIzgT2 joBgiYS7V5E62LiEQUpRx+Gi3wCQHkA62ydzGWElFeSZdQedjPJ2Mq4VvvB5aezXzfea Vwsp58B/qSzzK+aSJQEOZFDqeo3lvpU1Ukn5vOkaZ7p6xyGR+T0mTwsc3RGFLVw2kn25 FPFzkzNAh/rG2+fozGpA+8SbA3GSfLeOiGVLsz9lkSZwJHjTcMQIh4TZKDJxuUp40C6x u/TbV3coiQIJ/8zUNzOqBTcktwaCmR7YM5Qe8jdPwoPnpx4HOx3Ha456eRwAroXL0m6b xJQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y62si2034766pfd.52.2018.03.20.15.36.36; Tue, 20 Mar 2018 15:36:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbeCTWfH (ORCPT + 99 others); Tue, 20 Mar 2018 18:35:07 -0400 Received: from mga11.intel.com ([192.55.52.93]:57215 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbeCTWfF (ORCPT ); Tue, 20 Mar 2018 18:35:05 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 15:34:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,337,1517904000"; d="scan'208";a="26638768" Received: from sbauer-z170x-ud5.lm.intel.com (HELO sbauer-Z170X-UD5) ([10.232.112.135]) by orsmga007.jf.intel.com with ESMTP; 20 Mar 2018 15:34:38 -0700 Date: Tue, 20 Mar 2018 16:09:08 -0600 From: Scott Bauer To: Jonas Rabenstein Cc: Christoph Hellwig , Jonathan Derrick , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/11] block: sed-opal: ioctl for writing to shadow mbr Message-ID: <20180320220907.zdzf7baag6haaonm@sbauer-Z170X-UD5> References: <9f94be9c32887aacdcba75bd6a3902d0350eb987.1521482296.git.jonas.rabenstein@studium.uni-erlangen.de> <20180319195224.GA3380@lst.de> <20180320093604.qge2sdnc5jrud6kg@studium.uni-erlangen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180320093604.qge2sdnc5jrud6kg@studium.uni-erlangen.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 20, 2018 at 10:36:04AM +0100, Jonas Rabenstein wrote: > On Mon, Mar 19, 2018 at 08:52:24PM +0100, Christoph Hellwig wrote: > > On Mon, Mar 19, 2018 at 07:36:50PM +0100, Jonas Rabenstein wrote: > > > Allow modification of the shadow mbr. If the shadow mbr is not marked as > > > done, this data will be presented read only as the device content. Only > > > after marking the shadow mbr as done and unlocking a locking range the > > > actual content is accessible. > > > > I hate doing this as an ioctls. Can we make this a sysfs binary file > > so that people can use dd or cat to write the shadow mbr? > I already thought about providing a sysfs interface for all that instead > of using ioctls. But as I am pretty new to kernel programming I do not > have all the required insight. Especially, as writing the mbr requires > the sed-opal password I am unsure how a clean sysfs interface to provide > the password together with a simple dd would look like. > Moreover I already have a patch that changes the 'void *data' argument > to setup_opal_dev to a kobject pointer. As far as I know, this is the > first step to get into the sysfs hierarchy. But as I do not have access > to an NVMe drive and have no idea about its implementation, this change > works only for the scsi side. Post what you have as an RFC (review for comment) and I will test for the NVMe side, and or start a port for NVMe. It doesn't have to be perfect since you're sending it out as RFC. It's just a base for us to test/look at to see if we still like the sysfs way.