| Message ID | 20261102170303.1973892-8-jernej.skrabec@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27058-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mxe881.netcup.net (Postfix) with ESMTPS id 9F7081C3410
for <noreply@patchwork.local>; Mon, 2 Nov 2026 21:55:36 +0100 (CET)
Authentication-Results: mxe881;
dkim=pass header.d=gmail.com;
spf=pass (sender IP is 172.234.253.10)
smtp.mailfrom=linux-sunxi+bounces-27058-noreply=patchwork.local@lists.linux.dev
smtp.helo=sea.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates
172.234.253.10 as permitted sender) client-ip=172.234.253.10;
envelope-from=linux-sunxi+bounces-27058-noreply=patchwork.local@lists.linux.dev;
helo=sea.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id E6E46E5771
for <noreply@patchwork.local>; Mon, 2 Nov 2026 17:35:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=fail smtp.remote-ip=127.0.0.1
ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
t=1793639011;
b=kLLyMJOVPizLnQCjWu9QGFYnxo0nvUjkpmpV89bAAslyPO6Grg937eV7jOwOoEUf6GxJ
+XQhDw6H70x1+milOepnbDvrf8MhxFDukcM0IXkj+iLsbYzqQYb8ek0QUPnaNByq9AV02
v3lqT+O+psiK5dvaXarSCQKlnBolzLe+lOctpDervQDI0Ptj5Z0U4HV5glIyJOJKg3T6f
7mI6Ak5oFd1c5SjrnG1D92I66wyNRegp5Ri8kWOfPREbZJg5ZeDzpZNyeB+uumcapnj7r
wpTK1c5p8ETYxii4MeWbaSvZxTBxrUKkhngI7ju37rCpgQtqgkF9CqW4FhivJTrr6iA==
ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793639011;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Transfer-Encoding;
bh=NKzzwtKTgXz6R9jTvzKIhg/OY56xKISF3o/pTEJt26A=;
b=O2lvOyYRFCZkd2HlngIMj5YYQLhAGbX1pZQPiQjc3ww7JEB4ksFCqwSEb3KEa56x3a9F
dKIAzpU6wnRDz6Y9/81x0RQbdGjjOSmIP821hfsX6N7cEAwQJso9+LK0/Pn9OIW2+h98c
yKzWdbmV4JshjQnesvnKD9RJGXIeJ8gjLgbtKiaIdKsRLSHANAklHBHNxEuNWs5hjufLI
58gMogcUCY1DFsZ7LnZ4yGxeJI2f3+z/OjKaCzV3z4OW0JdUx+hAs0KaoKRsIOX8CDP7n
MiEBw2T3ADLy/A2rodNjdZQ0x7uDHUVcEKYsW4hD9LJhQS4IJu5cAnQVD2Y5STumm6A==
ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=XN8FETN4;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=fail smtp.remote-ip=127.0.0.1
Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 10315607BDE0;
Mon, 2 Nov 2026 17:03:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key,
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=XN8FETN4
X-Original-To: linux-sunxi@lists.linux.dev
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.remote-ip=209.85.128.45
ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1793639011;
b=r49n5SFQyHtogFuV+3iEFvwKgsN6HU6BBNru5fpBaB6Ujyva9eaPU9kf+Zr/9Qy+PQg/
YvZKAvL18VWsi3xVHnzdSllj2Vy7hhN11w1gYpTYTPZBB+WkpL0tggUVbHuzjWHRcLRH+
ymL+Db7Xu/oDoyRluGjBu8UZPYz+KmAgLpDIlfHVW9WoE4WMR8VxAHZwy9Cx3HxryIn7Y
w8CkOfchGZy3J2enYTa/Fu8HtaoLYZAG+UYCzEahkmGju8ig7Kt9waypJ3oA6bH7P75w7
VYGYHl+IZFOPI4XAXWNArbdYB8s/7aSu2ayVGyuSCxz+7wrp4pKlophIT+6X7vcZMvA==
ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793639011;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
MIME-Version:Content-Transfer-Encoding;
bh=NKzzwtKTgXz6R9jTvzKIhg/OY56xKISF3o/pTEJt26A=;
b=2g21WR9Yyvw3bI6LTxcet1bHWePPqHj0gLxjr4rA31rRayHoTYkLDF/N1BWDT8TF1ale
cYgq2mHjUkJBBMGOHHqw0ds8sn+rW6xRiykfQadXFpQUaZnzHwchHtQi2HDvnQuO7s1bF
RQhFlWdWxfINTx5GA2Z99az8wQtdck3eYBJeodiSwA/V3E34pBNzI+9f3Chn5B8w+VppT
ZEOMhbujNdYA/Qen+XMTy0tWw1oDgPCUN0aWw3Lbru/3SjPHnfxFxlZgE2tltC8q1I6Ov
yEh1euNvVt8DFnVK22e1+G56IZ19SpaE2uo83I0ZTDSJm6ZnfOKi9F+ZzumXnkzbv4A==
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20260707 header.b=XN8FETN4;
arc=none smtp.remote-ip=209.85.128.45
Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com
[209.85.128.45])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest
SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F545607BDD7
for <linux-sunxi@lists.linux.dev>; Mon, 2 Nov 2026 17:03:30 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2F545607BDD7
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f45.google.com with SMTP id
5b1f17b1804b1-4a215e64962so29299445e9.1
for <linux-sunxi@lists.linux.dev>;
Mon, 02 Nov 2026 09:03:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793639008; x=1794243808;
darn=lists.linux.dev;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=NKzzwtKTgXz6R9jTvzKIhg/OY56xKISF3o/pTEJt26A=;
b=XN8FETN47UdQi0w+N+yGgxnd11rJ+OwJ2lgP8KCOV7YN0AaC02gk1E7E5kX4oczrg9
/sa5vH6uZcGcZyRB4qTQeJYnDdFp8kzPCK1YZBbhSc68vgjH73kDdoxRj/WKeJJVRpJM
E+tWcFsWk5uKv3fmbiCyB8AfRSCB4o8m2Gs4b/R2yac4iJdGUj77moK772izvr2doog0
MFRpMDgiyKPy1LQto4iqSBhP5xLkjfHyf/WcxkWpP6muildB+AlgdXh9/MY4Ag+FVIBp
lY7TQZTYhdFbnmZTLv2nupakY9ccasnSY/v3+9A136jt+HxdEv8j9TjY5o7g/ePc0aXt
BdTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793639008; x=1794243808;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=NKzzwtKTgXz6R9jTvzKIhg/OY56xKISF3o/pTEJt26A=;
b=oLw4/RoDWyuZ4/1B4V4yVTSHCqh44btIFde7/b+zXeAB+2wCcupuJ6t1aMeRMUczM1
8FHZZXh+/T8FwYRGBU4Ld9RiqYqfDEizH/W1n4E48FCdvtFS4z5wajEdsVHiRFpBaRQf
OxBDk++FBaMrD+wHCao7CqPT2e268bQg4kSQfjtRXaUsuqNjiVnKUZMZHstM8tTrd/2b
sryTBSCEYrL6KUL9rQDkwpKHqJau+1KjQQUNsyyb6CMu6cVsWGXVhVZmc2qR3di4pC7+
t6RYZWhDyqlgvNFOJi8rqRhOCwwKOTqM7DAAerkDkz1mFPd2k1CchinaEAOiLQBmpsMu
gw0w==
X-Forwarded-Encrypted: i=1;
AKwUvBzkGb4tZtxZmO+xGNIep+7GdkY+5Q6a+xZdd6Dgf0RL8TI3a1/EKcpSgzJD8JEE2oYKw78lBsOPTNUhBQ==@lists.linux.dev
X-Gm-Message-State: AFq9FYL+ZEa7I0wjokcsvVuZeTBt9k+/d9gd9kgH+1q0Jvp4ZjQobag6
xOMG8NOV+Jngo9N7ZdCmQpcQeu0QpE04A+I0DhIW6842jBiOjYccBMy+
X-Gm-Gg: AYBFou3A3Tuq7HKuc6PMKKZHbMiZE/2z7/QdqmH9BNZhwaApVD3lllvUGIIhXWMw31Y
a+KRm0EKAXQO3rv0ANXXKdGQAP6RuA2RUUuxXg2xMuWtuFJ3q2I6NvCD3zdYF7TfOCm8tOfBSMt
QtGiomqvncGEnaITk9GHb63KSo+5lVbo0HHop1oTo09eeiw7aeyAA70XOxmDekXjjW9v7ORepWD
BG2FeFPYUtTSZWZGeIffW7KDQZhXOIO0Ts0wuwITulCvBFrNlklZs9cJ+LcR9vExwts78g0cof/
P9Tv2AvKaSlyIa3j+3etUyvIx6eYrKkTEBM8dSvhGY8ZmY9voT5EBuYpuiTbTiHlZSRiuLNLpDN
kL92LHnXiF5XSYKV11FLR5Pm//LFyRfhG8R8366aL1jWVGGg2irgfeN4enWno5HNPAmparHA5OP
kUtLOc8g6sT1fCj0CYKTOWxb6kxrEASVgxrvhL6fujYzK748D657K8/aKzoKnzDuzP7tFM3+wQW
9NgMqE2wcjZrI2I+2ACfj4AfQjgdQOZTDYmgxpkAz6iIj+F3fR4jYMEwkaDqDcWhxF+zaNqg8eu
uQzm41Fwpi7z9GdhKpqPXvQyy8gq/pWrE+5raZHleGypTsp0iJMhsCKqGUAjXonPXUPlucPcdcL
tZG84qroORTGI8UqbwZmb5QHW81JaGJEsTnwLpmNRT8kHVSS1l3cVcV2vuR3VaHVo86sxVpFwbV
qVm1Y82zsGhV+WCFE2nH/SkjjLQ9ngkWah2jOVG1M3ao+XW7pXvQulpJrFobeBu6WCrTsif2yq7
DExEgRnnRZR65lQMA0Wzw6EwSD9R7xbO5npoCacF9rHGlf09A==
X-Received: by 2002:a05:600c:1385:b0:4a3:5991:718 with SMTP id
5b1f17b1804b1-4ac182dc0a1mr261716365e9.16.1793639008306;
Mon, 02 Nov 2026 09:03:28 -0800 (PST)
Received: from jernej-laptop (194-152-27-116.dynamic.telemach.net.
[194.152.27.116])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-48e71a4d3cesm23362309f8f.7.2026.11.02.09.03.27
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 02 Nov 2026 09:03:27 -0800 (PST)
From: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>
Cc: Maxime Ripard <mripard@kernel.org>,
Paul Kocialkowski <paulk@sys-base.io>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Chen-Yu Tsai <wens@kernel.org>,
Samuel Holland <samuel@sholland.org>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
linux-media@vger.kernel.org,
linux-staging@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev,
linux-kernel@vger.kernel.org,
Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: [PATCH 07/10] staging: media: cedrus: validate VP8 frame size
Date: Mon, 2 Nov 2026 18:03:00 +0100
Message-ID: <20261102170303.1973892-8-jernej.skrabec@gmail.com>
X-Mailer: git-send-email 2.56.0
In-Reply-To: <20261102170303.1973892-1-jernej.skrabec@gmail.com>
References: <20261102170303.1973892-1-jernej.skrabec@gmail.com>
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Post: <mailto:linux-sunxi@lists.linux.dev>
List-Help: <mailto:linux-sunxi+help@lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev>
Precedence: list
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Server: rspamd-worker-8404
X-Spamd-Result: default: False [0.31 / 15.00];
BAYES_HAM(-5.50)[100.00%];
RBL_SENDERSCORE(2.00)[172.234.253.10:from];
SUSPICIOUS_RECIPS(1.50)[];
DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed),
No valid DKIM,none];
ARC_REJECT(1.00)[cv is fail on i=2];
R_MISSING_CHARSET(0.50)[];
MAILLIST(-0.18)[generic];
MIME_GOOD(-0.10)[text/plain];
BAD_REP_POLICIES(0.10)[];
HAS_LIST_UNSUB(-0.01)[];
FORGED_SENDER_MAILLIST(0.00)[];
FROM_HAS_DN(0.00)[];
TAGGED_RCPT(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns];
FREEMAIL_CC(0.00)[kernel.org,sys-base.io,linuxfoundation.org,sholland.org,collabora.com,vger.kernel.org,lists.linux.dev,lists.infradead.org,gmail.com];
RCPT_COUNT_TWELVE(0.00)[14];
RCVD_COUNT_FIVE(0.00)[6];
ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG];
TAGGED_FROM(0.00)[bounces-27058-noreply=patchwork.local];
TO_DN_SOME(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[194.152.27.116:received,209.85.128.45:received,100.77.114.92:received];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from];
FROM_NEQ_ENVFROM(0.00)[jernejskrabec@gmail.com,linux-sunxi@lists.linux.dev];
R_SPF_ALLOW(0.00)[+ip4:172.234.253.10];
MIME_TRACE(0.00)[0:+];
FORGED_RECIPIENTS_MAILLIST(0.00)[];
MID_RHS_MATCH_FROM(0.00)[];
RCVD_TLS_LAST(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[]
X-Rspamd-Queue-Id: 9F7081C3410
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: INBOX
|
| Series |
staging: media: cedrus: assorted fixes and VP8 4K support
|
|
Commit Message
Jernej Skrabec
Nov. 2, 2026, 5:03 p.m. UTC
A VP8 key frame can change the frame size. If userspace doesn't
reallocate the capture buffers, the hardware writes and reads past the
buffers, which shows up as IOMMU page faults and decode timeouts.
Check the frame size in try_ctrl, like for the H.264 and HEVC SPS.
Fixes: 3c39a16d30d8 ("media: cedrus: Add support for VP8 decoding")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
drivers/staging/media/sunxi/cedrus/cedrus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index 45deebddb630..756243795de8 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -77,6 +77,11 @@ static int cedrus_try_ctrl(struct v4l2_ctrl *ctrl) (sps->pic_width_in_mbs_minus1 + 1) * 16, height)) return -EINVAL; + } else if (ctrl->id == V4L2_CID_STATELESS_VP8_FRAME) { + const struct v4l2_ctrl_vp8_frame *frame = ctrl->p_new.p_vp8_frame; + + if (cedrus_check_pic_size(ctx, frame->width, frame->height)) + return -EINVAL; } else if (ctrl->id == V4L2_CID_STATELESS_HEVC_SPS) { const struct v4l2_ctrl_hevc_sps *sps = ctrl->p_new.p_hevc_sps; unsigned int bit_depth, max_depth; @@ -270,6 +275,7 @@ static const struct cedrus_control cedrus_controls[] = { { .cfg = { .id = V4L2_CID_STATELESS_VP8_FRAME, + .ops = &cedrus_ctrl_ops, }, .capabilities = CEDRUS_CAPABILITY_VP8_DEC, },