On Fri, Apr 14, 2017 at 8:41 PM, Avri Altman <[email protected]> wrote: > [Me] >> 2. Turn RPMB and other ioctl() MMC operations into mmc_queue_req >> things and funnel them into the block scheduler >> using REQ_OP_DRV_IN/OUT requests. >> > > Accessing the RPMB is done via a strange protocol, in which each access is > comprised of several requests. > For example, writing to the RPMB will require sending 5 different requests: > 2 requests to read the write counter, and then 3 more requests for the write > operation itself. > > Once the sequence has started, it should not get interfered by other > requests, or the operation will fail.
So I guess currently something takes a host lock and then performs the 5 requests. Thus we need to send a single custom request containing a list of 5 things to do, and return after that. Or do you mean that we return to userspace inbetween these different requests and the sequencing is done in userspace? I hope not because that sounds fragile, like userspace could crash and leave the host lock dangling :/ Yours, Linus Walleij
