From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796230484; b=X+5iSpvoSDVPp3r3stl2AOo0ac0dMZUAdI7ZCwAs5PufCyt79E4Z17JQBnP25wAA+Aal E3pcgXB7a9bwgKdJzC6ECqGZ9/H9bPBTEMADGqn3O8cXgVh+dr0V4UPkrwfNYKr301iWj Kq5OrYP3DGVSgIEloBra4bW6Et+j7TxPuHuzOE6sSz6LB6tzQ+VP79mOuhxr5TVQsZrJI q5H5AmkmsaOR9prdt09ZFggcWKLb70UtQeiQ14CKZKLzvyXeIyKbyVhFhmHvrmxTsmSAq qGDAWOtJA6rqhCJsWZUjB5cm9QlIBAK4jOH4AfoUnP2E6am4IA1tIIwtQL0xhcUunaA== 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=uxKEMMCLEDBEoCBeklN9pKmqfK/u/0mSYvy789Ws11UWAJ4OXIYgHb/W9aKdvlR62CDY TKLPRJUhDhxOCmGq2HkAChOVn0NwRLrPe3Og5TXlitQjm5d4i2VtXqKsk6Ir2YM3Bp6o4 huAWIGkFf+NTUA8WadeRIo89K93sMgPxbz/zimW2Vv1400lgUEIwiAwFmcbvqEpifanjP GDgh7I39wiF0hzQhxT+9omK63DNTAbTotE+1MBuQoNrV8VDB7y9cUMRGAK1wexw4vrOsm w55DyACdSGfrvjZJzhfYofWESr6CU4VU3JCUVaDxqAlMokJo7vvzHWN/ReWO2YhAMQA== 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.170 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (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 EA60C606A32E for ; Wed, 2 Dec 2026 16:54:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EA60C606A32E 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) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=UDTbhMnu Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-386cf1041cdso14473634eec.0 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=1AePgsbLzjFYFKvhKLSSC/WNbtfJ/7TBX3jAquasL1FQHsWqnQycZk1JLv3DQqS3q1 bp+I+5/uN28iQnhySOyx0fPqam23w3vWErg0qGuDphTERRN9OlgszQg9TPjiJ5V5KZ4t htRZc7XaUWGZrKJ5QIya1qTFJkvBzkcGQAIXZOIogKtqWHa4cTovc4P8mLZ5ZUBC774j u5ueq9O2D4yYNwBOQQWt55QC93SjS2rn10iJ6mF2YTJSJbe7NjhwYPvnuV1DrTGP0lkB /KR0jQOdzcxk0F07ZWEO1aPsky1i90pyul4obzd5VMigDOHLk1oEx0eYYvHvZ/f9xQId SDdQ== X-Forwarded-Encrypted: i=1; AL+hErHP9y0mSqmv6sC6kR7/z4Fj8pv6CpnwnNiELoh1obzkgChyApvjtt6l1W9IsBDHQtuqSc6I9Tmt86GJat0=@vger.kernel.org X-Gm-Message-State: APuU4Z9bN0bJiQuczoHzbznRjwSk/y6tJMUEG341SEzrfaodo2kpw0nF +lex9DPpxFVBLF8YMnykJh04KVy6G0LeBdgU+z90aLubEK6SdTcIfb0k X-Gm-Gg: AZFdTZeGS+1auYvKwTEjy2zNVUn2RknRZ+YdUGVZaC5ujHXMBQa3H5Psv4Dcw4mLGON gBiBoUJQNyDIOFUXsFdg/4Amub3fUgBc4goKLwKyhhqsqvApDtO0haiwV6tFwdxHldjokhntRBV Rzwkwqf5JXFNizyiiKjAeEczXpdtKVBE7CIikLKi8B9esdHOwaQuC5gbKbAUOtOxQjUqodfEAm2 SA2QIcyQ4+nv9/dowa611XWVmt8KNyRO5LBM0POvRSIACcwVeD6lBbhFptINaQ50MfV/7Q9kRYY l6ZYhAEeoAMcdjag7M7xufQ/YiDcjp1/YslDuQHPAdBAPr3TBN/3D+JMtT6eSfs11nP+6bl8Xtt rLB0/9tgRmNescbiq2/fC5ZOAAfdAKee6heqvHt0vIRy+71JAgTjQBrE00jH4vtCiar+T17FahO gtEtGwcHEzKV6WtBJoqFyiWkMhrlq4xemqamzkZRhJtYwvIQRK4/fsnKfOcmHwKIRhnSENDrmvi mxWjJ03MGh3bEEsJD8IB8cSVDWX7b6m45ITNVPSz3nASDtoYONG1asEaKMGZjL0fYyW35nYR3Xo 0zv5uYXchkBy45W1Apmlu+1fXMF6X+DRWfeom3kPWoLnyHM5poH3EV935/QiSXsVGnzAfD+sljv MKK5/NOEP0dHhWQ== 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-kernel@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