On Thu Mar 26, 2026 at 2:43 PM JST, Alexandre Courbot wrote:
> `driver_read_area` and `driver_write_area` are internal methods that
> return slices containing the area of the command queue buffer that the
> driver has exclusive read or write access, respectively.
>
> While their returned value is correct and safe to use, internally they
> temporarily create a reference to the whole command-buffer slice,
> including GSP-owned regions. These regions can change without notice,
> and thus creating a slice to them, even if never accessed, is undefined
> behavior.
>
> Fix this by rewriting these methods to use pointer projections in order
> to create slices to valid regions only. It should eventually be replaced
> by `IoView` and `IoSlice` once they land.
>
> Fixes: 75f6b1de8133 ("gpu: nova-core: gsp: Add GSP command queue bindings and 
> handling")
> Reported-by: Danilo Krummrich <[email protected]>
> Closes: https://lore.kernel.org/all/[email protected]/
> Signed-off-by: Alexandre Courbot <[email protected]>

I'd like to merge this before -rc6 is tagged and drm-rust-next is closed
if possible (i.e. this weekend) - so acks/reviews would be very welcome
if there are no outstanding issues! :)

Reply via email to