OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [RFC PATCH] virtio-rpmb: fix spec land mine in max_[wr|rd]_cnt


On Mon, Jun 19 2023, Alex BennÃe <alex.bennee@linaro.org> wrote:

> Even if 0 meant no limit we are still limited by the field size of the
> request. That said for a maximum sized partition (* 80 128 1024) you
> could only actually request 40960 blocks before running out of device.
> Perhaps it would be better to mark 0 as invalid?

I don't think we can mark 0 as invalid, as it has been in a published
spec and implementations may be already using it.

That said, what is the actual limitation? Knowing nothing about RPMB, is
it 64k (what can fit in block_count), or the 40960 you mentioned above
as a value defined by other reasons (maximum size of a partition -- I
assume that cannot change?)

>
> Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Cc: Harald Mommer <hmo@opensynergy.com>
> Cc: Will Deacon <will@kernel.org>
> Signed-off-by: Alex BennÃe <alex.bennee@linaro.org>
> ---
>  device-types/rpmb/description.tex | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/device-types/rpmb/description.tex b/device-types/rpmb/description.tex
> index 1dae3fd..2ce8a5b 100644
> --- a/device-types/rpmb/description.tex
> +++ b/device-types/rpmb/description.tex
> @@ -37,7 +37,7 @@ \subsection{Device configuration layout}\label{sec:Device Types / RPMB Device /
>     The values MUST range between 0x00 and 0x80 inclusive.
>  \item[\field{max_wr_cnt and max_rd_cnt}] are the maximum numbers of RPMB
>     block count (256B) that can be performed to device in one request. 0 implies
> -   no limitation.
> +   no limitation other than the maximum value you can store in \field{block_count} (65535).

So, I'm now wondering what these fields actually refer to. They are u8,
so obviously less than what fits into be16... are reads/writes limited
by anything else?

>  \end{description}
>  
>  \devicenormative{\subsection}{Device Initialization}{Device Types / RPMB Device / Device Initialization}



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]