Received: by 10.213.65.68 with SMTP id h4csp1762893imn; Thu, 29 Mar 2018 10:31:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/iA1vsbUq65+v+M4F5564kaN1NTiISrc8XS/qgq84FpMF3qS4tzv7Kf/GKV4c1jOTRG/YO X-Received: by 2002:a17:902:e5:: with SMTP id a92-v6mr9153921pla.26.1522344716125; Thu, 29 Mar 2018 10:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522344716; cv=none; d=google.com; s=arc-20160816; b=Qm+tbhaoxoSvTStABkqvH1N1FMIAIIDA/2rc9azhIXog2K+3AJBIWb4IwZLynJ8n8w uYzFjG5L96AGXkNcqAPYRe6EhU558eN7wkIDXWGpo1Zu5Zpm8qACX+XUmrwhfnqIkPbL 9Olfq5ihkGYHeL0DchsSO2UOcJxkpaZQ0O4k+xd8/T6wdngbLU4jtA12lOcAM77Mx8eP Jxl+kx7yRX9X2DS2IIFxse2kwW7zzXl33v2uPZIeWbF0NnB9MVuh0Qp/NKblSl5pfrJS N7my+ww0LuD8I/qkMcuS2lugh9ZNqRyl/rjYPBglKyPMgdaz8UxcP4u/E+JF3K+wIP/u mM9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=BLWYdJfwHt2y4vIV7PObQ8eMkLg3tvK3McYSZNzh+RQ=; b=zczCNHne8t07S2mXsNgcAiyUCiuw4hrlZn2irfz1mo8Ht5VPftFb17usr9TE5C1+gc SyenBWOWIavSZXKCGr7N0GV1Mwt7Lux648BQyeWP01vAwIofMWPjiC1b4qMOThtgmSgU VE5HViDZibbNXCj17keI8Sbg4O5geoHh9zuaRWURbEN69j71lIrOeAL4kKK5cIi3vF3L +jFZ98V7YFc13y5MoodlnlHGxMj1a/EEenCAbwYw38C+VpF1EcOxikX2ft4hHpfutzZ+ fRTnI78tUm9c8qQeHUVC0wgbX/2bgoc7psFTSSPg6BQmEIEIjswm6r3pNpjaP63qDrgg D5QA== 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 l13-v6si6889873pls.210.2018.03.29.10.31.42; Thu, 29 Mar 2018 10:31:56 -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 S1752252AbeC2Ra1 (ORCPT + 99 others); Thu, 29 Mar 2018 13:30:27 -0400 Received: from mx-rz-3.rrze.uni-erlangen.de ([131.188.11.22]:36605 "EHLO mx-rz-3.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbeC2Ra0 (ORCPT ); Thu, 29 Mar 2018 13:30:26 -0400 Received: from mx-rz-3.rrze.uni-erlangen.de (mx-rz-3.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-3.rrze.uni-erlangen.de (Postfix) with ESMTPS id 40BsG82LtGz20YM; Thu, 29 Mar 2018 19:30:24 +0200 (CEST) Authentication-Results: mx-rz-3.rrze.uni-erlangen.de; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: amavisd-new at boeck4.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 204.85.191.31 Received: from uni-erlangen.de (tor01.telenet.unc.edu [204.85.191.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX19TNwEZljGNiQ/HeRKvLPWBThqI4/64NcY=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 40BsFy3V1Lz20T8; Thu, 29 Mar 2018 19:30:13 +0200 (CEST) Date: Thu, 29 Mar 2018 19:30:02 +0200 From: Jonas Rabenstein To: Scott Bauer Cc: Jonas Rabenstein , 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: <20180329173002.5mmhnl4urj4wovyo@studium.uni-erlangen.de> References: <9f94be9c32887aacdcba75bd6a3902d0350eb987.1521482296.git.jonas.rabenstein@studium.uni-erlangen.de> <20180319195224.GA3380@lst.de> <20180320093604.qge2sdnc5jrud6kg@studium.uni-erlangen.de> <20180320220907.zdzf7baag6haaonm@sbauer-Z170X-UD5> <20180321014321.xlkcyvcyr6j3usix@studium.uni-erlangen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180321014321.xlkcyvcyr6j3usix@studium.uni-erlangen.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, Mar 21, 2018 at 02:43:21AM +0100, Jonas Rabenstein wrote: > On Tue, Mar 20, 2018 at 04:09:08PM -0600, Scott Bauer wrote: > > 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: > > > > 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. Just wanted to ask, how to proceed with those patches/what I should do. Using sysfs instead of an ioctl is probably easier to use from userspace _if_ there is a good way to provide the password - which I do not know of :( If nobody else could think of a solution, shall writes to the shadow mbr remain unsupported? I'ld really appreciate feedback and possible solutions, Jonas