[PATCH 4/4] drm/panic: Add a qr_code panic screen

Alice Ryhl aliceryhl at google.com
Thu Jul 4 09:37:55 UTC 2024


On Thu, Jul 4, 2024 at 11:28 AM Greg KH <gregkh at linuxfoundation.org> 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


More information about the dri-devel mailing list