From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796139191; b=0dAsYj73WycmH/upwcNMdG/vW0cMNyjg+ZMltS6K9vITRkm2JKkt9d9fhlTZhoAh2bCZ p5fzET9KXi1/EIcjGvc000Lwm7q1Non9PZNuUXSt9l4/An/az0gQ/oFhhmLG7z1B979j9 U+aaKuNeeRAeeAb8+1tDLxBB5uGNXevgqxtrNSjESEC0wOrqH7wQJ60QNAY8q1XpFm4Jg 4zA6yxSY6EW1MhQZiO26o6hPF2ZKV9SG351b1A+m0pOavzrEfn6QNSpMxlZU9ePnhXwbs UgJH9ehvyGvw5EcUKXnQX3h5f/Aoe6hmCgwo3LE+kGYJ6WDhIQqq3ONVvPf8j5uyj1Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796139191; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=i1QuY5yDc2s5rqULzJBwdzuhGfhxCIg0a8SZwNydZTc=; b=3881FL2WZz11eSPSUoPgEWBSUekFozSAR/JD/TSZrZNMsq95uPKxw9Wvb3U9korJ5vpf zCHtw63rhEzM1ktz6Kh0oN94UUpRBZYPjOt4Cse9Ib2cDjVZHc9Kcl6oOgPFRhdsBH2F+ bZmSQ35Q/dT+OLk+QS6tgxi9zeLSmkwPT7LShduWuupLNEjIBhY1umBqAlso404F/r+tM ylP3SGhKsXxsiBsx+3t+CTJGxugP2CSKrYbd1zdbAAv+FWNaiTTciA0FQjJX6wP1HnT7P e4QhDN9ZaazsLi9pizhn+OzAtCAI9fA7mPDhIabw3iBRp0LxeIF6NzVnhBPVZ98paxA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MPnxRK5V; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCACF606A33D for ; Tue, 1 Dec 2026 15:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MPnxRK5V Received: by smtp.kernel.org (Postfix) with ESMTPSA id 329E51F02827; Tue, 1 Dec 2026 15:33:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796139191; bh=i1QuY5yDc2s5rqULzJBwdzuhGfhxCIg0a8SZwNydZTc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=MPnxRK5VE46Vl4l4UyqLntu5jkw4so+DuyApkEmTSANUwexKMBoPhMUSSZ4GCc0yB axuuoky0QlcB+D5KVQghlQKYvVwCZfTXLLINMiyBAgzK5t23mbPOZ23N6k6qpYhqsE lOI0HfnKkEL7uOv+kU0n+MbTfp5Lkgw8ynp/3Aa9HcIVlObAorKyNx9uqw9YqiR7ub 6zYj0KYsK49tRUvroTtKl0PRbNoub7LMdKQYq9Y5JCdgmeZ2P9SAUMWG0ycW6Nh0Hj 72bkSyQGtVyarxzQrpMgZM/pzDKnGEPqWIs+5ZXPLe7Mm/H7GWiLadOpXyNsNR2Z76 FDoTMAgNXVRng== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 4/5] media: staging: cedrus: h265: fail the job when the bit reader times out Reply-To: sashiko-reviews@lists.linux.dev To: "Arun Iyengar" Cc: linux-sunxi@lists.linux.dev, media-ci@linuxtv.org In-Reply-To: <20261201-b4-cedrus-bitreader-v1-4-678ded51faf1@gmail.com> References: <20261201-b4-cedrus-bitreader-v1-0-678ded51faf1@gmail.com> <20261201-b4-cedrus-bitreader-v1-4-678ded51faf1@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 15:33:10 +0000 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [Critical] media: cedrus: division by zero in cedrus_h265_setup() [1] -- commit 4d686e15cd9c521f9969e8cadebfff0d3d9d3130 Author: Arun Iyengar media: staging: cedrus: h265: fail the job when the bit reader times out This commit returns -ETIMEDOUT from cedrus_h265_skip_bits() and cedrus_h265_show_bits() and propagates the error in cedrus_h265_setup() to fail the decode job when the hardware bit reader times out. Link: https://lore.kernel.org/all/20220914150105.209484-1-dmitry.osipenko@c= ollabora.com/ [1] Link: https://lore.kernel.org/all/1733932.VLH7GnMWUR@kista/ [2] > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/s= taging/media/sunxi/cedrus/cedrus_h265.c > index 44539936b550b..a00d7bc705c3d 100644 > --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c [ ... ] > @@ -433,8 +442,10 @@ static int cedrus_h265_setup(struct cedrus_ctx *ctx,= struct cedrus_run *run) > u32 pic_order_cnt[2]; > size_t slice_bytes; > u8 padding; > + u32 bits; > int count; > u32 reg; > + int ret; > =20 > sps =3D run->h265.sps; > pps =3D run->h265.pps; [Severity: Critical] This problem wasn't introduced by this patch, but can cedrus_h265_setup() divide by zero [1] when sps->pic_width_in_luma_samples is 0? Neither cedrus_try_ctrl() nor cedrus_check_pic_size() rejects a V4L2_CID_STATELESS_HEVC_SPS control with pic_width_in_luma_samples set to 0. When cedrus_h265_setup() runs, width_in_ctb_luma evaluates to 0 and is used as the divisor when computing ctb_addr_x and ctb_addr_y: drivers/staging/media/sunxi/cedrus/cedrus_h265.c:cedrus_h265_setup() { ... width_in_ctb_luma =3D DIV_ROUND_UP(sps->pic_width_in_luma_samples, ctb_size_luma); ... ctb_addr_x =3D slice_params->slice_segment_addr % width_in_ctb_luma; ctb_addr_y =3D slice_params->slice_segment_addr / width_in_ctb_luma; ... } This triggers a kernel division-by-zero oops. [1] https://sashiko.dev/#/bug/linux-178e76f9-5ffb-448a-b528-5cd7caf9d21d --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-b4-cedrus-= bitreader-v1-0-678ded51faf1@gmail.com?part=3D4