From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.156 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796231170; b=JQRkFiQ5k95j48SRxkH4zTqCpjcUoQW5ku57R+qUYtN4ewTKDrOkScfYB6ZR3A6sNUvB oIsS9Ke5GkGcmGcRHNVCK7ZnX36rDwwaRYwm1NcDx0hTer2RkxkrA2zQvjiKFww3fVpot z4cRwZGKJL8ZwyjpW3F4E14YKf2JfOkYjLlq5LCr5kramk1UAI5kv957H10lEASi49+oX qJMaMxCONbHxHhyTvn2tO/Eno5yiZv09/jbKN0yWOlPVyZdRaKOiGuFOVs7mhQgooq0Bg qjqVzHEjlQe3VyhXZHLS12MrBLxgM4uXqK+4UBS8rEfRjY82T+5dYR3wL+DsSbnRlEg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796231170; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b=dKi3v2FHvrz1WzLykQmbAI2nxchVO9lEgAaWnBI+kHWgE6nC4rol55NcBpHhAgh70Y9d 4l5CPRsdrc19ZXjMwVYDXeEIQg5/p2GrLnxTzrOQBu6JogSqZ8+fZr3iB9vF+3/GWq/UR 55jX9KVhqQKbQnnDlIR/aNxXWUhaCgHUtmaDza36iduqOIzVE2p+JzygW5PUMnsQ9cXqA n4+ro5Dlu9jq4JGpRzMX18BIhgTx3GjRM//Em7G1wUWSexCIOQTPl47hPB0DCLwD3fDUz JjkI60T0rVJ8M16ziJFPGOSWRo9fMbJ5dp2SR/1HnnLX5kftpULHLVs3dNlkYDhrbhg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=ragnatech.se; spf=pass smtp.mailfrom=ragnatech.se; dkim=pass header.d=ragnatech.se header.i=@ragnatech.se header.a=rsa-sha256 header.s=fm2 header.b=F+2OHuwc; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b="v/o2Hwqf"; arc=none smtp.remote-ip=103.168.172.156 Received: from fhigh-a5-smtp.messagingengine.com (fhigh-a5-smtp.messagingengine.com [103.168.172.156]) (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 07301606A331 for ; Wed, 2 Dec 2026 17:06:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 07301606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ragnatech.se Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=ragnatech.se header.i=@ragnatech.se header.a=rsa-sha256 header.s=fm2 header.b=F+2OHuwc; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=v/o2Hwqf Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3A77B14000FC for ; Wed, 2 Dec 2026 12:06:09 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 02 Dec 2026 12:06:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech.se; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1796231169; x=1796317569; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b= F+2OHuwcf9RQE0ADL3FF3Z67LOGtjKrUrpN62wCMKipaPNx7BIrL4U7Mx1ABHAbf 711/AWeafs1BZLHniQ1Z5k948NISSTpZ1YnTzqu6eHuvBFaP09DhT08Alxrk5Y9I jebHTieGaBp4R16G3572LU0vwdtayss24dgoks1tmVSsQgSKONWrBwramiS817Dm QF2CCRD80QH1IxQnX+ikQObqwtdGewZBlEJ41QfPA5fHyIEmacWF3Z6nuwR/vPVf KhL+KaBZIhHIxyFQgOUec5zMkYJBbbu2MlR1doX9NP19yvZnXSbHdH1t4LOvNcLP 0ra5z7elBOMUJQRsgGS97Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1796231169; x= 1796317569; bh=aRnsoXgsmCzjDJ1TVNMTixKIIW1PAbUujEz2NihgjGk=; b=v /o2Hwqf0U08hXqukoncZBB1usHL+OVu+x0ncb7TNSLldMpeTlbeGtecYTp3ltC3J WiRcQDXVXny4gGKQeDg15+Rcu10m75w103UmhTNELsLoWmJYFd5sCmFxZjKrBuwR b4dM9alOr4GsNBqs90GWcO5+yujdKHZW5htqvGhcivxyGBWU3PQ53J7AP+EeHh6f 9YR0dalQOZM75rP4DpAP4fsZcPTED27aKcSnz8ytX7SPnUUZwMFVvoZt5xZU//ju 1YAtrdBUuTqnmsnNM5sLTfnsSMfk+m8g82Hwou12I2VqShOyGsc642bNgTocSYvb hPbbm+xGwTyeI0dxk/ngw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=ragnatech.se a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796231169; d=ragnatech.se; mf=PG5pa2xhcy5zb2Rlcmx1bmRAcmFnbmF0ZWNoLnNlPg==; rt=PGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc+; s=fm2:rsa-sha256:nFvgcKQnoBfuuh5kiSoX9iXmQt8kvwbTVscSbIzeruRZrS5 g29us7KbaE2u1VRQGHzRCnkKAuUlmY7fX4iZfzZaPUtMYHQ0ed2pnoqHRpGIwNUB MjhD4ge93sKt7Rg3igcNmnlA1MaiKzKUkE1E/xsq6k0Z9W6ASHv2PvtSLeZucS00 l5QIkWJZ2a7jhabwh6rf2594Bff84yEpHjqU4goq2aFIjbP8F3uXwX5jnGrdvQrf vR12K1l4EcuclolRqYin4+w8LaMu+Z5yYY2wmUmKJwPUrVgIlE+a9zF/k4fwQ2hC Qkp9dxgQxN0ROyTmiNazg36Wi9oB+atPnP9SYHQ==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=13; hn=cc,content-disposition,content-transfer-encoding, content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,references,subject,to; Message-Instance: m=1; h=sha256:8xo6Vk6oAboeWvwTifOCtzc1krTY2kjS73QRC2kNPnU=:PDubLnqWChn8F2mRffq1eI5WkPFNmZGIqypHwPbWBqI=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFU7wSrIOfGMf+Jv5ZATHexEl8a1/5W6fjpQv1+7i7zfVXmn99kgmKsqfuRHc8vrY l0fcedvsSs1PQ4s+EDofWBey55iYtvfxXnDP2/aOvfJYGrYu/WEMKGNyY4ZA/W+iXzc1X3 uqkKVZHKPivywtmz/eMQgTz23kWhYy2R1IGnau/3g6r+mcrmLwtkG8RqKZrxgP9Mhn6zP/ PC4yw3K4o0MbdW9Nmx4eviTPtF+FmK0U1TECdvER5u6zgPeQK3+jCml28KyzSCxGtbEECF KQNqPBwsdzqtSaDWBP50HtcG5dXFwClU/jtV9MVInGOotSbgcCz23mwCYPIG1S6PYJnNg2 KUafacYc8LUId9oz/rMyf58hSaABHF5P4eqEpU4UFP0GJSDnTfaPJilwyzr7UBx+dG377s w1wFy9h74Y2Lco5NMFXmAGeHkHnV152M7xHb8xzAlM2SSPNz5yw6KPkQCeRjGkGhZNrOQe DnxmomtdWrxmQ8ug25vqqgHdu9e97V8criiyQaNibW9XSfz10pnvU7Qs1CsX5+u2zShb8W gbotNPaukteorMOMw+2HfTLrIxGs2t5BJwdEbJ0NRSDzjB9Tc+d9JEbmHpCgraAjCX/ATo PvG1rNsJPEuSXNE1QWuJatAdHjldxixNp/6T/GLnxQBkZAd9IoEwA1s7Yjiw X-ME-Proxy: Feedback-ID: i80c9496c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Dec 2026 12:06:08 -0500 (EST) Date: Wed, 2 Dec 2026 18:06:06 +0100 From: Niklas =?utf-8?Q?S=C3=B6derlund?= To: Hyeonjun Hong Cc: Mauro Carvalho Chehab , Geert Uytterhoeven , Magnus Damm , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/2] media: rcar-isp: Fail buffer preparation if the ConfigDMA buffer is full Message-ID: <20261202170606.GL3157946@ragnatech.se> References: <20261202163100.GH3157946@ragnatech.se> <20261202164311.745594-1-hyeonjunhong330@gmail.com> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261202164311.745594-1-hyeonjunhong330@gmail.com> Hello Hyeonjun, On 2026-12-03 01:43:11 +0900, Hyeonjun Hong wrote: > Hi Niklas, > > On 2026-12-02 17:31:00 +0100, Niklas Söderlund wrote: > > ... This check while also setting the new overflow flag will return > > -ENOMEM ... > [...] > > ... Which will be propagated and returned here ... > > I do not think it is propagated. The block handlers ignore the return > value of the write callback and return 0, e.g. rppx1_ccor_fill_params(): > > write(priv, mod->base + CCOR_COEFF_REG(0), 0x1000); > [...] > return 0; > > None of the write() calls in the rppx1_*.c handlers is checked, so > rppx1_params() returns 0 after the buffer is full. In the userspace > model, with only patch 1/2 applied, 700 header-only CCOR_POST blocks > give 2047 pairs written and rppx1_params() == 0. You are correct, my bad. And that's not very nice and likely something that should be fixed.. I can't think of a nice idea right now other then patching all rppx1_*.c handlers, let me think on it. Or if you have a nice idea? I think fixing this design flaw is the right solution. Or if we go another way changing the write() callback to void so it is obvious the return value is not used. > > > I don't like adding a flag for this, and it's not needed... > > Understood. Would you prefer one of these instead? > > a) No flag, keep counting in the callback and check the count > afterwards: > > if (desc->count++ >= RISP_IO_PARAMS_MAX_PAIRS) > return -ENOMEM; > > and in risp_io_params_buffer_prepare(): > > if (desc.count > RISP_IO_PARAMS_MAX_PAIRS) > return -ENOMEM; > > b) Make the rppx1 block handlers check and return the result of > write(). That is the proper fix but touches about 170 call sites > in rppx1. If we can't think of something smarter I think this. Or do option (a) and switch the writer callback to void to make it clear the return value is not used. > > c) Drop patch 2/2 and leave it as is. > > Thanks, > Hyeonjun -- Kind Regards, Niklas Söderlund