Re: [PATCH 07/27] gpu: nova-core: add optional ucodes firmware loading

Timur Tabi <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 2026-08-18 at 20:52 -0700, John Hubbard wrote:
> +                if file.is_empty()
> +                    || matches!(file, "." | "..")
> +                    || file
> +                        .bytes()
> +                        .any(|b| b == b'/' || b == b'\\' || b.is_ascii_control())
> +                {
> +                    return Err(EINVAL);
> +                }

I'm not sure if this is needed because request_into_buf() will reject any crazy filename that
would result from an invalid FILE tag.

> +
> +                let size = usize::from_safe_cast(self.get_u32(b"SIZE")?);
> +                if size == 0 {
> +                    return Err(EINVAL); // TODO: Use ENODATA once available.
> +                }

FYI, ENODATA is already in linux-next.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.