Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.177 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796230484; b=i91Qn/yn4aRJDcKXuiVcPcPwfUnRWH9/IaMPFXz1Kc1op9ot9EwvoFkUmYt5scc9TFLv RR9IKsAUtIs8VZQqswfFNBGoN8isTsoBLsx/QKVe3lN2xEThfQxmfq0AhhMElWUcymoK4 +NAoiGWbVgkjfJe6P7HqKy6oBp4CSUsqCU0Nbqe4b1vG41NvwfMKJ6oY4gG0+VF8zivxJ UCY/EjSfyKPTXnP+sqj5c8RId9vXK6fbReCynhzgC1iJ6Wr+h+uGgBJ2vTim0LnW5HShX fwXVJp+NoHBJtqCYAXz0Z6l+q1N6UOS6cRHToJM0XBZXToGYbvex1KkHwFfWDJYYNGw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796230484; 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-Type:Content-Transfer-Encoding; bh=spAT2xiaAISgCUrTAdeuwvI6yLG8HjePEaLNe1Dk8HU=; b=4xbkE11KGIBdUORgUSmp5YMhyX91hG5FI7GbnHOEat1LCo5BdsraMlHojBUSpLxmedZe R9cJaVoSzfOM4eAvpwyNxxoW3ULFO9t0gzzIVufE/xOHFsIJziz2nsg0d8aEwmC/yM+nH wdph7TZf/0qccd1Difw9US8eHiOpIaubhpL2eAUVGGNyoT7lHwgujiXvlaQUe7M3pJIPU HgObY8ZMho/tttueBbXa54rYbHBmV9toSa0Eqok99mj7qhWEPVZ+1F2ox6LbejldXOsmC omZXAaoJ654CDXBXHWFTgON/+aNxNKlLdzCtbrieDmN05VKPrUvm0vzlbxaHctK3Wow== 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=UDTbhMnu; arc=none smtp.remote-ip=74.125.82.177 Received: from mail-dy1-f177.google.com (mail-dy1-f177.google.com [74.125.82.177]) (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 E0BA3606A322 for ; Wed, 2 Dec 2026 16:54:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E0BA3606A322 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 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=UDTbhMnu Received: by mail-dy1-f177.google.com with SMTP id 5a478bee46e88-38699cf08dfso18600424eec.1 for ; Wed, 02 Dec 2026 08:54:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796230483; x=1796835283; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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=spAT2xiaAISgCUrTAdeuwvI6yLG8HjePEaLNe1Dk8HU=; b=UDTbhMnujD4wSlLUBuQO3OhaV8vLAvep3Jzgb9oBPvcUgrHYEct3ofyzr5G6KbdWQp o2hTINldAwGWe5Hi+mXnQxq9jQL/tkUT/aTWSojE9SNmn4zQtFSeOILEMqAZkF9ylnVV Wcg/joAU2uLKsQKaZ/LQi7ospwgOAozWbW9VxvTCmxDu9Luzeu6aLRbxppqpPxFC9NmC WIQ9q4ycTwfHvsk1SrrnzQU/OJhtvwp2zHoiy8YVmagrCXvD2nhzxM8EeCNestlSyEvj h1CD3VPrGih6MkpUkXUT6AKfJ2brR6HH4wipIYiZT0LuKblLScdiqk6t1UOSMHsEOZPL eT7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796230483; x=1796835283; h=content-transfer-encoding:content-type: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=spAT2xiaAISgCUrTAdeuwvI6yLG8HjePEaLNe1Dk8HU=; b=ZFKxgf22W7dRh2uRw0kZpb7a/9RpAwIzgv0Z7QznSkOguRQafgq985f9M6lCWOZe3O RtiFBnyk4mBi5MNqlvvz7h82dCsfFcCF5p0pVtgS50tF+xhVTef4twjbCnVwBVOwf69P BtNkHGUMdoeErZP4mdODMGH6Iw75dZ7oUsYY25Mow/4MWe+kpwPq9t3Ze7KhfKjezZJn Fs7+CjGdGUVeULNsrhx/izAzsSLO50adoqOMHnRLLydmw9mF4x2B+1J+wthN9EIej35i ZLy4zUZN8R/zL8Pi2zWsTyEZFxWiR1cNhDbUkQRCytX4pjipvupCF70fSPEXZBj45iQu dEqg== X-Forwarded-Encrypted: i=1; AL+hErGpyXnvJSoeE4GE0uYAnN1vWDhtKFezN0Cofu3NRuxf8LEJAG8HVlCuyqxF148V7TrGAIoszwEuXlmIPQ==@vger.kernel.org X-Gm-Message-State: APuU4Z87iUnfW7MqEhZPTGt+yG8TxKgE3au+DHFLhU/HeewfnNefC5TU isoaclXsctTmgmODBXkWASse8Vw/0HQ2m9brn095g3BkuSyMdpnM7j+E X-Gm-Gg: AZFdTZcNe/i5G3nwG3rjkGI2PKXnArW3uV3rqOCG4UTt6N1BkCR/tbpJuX9OfWI9VeW FxIKbLSDNQCJ/i8+WurUpzPrvxWtEGAD3oZsMkRR3DUMEAtA3MfBaGKNf8/j+oI1F9DPChOvnPq UA8iwAS6RN0cRHFBekLhGlDO50om/v1HHSyi4uaDtggVykI5NduB7OBm5rxgOSnfDZC+KYedPDT n6UiLd1o9W3s9yVwEFy0rUYnEwZG+RmDx8I8VPVWXbna0lZroTgv+CLuXHQxPTa5S/jWvE0QO0g jYwt4mXSQA0lWpmSMU6+ULjAWVyINbQnEW8to7w2+UpQM6s0XpgVr8lhWZY2NLW4orbk7Ei0k1+ KRKi8HASgrilFT3AUUQ3ZLlfB/p3NNGWz3x+6vJcTOljytiFNz4+lGGPtWdGcGW8oK/tUKSGgaz PZIrZ+tkEWjW41icWFIaz9JBUEk20eoXbJ0UO6+Cd5EHOVQSxUTLNOrUguoC8cZMjT/3mRaxnlF l/jpmACCOF4MRjvLUfnXmoc/0TrGi+wQU5MM1VmWEQPoaRfJJ2kysp7jlSdHRm2GQg9MOVBlUbv CAFRK4IsCIrVTS8CLimzvYRN3nDwau80qmqYNT/8MNqq7Ua5C/PBHxhdllrjhDt4lbiccoR4Qx+ NftPWuY3nN3+XlA== X-Received: by 2002:a05:7300:c001:20b0:386:d2a2:135b with SMTP id 5a478bee46e88-386d2a213e1mr22655676eec.39.1796230482815; Wed, 02 Dec 2026 08:54:42 -0800 (PST) Received: from hyeonjun-ThinkPad-X13-Gen-1.. ([124.197.199.8]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-385646633d0sm206392559eec.3.2026.12.02.08.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 08:54:41 -0800 (PST) From: Hyeonjun Hong To: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Cc: Jacopo Mondi , Jai Luthra , Mauro Carvalho Chehab , Daniel Scally , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] media: rppx1: Validate and process a copy of the parameters buffer Date: Thu, 3 Dec 2026 01:54:19 +0900 Message-Id: <20261202165419.750564-1-hyeonjunhong330@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261202161251.GF3157946@ragnatech.se> References: <20261202161251.GF3157946@ragnatech.se> X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Niklas, Thanks for the quick review. On 2026-12-02 17:12:51 +0100, Niklas Söderlund wrote: > Can't this be fixed in the v4l2-isp helpers instead of fixing every > user? Yes, I think it can, and it would be the better end state. Today the copy is the driver's job. The kernel-doc of v4l2_isp_params_validate_buffer() says drivers should copy the buffer to kernel-only memory after v4l2_isp_params_validate_buffer_size() and then validate the copy. rkisp1, mali-c55 and c3-isp do that, rppx1 is the only user that passes the vb2 plane directly, so this patch only fixes one user. But nothing in the helper enforces it. A helper that does the size check, the copy and the block validation in one call, with the driver passing the destination, would make it hard to get wrong. That is a larger change though: it touches all four drivers and overlaps with Dan's "Introduce v4l2-isp reset buffers" series, and I can only compile test the other three drivers. So I would suggest taking this patch as the minimal fix for now, and I can look into the helper rework once Dan's series has landed. Would that work for you? Thanks, Hyeonjun