linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: "Bart Van Assche" <bvanassche@acm.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: linux-kernel@vger.kernel.org, maxim.uvarov@linaro.org,
	joakim.bech@linaro.org, ulf.hansson@linaro.org,
	ilias.apalodimas@linaro.org, arnd@linaro.org,
	ruchika.gupta@linaro.org, tomas.winkler@intel.com,
	yang.huang@intel.com, bing.zhu@intel.com,
	Matti.Moell@opensynergy.com, hmo@opensynergy.com,
	linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 0/4] rpmb subsystem, uapi and virtio-rpmb driver
Date: Wed, 06 Apr 2022 20:12:07 +0200	[thread overview]
Message-ID: <310d20a04bdaf40672592d9ffa950606d2ceaff7.camel@gmail.com> (raw)
In-Reply-To: <e72812a9-1e5b-a826-d490-62ed23d94116@acm.org>

On Wed, 2022-04-06 at 10:32 -0700, Bart Van Assche wrote:
> > It's the SCSI BSG driver, in fact, we don't have a dedicated UFS
> > RPMB
> > driver in the kernel. RPMB is a well known LU, we are using
> > userspace
> > tools to issue SCSI commands directly to the UFS RPMB LU via
> > ioctl()
> > from the BSG device node in the /dev/sg/ folder.
> > 
> > Here is the BSG part of the code in the userspace tools:
> > 
> >           io_hdr_v4.guard = 'Q';
> >           io_hdr_v4.protocol = BSG_PROTOCOL_SCSI;
> >           io_hdr_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD;
> >           io_hdr_v4.response = (__u64)sense_buffer;
> >           io_hdr_v4.max_response_len = SENSE_BUFF_LEN;
> >           io_hdr_v4.request_len = cmd_len;
> >           io_hdr_v4.request = (__u64)cdb;
> >                                                                    
> >                                                          
> >                                                                    
> >                 
> >           ioctl(fd, SG_IO, &io_hdr_v4))
> 
> Hi Bean,
> 
> I'm not sure where the above comes from? The Android RPMB client uses
> slightly different code. Additionally, the retry loop around the 
> submission of SG/IO commands is very important. See also the 
> check_sg_io_hdr() call in send_ufs_rpmb_req(). See also 
> https://cs.android.com/android/platform/superproject/+/master:system/core/trusty/storage/proxy/rpmb.c
> 
> 
Bart,

It is from the ufs-utils.

So, do you vote to add the UFS RPMB driver based on this new framework
to resolve this conflict?


Kind regards,
Bean

> Thanks,
> 


> Bart.


  reply	other threads:[~2022-04-06 19:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  9:37 [PATCH v2 0/4] rpmb subsystem, uapi and virtio-rpmb driver Alex Bennée
2022-04-05  9:37 ` [PATCH v2 1/4] rpmb: add Replay Protected Memory Block (RPMB) subsystem Alex Bennée
2022-04-05 21:59   ` Bart Van Assche
2022-04-06 11:21     ` Alex Bennée
2022-04-05  9:37 ` [PATCH v2 2/4] char: rpmb: provide a user space interface Alex Bennée
2022-06-16 15:09   ` Harald Mommer
2022-06-16 19:21   ` Arnd Bergmann
2022-04-05  9:37 ` [PATCH v2 3/4] rpmb: create virtio rpmb frontend driver Alex Bennée
2022-06-16 15:44   ` Harald Mommer
2022-04-05  9:37 ` [PATCH v2 4/4] tools rpmb: add RPBM access tool Alex Bennée
2022-06-16 13:13   ` Harald Mommer
2022-04-05 14:54 ` [PATCH v2 0/4] rpmb subsystem, uapi and virtio-rpmb driver Bean Huo
2022-04-05 15:43   ` Alex Bennée
2022-04-05 17:03     ` Bean Huo
2022-04-06 11:22       ` Alex Bennée
2022-04-06 17:19         ` Bean Huo
2022-04-06 17:32           ` Bart Van Assche
2022-04-06 18:12             ` Bean Huo [this message]
2022-04-06 20:20               ` Bart Van Assche
2022-04-07 16:28                 ` Bean Huo
2022-04-06 17:27         ` Bean Huo
2022-04-22 14:21 ` Alex Bennée
     [not found] ` <20230531191007.13460-1-shyamsaini@linux.microsoft.com>
2023-06-01  1:02   ` Zhu, Bing
2023-06-01  5:31     ` Ilias Apalodimas
2023-06-01  5:48       ` Sumit Garg
2023-06-02  8:25         ` Ilias Apalodimas
2023-06-12 17:06           ` Jens Wiklander
2023-06-13  0:49           ` Shyam Saini
2023-06-13 16:47     ` Shyam Saini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=310d20a04bdaf40672592d9ffa950606d2ceaff7.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=Matti.Moell@opensynergy.com \
    --cc=alex.bennee@linaro.org \
    --cc=arnd@linaro.org \
    --cc=bing.zhu@intel.com \
    --cc=bvanassche@acm.org \
    --cc=hmo@opensynergy.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=joakim.bech@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maxim.uvarov@linaro.org \
    --cc=ruchika.gupta@linaro.org \
    --cc=tomas.winkler@intel.com \
    --cc=ulf.hansson@linaro.org \
    --cc=yang.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).