On Thu, Jul 4, 2024 at 11:28 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > On Thu, Jul 04, 2024 at 09:11:09AM +0000, Alice Ryhl wrote: > > As long as the above requirements are satisfied, calling > > `drm_panic_qr_generate` should never cause memory unsafety, so this is > > an appropriate list of safety requirements. > > > > (You also require that `data_len <= data_size`, but if this is violated > > you get a kernel panic which isn't a memory safety problem, so it does > > not need to be listed in the safety requirements.) > > Panicing while trying to print out a panic message is not a good idea, > so enforcing this would be nice :) I guess it would make sense to have an if that verifies that `data_len <= data_size` at the top of drm_panic_qr_generate. Alice