From: sashiko-bot@kernel.org
To: "Arun Iyengar" <aiyengar1990@gmail.com>
Cc: linux-sunxi@lists.linux.dev, media-ci@linuxtv.org
Subject: Re: [PATCH 5/5] media: staging: cedrus: vp8: fail the job on a bit reader timeout
Date: Tue, 01 Dec 2026 15:40:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-243597@kernel.org> (raw)
In-Reply-To: <20261201-b4-cedrus-bitreader-v1-5-678ded51faf1@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] media: cedrus: vp8: unchecked timeout in cedrus_read_header()
--
commit f4b231b0b5fc302bcdeb5a41a86796c5156a889f
Author: Arun Iyengar <aiyengar1990@gmail.com>
media: staging: cedrus: vp8: fail the job on a bit reader timeout
This commit records bit reader timeouts in a struct cedrus_vp8_bits state
object so that VP8 header parsing stops after the first timeout and fails
the decode job.
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_vp8.c b/drivers/staging/media/sunxi/cedrus/cedrus_vp8.c
> index bb32232d37ff1..b5ae9a2f9d960 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus_vp8.c
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_vp8.c
[ ... ]
> @@ -522,73 +536,79 @@ static void cedrus_irq_clear(struct cedrus_dev *dev)
> VE_H264_STATUS_INT_MASK);
> }
>
> -static void cedrus_read_header(struct cedrus_dev *dev,
> - const struct v4l2_ctrl_vp8_frame *slice)
> +static int cedrus_read_header(struct cedrus_dev *dev,
> + const struct v4l2_ctrl_vp8_frame *slice)
> {
[ ... ]
> if (!V4L2_VP8_FRAME_IS_KEY_FRAME(slice))
> - read_bits(dev, 1, VP8_PROB_HALF);
> + read_bits(&b, 1, VP8_PROB_HALF);
> +
> + if (b.error)
> + return b.error;
>
> cedrus_write(dev, VE_H264_TRIGGER_TYPE, VE_H264_TRIGGER_TYPE_VP8_UPDATE_COEF);
> cedrus_wait_for(dev, VE_H264_STATUS, VE_H264_STATUS_VP8_UPPROB_BUSY);
> cedrus_irq_clear(dev);
[Severity: Medium]
Should cedrus_read_header() also check the return value of
cedrus_wait_for() for VE_H264_STATUS_VP8_UPPROB_BUSY? If the hardware
bit reader times out while reading coefficient probability updates from a
truncated bitstream, the timeout is ignored and header parsing continues
into the remaining read_bits() calls.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-b4-cedrus-bitreader-v1-0-678ded51faf1@gmail.com?part=5
next prev parent reply other threads:[~2026-12-01 15:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 15:26 [PATCH 0/5] media: staging: cedrus: bound and check the bit reader setup Arun Iyengar
2026-12-01 15:26 ` Arun Iyengar via B4 Relay
2026-12-01 15:26 ` [PATCH 1/5] media: staging: cedrus: h264: bound the wait for the bit skip Arun Iyengar
2026-12-01 15:26 ` Arun Iyengar via B4 Relay
2026-12-01 15:26 ` [PATCH 2/5] media: staging: cedrus: h264: reject a slice header larger than the slice Arun Iyengar
2026-12-01 15:26 ` Arun Iyengar via B4 Relay
2026-12-01 15:26 ` [PATCH 3/5] media: staging: cedrus: h265: reject a slice data offset past " Arun Iyengar
2026-12-01 15:26 ` Arun Iyengar via B4 Relay
2026-12-01 15:27 ` [PATCH 4/5] media: staging: cedrus: h265: fail the job when the bit reader times out Arun Iyengar
2026-12-01 15:27 ` Arun Iyengar via B4 Relay
2026-12-01 15:33 ` sashiko-bot
2026-12-01 15:27 ` [PATCH 5/5] media: staging: cedrus: vp8: fail the job on a bit reader timeout Arun Iyengar
2026-12-01 15:27 ` Arun Iyengar via B4 Relay
2026-12-01 15:40 ` sashiko-bot [this message]
2026-12-01 16:07 ` [PATCH 0/5] media: staging: cedrus: bound and check the bit reader setup Jernej Škrabec
2026-12-01 17:38 ` Arun Iyengar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-243597@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=media-ci@linuxtv.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.