From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71D4139657E for ; Fri, 27 Mar 2026 12:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774613734; cv=none; b=I93oBoHzoD8YGCQKuy16tsjc8Z+EaUjALngHHHy4E2b1wiDpH9vgboLiRj84U83Uj7o0HD7m5wP+Uv+DGz9nEG/5uDJTnDR+UgbCDe4Adoq6wyeE4i4ojvlMgLfW8LNRY4frOB6Y/hPm99FfMkEs0OTV1N0DWTKk4DdYsDR8aTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774613734; c=relaxed/simple; bh=e0WIOgSqj1OlhWXDT4pWI4PijDyOj35H98POHvnQUoA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=o+DK9YNHbX/olIuZ0CzAC5eXoMxspKw0mDyQGyB2t2f690GST6XRPulfrrSyCewjCHODW6bWR3ttHPT9hO0X7gDFHZtn+D/OnltvouDnEzpgQ5eaBTuvx4nmdEk6RNJmRvW0aKqmPHttizN0ggEvXVjdaxYTm6QF2g2n1gqHvtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=bzAePsec; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="bzAePsec" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20260327121528euoutp01e24e42e748c854329dfbbb063d72fdf1~gscidtjBc1804518045euoutp011 for ; Fri, 27 Mar 2026 12:15:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20260327121528euoutp01e24e42e748c854329dfbbb063d72fdf1~gscidtjBc1804518045euoutp011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1774613728; bh=Gt0hsKHO3Cgzjjf5L93b3hjhxYMQSZOOI4z05CSOlYI=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=bzAePsecg6ZhZQ+sNDeta9zk76+8Il3P2leuoF2O9uZh3mYVsBbtkmLkclN/Qh8R6 B4FRIPBbtlYHHgUJRbgRXS2+VS28bF7SRqA2TZJjGSY+MUP80AzxLzd7+dvGVeL8WJ D9ED3fzOKikwhGmGFHRtpT1v5Kxh7xLokYF0Iwkc= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20260327121528eucas1p2e1c10492efc27790045dce75e5285311~gsciM5inD2033920339eucas1p2B; Fri, 27 Mar 2026 12:15:28 +0000 (GMT) Received: from [192.168.1.44] (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20260327121527eusmtip248d4a0b5562c627beb58483a0db4afc0~gschWzMbh0852608526eusmtip2W; Fri, 27 Mar 2026 12:15:27 +0000 (GMT) Message-ID: Date: Fri, 27 Mar 2026 13:15:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] firmware: thead: Fix buffer overflow and use standard endian macros To: Drew Fustini , Ulf Hansson Cc: drew@pdp7.com, guoren@kernel.org, wefu@redhat.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Dan Carpenter Content-Language: en-US From: Michal Wilczynski In-Reply-To: Content-Transfer-Encoding: 7bit X-CMS-MailID: 20260327121528eucas1p2e1c10492efc27790045dce75e5285311 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20250403131056eucas1p16076c6e4dce1f1217dc327250c419e37 X-EPHeader: CA X-CMS-RootMailID: 20250403131056eucas1p16076c6e4dce1f1217dc327250c419e37 References: <20250403131051.1097423-1-m.wilczynski@samsung.com> On 3/26/26 20:14, Drew Fustini wrote: > On Thu, Apr 03, 2025 at 03:10:51PM +0200, Michal Wilczynski wrote: >> Addresses two issues in the TH1520 AON firmware protocol driver: >> >> 1. Fix a potential buffer overflow where the code used unsafe pointer >> arithmetic to access the 'mode' field through the 'resource' pointer >> with an offset. This was flagged by Smatch static checker as: >> "buffer overflow 'data' 2 <= 3" >> >> 2. Replace custom RPC_SET_BE* and RPC_GET_BE* macros with standard >> kernel endianness conversion macros (cpu_to_be16, etc.) for better >> portability and maintainability. >> >> The functionality was re-tested with the GPU power-up sequence, >> confirming the GPU powers up correctly and the driver probes >> successfully. >> >> [ 12.702370] powervr ffef400000.gpu: [drm] loaded firmware >> powervr/rogue_36.52.104.182_v1.fw >> [ 12.711043] powervr ffef400000.gpu: [drm] FW version v1.0 (build >> 6645434 OS) >> [ 12.719787] [drm] Initialized powervr 1.0.0 for ffef400000.gpu on >> minor 0 >> >> Fixes: e4b3cbd840e5 ("firmware: thead: Add AON firmware protocol driver") >> Reported-by: Dan Carpenter >> Closes: https://lore.kernel.org/all/17a0ccce-060b-4b9d-a3c4-8d5d5823b1c9@stanley.mountain/ >> Signed-off-by: Michal Wilczynski > > Acked-by: Drew Fustini > > Is Ulf the person that would take this fix? > > Thanks, > Drew > Hi, I think it would be great if Ulf could take the patch. Best regards, -- Michal Wilczynski