From nobody Tue Aug 25 14:52:43 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1779486866; cv=none; d=zohomail.com; s=zohoarc; b=QonW/T625F1FUq+sahCnntK/mq1GMhFa0uoqt0Hax+wTpIi334GAcHe5vtzdI725r2xYRjBt9tOIVGS/mzRhAaVx3jGSzm4NrRhOVe4OlQ6R0jKdM7HMqaI9umv1PHuCrkra7ISMkDNeoekEjUmXY/1IeTTHnTz3udhCm5ayRO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779486866; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VHflSMu20nKdvHOnxmUNyotqTmIFf2QXZ6PIwo+aYSw=; b=OwkfcurA7XFb9AZHKsyN1lodTrHCENP9J/dNj4QJ3U5fsYGMLJr38W2lQtyqfs/9shry02g/BfqKKjMbT5zOABoleqhV+PvgRxN7+qXC61qIO2JsyFGUe6b0LQkLzQjltNKS5Jladcdx3yLVSvRr4YN2UX0VqKFje5BQfqRYc6I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779486866752996.4648444104686; Fri, 22 May 2026 14:54:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wQXlg-0000qv-4V; Fri, 22 May 2026 17:50:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wQXkw-0007eC-F2; Fri, 22 May 2026 17:50:10 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wQXku-0002ji-O5; Fri, 22 May 2026 17:50:10 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id BB9AD1AFB65; Sat, 23 May 2026 00:49:19 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id DA09E3B71B4; Sat, 23 May 2026 00:49:23 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1779486559; bh=xmHfeUJz0ZcDqeB1vL/AXC1QJ6Wf1Lm11pgd52X7R5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WaWIazCutnv3SbdfL0/06aRB0DDJxKrxIpeej5GREtdNlRF3Zbh7ysCRId8NBzRH2 XXTMxANADka6DY6ATWpQOF9Ypi+NqNF1BHacHa1vsTIonSsipEwAucGybNO2dWUYwl XAXlw0ZlmHkrM1GD9pNI4qb3/szihDZFbdH4qEPZX4WqGMW4OoIHtmz/x/EeHUjnBq xpFQeSK3rcW0MnmiDtMYgmY6Q9Tb3e7ANP99fz8rP+XC1SjeuECenXWR5IgYwvkScs htKf179ofY7fee7hJZbZ6z8tYpQ925U79VPaxUuA+D7gvIPOVzG6S5zpSvblUI7TRa iSyZMNJzN5cxQ== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [Stable-10.2.3 111/149] hw/misc/bcm2835_rng: Specify valid memory access sizes Date: Sat, 23 May 2026 00:48:43 +0300 Message-ID: <20260522214923.807017-12-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1779486868266158500 From: Peter Maydell The BCM2835 RNG has 32-bit registers only; specify this in the MemoryRegionOps so wrong-sized accesses are rejected rather than getting to the assertions in the read and write functions, and for clarity add the matching .impl constraints. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3394 Fixes: 54a5ba13a9f ("target-arm: Implement BCM2835 hardware RNG") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260501162700.4092512-1-peter.maydell@linaro.org (cherry picked from commit 18b664c90085b0d2be9c2ad8c747e00a7a733402) Signed-off-by: Michael Tokarev diff --git a/hw/misc/bcm2835_rng.c b/hw/misc/bcm2835_rng.c index e4d2c224c8..4492e325b4 100644 --- a/hw/misc/bcm2835_rng.c +++ b/hw/misc/bcm2835_rng.c @@ -93,6 +93,10 @@ static const MemoryRegionOps bcm2835_rng_ops =3D { .read =3D bcm2835_rng_read, .write =3D bcm2835_rng_write, .endianness =3D DEVICE_NATIVE_ENDIAN, + .impl.min_access_size =3D 4, + .impl.max_access_size =3D 4, + .valid.min_access_size =3D 4, + .valid.max_access_size =3D 4, }; =20 static const VMStateDescription vmstate_bcm2835_rng =3D { --=20 2.47.3