On 1/2/2026 11:59 PM, Timur Tabi wrote:
>  
>      fn imem_ns_load_params(&self) -> Option<FalconLoadTarget> {
> -        // Only used on Turing and GA100, so return None for now
> -        None
> +        match &self.desc {
> +            FalconUCodeDesc::V2(v2) => Some(FalconLoadTarget {
> +                src_start: 0,
> +                dst_start: v2.imem_phys_base,
> +                len: v2.imem_load_size - v2.imem_sec_size,

Since this subtraction's values comes from fw, it would be good to use
checked_sub(). Otherwise, this could:

1. blow up if overflow checking is enabled.
2. len can underflow and be entirely plausible but incorrect, causing
unpredictable failures.

I am fixing other similar existing issues in nova-core as well but since this
patch is in flight, it'd be great to fix it in the next posting (it sounds like
there will be a next posting).

thanks,

 - Joel

Reply via email to