Hi Aditya,

Thanks for the review.

On Tue, 2026-09-22 at 11:06 +0530, Aditya Gupta wrote:
> not a suggestion to change anything, just an observation:
> 
> based on this in skiboot:
> ```
> void __opal_register(uint64_t token, void *func, unsigned int nargs)
> {
>       assert(token <= OPAL_LAST);
> ...
> 
> static int64_t opal_check_token(uint64_t token)
> {
>       if (token > OPAL_LAST)
>               return OPAL_TOKEN_ABSENT;
> ```
> 
> along with other usages of OPAL_LAST in skiboot, OPAL_LAST is being
> treated as a valid token.
> 
> there are no handlers for OPAL_LAST and kernel doesn't do
> opal_check_token for this
> 
> I feel the logic should better be fixed in opal to not consider
> OPAL_LAST
> 
As per my current understanding, I assume OPAL_LAST is meant to be the
length of all valid opal tokens, Not a valid call itself.

> at the same time it maybe safer to have length as OPAL_LAST+1 here,
> though it is not necessary, so the patch looks good to me
> 
> Reviewed-by: Aditya Gupta <[email protected]>
> 

Thanks.
~Shivang.


Reply via email to