From nobody Mon Nov 23 04:44:17 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1792426982; cv=none; d=zohomail.com; s=zohoarc; b=e8/fd9QAmnxsB7Fz4bM5Glu+KTwoBiOsNSENOgQ4TedWsDKLU0kNS1h9M9khN1XMNrJhGP1J/26ZSTozFR22+joVM0ML3eTlHVwr/Fjmv6eBCjRcWS12cVnfoXIhVfm4jugH0mgFVky/cqwTZpof+aQ5CGrzBotPCbq9MxcmV6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792426982; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Iick0y2AGxfKXDLVnntT9WyV/jbAX0Ak+ln5YPzpJ0o=; b=K/o1KucrdwKObLJAImjSNAjZdYdwiKWtEPihnjrQUwT/Amor4/lr2Nw92ZzgWlIYx9+eFOWR4SUc8RFCcdtX94rJsnavspJ0GohHTaZiGPT5KrcxPcp3kkkueBB0TqKCtbZRnxLz893mmaiOaZJXjzVSeAR/J2f+tuPDt86V70s= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792426982387808.6422808508917; Mon, 19 Oct 2026 09:23:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xIq8B-0007an-8m; Mon, 19 Oct 2026 12:22:35 -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 1xIq8A-0007aP-3k for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:34 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xIq88-00010O-8s for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:33 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4a16aaf2067so28956315e9.0 for ; Mon, 19 Oct 2026 09:22:31 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1f2cdc342sm3100095e9.13.2026.10.19.09.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 09:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792426951; x=1793031751; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Iick0y2AGxfKXDLVnntT9WyV/jbAX0Ak+ln5YPzpJ0o=; b=Ig050lYiL8CXEIKyvLff7r6qP0COYDt3FqLjsucto+fnvzXBwR7Lex/szBlH7a1ruD cxEfL2af5FsRWMr0sLVFDUVkGNztqHkOkdK3Vq3uqfosRe1P3OvBYBO8aJc+kMTWXzkS O9OeVKarQkggGL7vNRzM83tF6wxqvB6WL6xaoFos7LjLgJgQARx/TS8diAIT6Vzm91Fd lDmfeeCJTXZSf0M5EN3aBG80wih9QRyyjo80AFEffIG8yxHDRLXFtWPAS9zHCVXNV88r MvzVMz1lXyjGZgJ32buvHddqPdhr3co8iguoG6kYePWzaU306bdfbPA8lwbj9TRIA+oS qcsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792426951; x=1793031751; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Iick0y2AGxfKXDLVnntT9WyV/jbAX0Ak+ln5YPzpJ0o=; b=qHsYlItdankRkhGcB27l+WAl6btT8grqU77bDTT569XTz+ZY5lA4tzkk5HWTMQ9Nvj jdKa+KgGFugRQCOAWS78tBQlELM/aauZXov6dEkEAllR+JifhGRey3kYNG2TtdkOZUwb l3UAmQgVDoN2XPO2HJ1t/lLHJS1Rg4Rzz15fwdqmst06sDvJWsp6SPKUlgmm/86HMz34 CsB+emYX9OC5JdH1/Q9HJrbHwl/VQQ3LGxZuoZ0XnkgPR/lhP0yF+BQh+bwtXhTtmDRn G77cWIV89yw3XGv24Xu+J38keYi84b2v4uZIOir9+JOLDGRg4sY54AWNjxtnl1TT5Jxm 8z5g== X-Forwarded-Encrypted: i=1; AKwUvByEzdg6wk87VmDJ5T7HOgmX80UVGTX7xi7ztzI1psWKHiiwD4VPtdbyy4i4bTLLOZNkvuBJbFC2Zd/M@nongnu.org X-Gm-Message-State: AFq9FYKJtB+QloxgIOnYApUEVSp6sOYSFjwvcapBV+KPZ3KOf4uEga24 zhC6mK3o3dhaMGVUXqL1sp3HXxx2EZRtBid/8SyOwmIghjUjhT6ynpXD+2EVP+1IOg0= X-Gm-Gg: AYBFou1tm/P9xa822lqbAAbuVOa4HjuA+dSGM7Wl7jtFou0LGxP5VKeW52n2VbKtSmD K3rkt30Ka5FG3hlWhPcKYi1opJ8DmO+vM/iKA19zgJ5snrSDRIsUl7fMGKtzBjsTZdqwHGO7CqG 6kzdRO2oOCIdfrRqMFsxP/uqlQZt54YmcJ4tN43VJAhXHifMPtW9sOyCjMnEh/I5CWrPKsVqkoR D69ofglJNumfbS6FDKLR6g38lW5neOzVbYQZtrAL1CdlKZ1lqUuv6I0frP2JWPkNKY/9O3CBpPd 2/ci9BkUlGPk64D9OlzWpEObh7npvo0xQOLMRJDDGjeZnmWT6Z7i2Dv4XXv2MnKvMHOrNik+TJe SLoV3LDU+heivUF1ykVL3OV62GBd+KsLq9hheS0AiOhKHuhf2SlGH2Q5TgyJSaklTl+DIoId3oc 2tmKlj6Dr0gyGoGLMIQMNmHMPw3yccds0qKqpqyA+WE5wxQmeMbmMvH1HK9YL2PCTHRB5VoVBq1 I8ccsxC1D7qZ7ee58JoMp1byVqRQQ5bhb4m3y4kU63ROLFojjSnBc2ivAgjR6qoqu/IEXxXmZmD YRefeDigQ5jJeA== X-Received: by 2002:a05:600c:3547:b0:4a1:7c56:d4e2 with SMTP id 5b1f17b1804b1-4a1d7608dcemr170293325e9.16.1792426950700; Mon, 19 Oct 2026 09:22:30 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 1/4] hw/intc/exynos4210_combiner: Fix group register range check Date: Mon, 19 Oct 2026 17:22:14 +0100 Message-ID: <20261019162217.3272337-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261019162217.3272337-1-peter.maydell@linaro.org> References: <20261019162217.3272337-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 @linaro.org) X-ZM-MESSAGEID: 1792426983748158500 Content-Type: text/plain; charset="utf-8" The exynos4210 combiner has registers arranged in sets of 4: offset 0x0: IIESR0 (handles interrupt groups 0..3) offset 0x4: IIECR0 offset 0x8: IISTR0 offset 0xc: IIMSR0 offset 0x10: IIESR1 (handles interrupt groups 4..7) offset 0x14: IIECR1 and so on for a total of 16 sets of registers, which puts the final IIMSR15 at offset 0xfc. After that come two registers which aren't grouped, ICIPSR0 at 0x100 and ICIPSR1 at 0x104. The entire register memory region is thus 0x108 bytes. The logic which separates out the "offset is in one of the sets of registers" from "offset is one of the ICIPSRn registers" is incorrect, and so a write to offset 0x10448100 (which should be ICIPSR0) falls through into the code for handling accesses to a set of registers, and indexes off the end of the s->group[] array. For an input offset of, say, 0x3C, req_quad_base_n is 0x3, because this is in the 3rd set of registers. grp_quad_base_n is then 0xC, because this set of registers handles interrupt groups 12..15, and we will index s->group[] with grp_quad_base_n through to grp_quad_base_n + 3. IIC_NGRP is the size of the group[] array, and so we need to check grp_quad_base_n against it, not req_quad_base_n. Fix the bounds check, and add an assertion that the code path where we are beyond the register-set range isn't going to overrun its array, which we know to be true because of the size used for the MemoryRegion. Cc: qemu-stable@nongnu.org Fixes: 8e03cf1eeb1f9e0 ("ARM: exynos4210: IRQ subsystem support.") Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4709 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- hw/intc/exynos4210_combiner.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index dbbdee4d316..4f079fedaff 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -91,8 +91,9 @@ exynos4210_combiner_read(void *opaque, hwaddr offset, uns= igned size) grp_quad_base_n =3D req_quad_base_n << 2; reg_n =3D (offset - (req_quad_base_n << 4)) >> 2; =20 - if (req_quad_base_n >=3D IIC_NGRP) { - /* Read of ICIPSR register */ + if (grp_quad_base_n >=3D IIC_NGRP) { + /* Read of ICIPSR register. MR size ensures this must be in bounds= */ + assert(reg_n < ARRAY_SIZE(s->icipsr)); return s->icipsr[reg_n]; } =20 @@ -184,7 +185,7 @@ static void exynos4210_combiner_write(void *opaque, hwa= ddr offset, grp_quad_base_n =3D req_quad_base_n << 2; reg_n =3D (offset - (req_quad_base_n << 4)) >> 2; =20 - if (req_quad_base_n >=3D IIC_NGRP) { + if (grp_quad_base_n >=3D IIC_NGRP) { qemu_log_mask(LOG_GUEST_ERROR, "exynos4210.combiner: unallowed write access at offs= et 0x" HWADDR_FMT_plx "\n", offset); --=20 2.43.0 From nobody Mon Nov 23 04:44:17 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1792427035; cv=none; d=zohomail.com; s=zohoarc; b=jVzY5xalhNeT51UngiQ2WtanRqs9jGc460ftKmRGZKMjWzSP4gSO+M+xtnbKnUxFqNOh+l6otMEUBlN8KNT/U2dILz2ZscfTEgFkcszroSzJyik7RSdLCNBqBB94qC17yi09j0rI7xQSGCOq0qavgm4wE6FMlAbAY/Nenwkts1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792427035; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=pZLtA2h0wZBQwTqX3pZWTJnQIrYGZbHc9AyenCmoNFk=; b=GKHhW1u3HFAUqie/Cgd4EoHquC1/REfpoJZ41iX09QZzAfrJsvwfwzxMbTMhj0ROw3ipTRjcrvrtXhjbh0Skeyw9S6dNkQLsxHz1bpwrVelY4A2kv+YE1im8zClSYrlTNEX5SQQSTS3smcbnIh3m2Die0yJdBrkm1RjtlcPZ+WE= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792427035358271.7124498199455; Mon, 19 Oct 2026 09:23:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xIq8E-0007dK-EA; Mon, 19 Oct 2026 12:22:38 -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 1xIq8B-0007ap-DM for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:35 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xIq89-00010V-GP for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:35 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4a1e1dade31so10299075e9.3 for ; Mon, 19 Oct 2026 09:22:33 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1f2cdc342sm3100095e9.13.2026.10.19.09.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 09:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792426952; x=1793031752; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=pZLtA2h0wZBQwTqX3pZWTJnQIrYGZbHc9AyenCmoNFk=; b=XYHJf3n4j5aeRIRu8AgolMlWwnA/Lb9nPOTpN9/Lo58gRWzGtl3xaioibWwQJpAreL Fz0ZOPgidILNKHWZZjDjUM1v/K0upplAVbB9n5dyMXoqaUwvOSbIXJ8ZVFyVG87tFHq5 wN0GTXjf7WHec3RRiBOmkpvy6DvufbloVrgvAdKfSELpNmHWKAu7HmwQ4EFUOSjhMzbL AAL05teySVLC6NL8/clALrBYvTSPPdyJLKe6lQQvkqSUPsrHVZZclOETmeCtU5DVgU96 Kxc2k8f4ZBThTdcWXKI4yVk2WjfKV12hkku8fuujoQzywAsxdzpevyZeoEajYKKf/W0T ykYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792426952; x=1793031752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=pZLtA2h0wZBQwTqX3pZWTJnQIrYGZbHc9AyenCmoNFk=; b=DpSRrlcEmxPqIj1L2ggpUTKeMh4LaSPCsoj+42LFMLErgn1ilLsbv2uiDurnsPf/ng Nu6o1pn+6IsidM+mTowQqFDLcnMRTLgLZwkSZ2+UpDgB+IJ7fE7VHPBp6utYWLpgTLZR 43gGEwIWoameVUVEa4m02pOvF5ZJSU8bJHLe79601nQr0L7+wPFZ8M+IKTtS0UHr431+ Ou7WflYIv66i6K34GkBUfI7fmIUWPOQVMwjCGNCTNrNO8qfR21uFOq6D2y6NpalWFqJj KIv7HELh1FPufsrYqF9f3B2/EcNC6vSKhW/3v/rXBpbP3rM87A7lRR4TwOi0yCIpbV96 PMPw== X-Forwarded-Encrypted: i=1; AKwUvBy8NxedKLyrEFnPKqeUuYocIvk4JgZPH4q9+5bUHzd3pdzUZGmmR0U4+5JeFxutNQonXePreKDa5IVX@nongnu.org X-Gm-Message-State: AFq9FYK6ZAn+NymIir3/20kx0PenegpGaJ7s3stGI/oTFYTNHriBpMeD g/6vxaDRw0HCagvRB4jT7oGPY7daJ4lrHtbtvd1Un+H7ZGu7ZtFSTVQHp5V2nvQlvj0= X-Gm-Gg: AYBFou2wvT3gYofnRLmX7dgFLYcQHHzM+stqIkoep3fcbC0hf9R2e9vhevVSU2Sn8xb eUgHaPFo6nAa4z+rj3j0Vc7BV8YHmwTZ4E7af13uTbtVcuT8CUjhdFk6gGfzcu6eaECjd0hJZUZ X0t+ah8kZlvvLcMVAO/B3A+Sa/nIktU+mmVE03Bl5Ld93bgM9YyX+Gxtq4D+yGHMkggJhbeeNId x2CM4ouJU2MUfGXJdetACREfemVjwkASBXIz3Zvld9t314gnaGyZJbleyT+9M/WA9j4qKpfHSvI tPHp0Q1u8m4DiE1iPPqGM3BTwv0DHw1SvFP2NucvWyHQsx89D4vzN7jG+Z1ejw3GPPdWAf5R0r7 xavBYFt9zhBSAlYwsq1UA4jY+yT3WkUBu6NDlbaCFCefnQMe3GH04NJixamPOdcwsYfzRNAVSTh 5kcYkEmzhHiUptAazigRFsD53lCZ4flLKXDCGMzfeK+tkwu2kQrj1n/t3ZLXI4veeiYGxqHlXLn JseSldHaNQJTRCeUcQ4e/lffd0W92hI8mkyw2IVrjzZojHd60vcigo/zsvxBM6/cnCX604ZrDxH EFX1 X-Received: by 2002:a05:600c:19d2:b0:4a1:d10c:7170 with SMTP id 5b1f17b1804b1-4a1d76262e1mr170915605e9.31.1792426952072; Mon, 19 Oct 2026 09:22:32 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/4] hw/intc/exynos4210_combiner: Clean up reg_set[] bounds checks Date: Mon, 19 Oct 2026 17:22:15 +0100 Message-ID: <20261019162217.3272337-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261019162217.3272337-1-peter.maydell@linaro.org> References: <20261019162217.3272337-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 @linaro.org) X-ZM-MESSAGEID: 1792427036635158500 Content-Type: text/plain; charset="utf-8" In the exynos420_combiner read and write functions, we check whether offset >> 2 is too large for the s->reg_set[] array we're about to access. This is written to log a guest error if it happens, but in fact the condition can't be true unless there's a QEMU bug: * we have already dealt with and returned early for registers beyond the "sets of 4" range, by checking grp_quad_base_n; this accounts for all offsets 0x100 and above * this means offset >> 2 is at most 0x3F * IIC_REGSET_SIZE is 0x41, which is in fact one larger than it needs to be, but in any case the offset can't be out of range Use assert() checking against ARRAY_SIZE for this sanity check, as failing it would be a QEMU bug, not a guest bug. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- hw/intc/exynos4210_combiner.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 4f079fedaff..2bdb9a0152c 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -119,12 +119,7 @@ exynos4210_combiner_read(void *opaque, hwaddr offset, = unsigned size) s->group[grp_quad_base_n + 3].src_pending) << 24; break; default: - if (offset >> 2 >=3D IIC_REGSET_SIZE) { - qemu_log_mask(LOG_GUEST_ERROR, - "exynos4210.combiner: overflow of reg_set by 0x" - HWADDR_FMT_plx "offset\n", offset); - return 0; - } + assert((offset >> 2) < ARRAY_SIZE(s->reg_set)); val =3D s->reg_set[offset >> 2]; } return val; @@ -199,12 +194,7 @@ static void exynos4210_combiner_write(void *opaque, hw= addr offset, return; } =20 - if (offset >> 2 >=3D IIC_REGSET_SIZE) { - qemu_log_mask(LOG_GUEST_ERROR, - "exynos4210.combiner: overflow of reg_set by 0x" - HWADDR_FMT_plx "offset\n", offset); - return; - } + assert((offset >> 2) < ARRAY_SIZE(s->reg_set)); s->reg_set[offset >> 2] =3D val; =20 switch (reg_n) { --=20 2.43.0 From nobody Mon Nov 23 04:44:17 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1792427021; cv=none; d=zohomail.com; s=zohoarc; b=ewmYvf5A0kWG4+eRNv+ey6ESD5bAJr4TtcrYAnkxHstUSxhhCRjlUlTgFdjfofYzhl2zB7yhGNV5F8XDkDarNLdACM4aj2/Jdc30v0N9tMP1piJlgVFLsPX0h5Gb2LDmYsEXqti3LwEAIN4ERb/9JA6GlEkQdM9pPnVVN/hHwlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792427021; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=rb/hV+kc2y+cyLc/E9FJoAdgtXpSI/AdRDMtqVqJdQo=; b=U4F8NNqGN8wsLoiUslcbs5CNZdh1bHiS6mLlF5SUzsaDx7I84dJUmw2PIdcWXhoFlTGORLFk3q/l1O8wodLMufyOj5KDDTL0s0pvysQIHfG20g/0Uz2XQcltYkD8WjtMPX0nGookwSvsS/Wariy76JG0IGbTcaNELibnWP+ya1I= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792427021735475.1235330752297; Mon, 19 Oct 2026 09:23:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xIq8G-0007dk-2Z; Mon, 19 Oct 2026 12:22:40 -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 1xIq8C-0007c2-Jm for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:36 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xIq8A-00010i-Js for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:36 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4a1df4c0966so10176965e9.1 for ; Mon, 19 Oct 2026 09:22:34 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1f2cdc342sm3100095e9.13.2026.10.19.09.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 09:22:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792426953; x=1793031753; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=rb/hV+kc2y+cyLc/E9FJoAdgtXpSI/AdRDMtqVqJdQo=; b=xP7BEx8sbtRQxwMnmkiaeR51cBUgHel9slKrK+UnZ99WMFSE2gxxY0s8XV+VTwFWLt LRNUVKXzlQX/9KqMFgmFUKevpgFcYMQGBr9l2RwM/W60u6DFbHOP6bUAmQsfb8FAxamT FubrzBIPra6qxDKckfj/ZYa7g3Kiczf+U3VxEldUOqOfMsEfcH96xO9126g7t6LyGIAh wxj4D/PNqzDpl8/xWhROnLnfl4heIRM3atbH5v+ar2/PdSLwcMFz4/yQCRYRuINnUs+J 33CJWBsGHrMgVf0miHE+yPzFllsnsAzTSOqAoocOfliDldxfR+2HS6lNqOOGJpaf4kgN Tl8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792426953; x=1793031753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=rb/hV+kc2y+cyLc/E9FJoAdgtXpSI/AdRDMtqVqJdQo=; b=1J4AotBvdLelALakK9/ElLc4agMQP1LnpqDOeKaV0N/nyf0rGwdf9W5L4vptwP7Xnp m/5kqmBqD91EVpJfB5+JewgKRkp+gf98SrrEzmnIRJ+jG3slEQt11+DIGja8J5NV9eXH dNspIL7DoK4j223oEPDLUw86niVnK9BUYnS4eEfD92uB6AFQQfR4sdTHliCAe9l4AHGc BAgNiefZMsU61AlKK6P88vwwjKyDeTICbHSm9JGBwUu3NE7E4PJWzL5SUqhTm+WK4ifG 5aw1mB9/hjmIeMzckXrCjETS/46InZg+h7AgvV8wbZ5TCD61o3sZlLCbmjK1IyvgIQvq FKBw== X-Forwarded-Encrypted: i=1; AKwUvBxhk2LN130LSZp2HKAL2KW7S2AU8pZXQ435cxcwfZhk6tVRYy5hGtwFPP2iUf46Jopq4oPfGwxGpXuv@nongnu.org X-Gm-Message-State: AFq9FYIlQNVy3RcIRtBd68+QZd1xlKlgapkznLnt/I018wjNGufI5Mkw O7Tn4oPW6JlzP/r6ewORwb1+lATs+kkQzJ46R0D/ktYxCD455is2GnRgCpE3WkjZfw1gHtSUlaS d0A8xE7I= X-Gm-Gg: AYBFou0rEgoZ8pum+4tZ3L2+Vg7YkT7AHPCwM0lfZmc4dRlq3VSkifZHemipCXg1qtF dJp0/Xyp1tTlyl+arIHgQgj4bK7MRszMQGmPz3hGJAJf+o1euy2BNCVkpdMMKu70PfTev6/jKCG BRgNoe7e/3dnkS6vRwNN4bTDjcYQs+CLq3CJdeurBu+WfYtIsKDciKE8zLurQQnIRceQup8fswR aMRBaTD3eqiWWdBObAGXVRnIFLPmuvu2WEWlVxBeL9um1p7OwAPC9cTPo4CKQopDV1uU/iKU6Ed VV/csWYd+7C9TnFRGYg4zcWbHDLysyOcskkBXef6tAWiUOb8EzPb7XeX7Vr+iVkPFDZ+lvcc48D exUwU437I4VsjwgjVb8Db7ElIXh4wa3yGbiTZsThW2Xzbxs6IywFNd6mk/fFLEB4sa2wkMIAPRx UuYP2rONgNP3gug6t1+2mSW24bCltRC9BaL7Yoo2l7z29es4OgWH1aeQepJYlODe1dJyrIwyyX8 V1+0mkIgQPeVymZt+B5jxoJUMYPOUb0CQf1FG+FD/n+eT1M3/yKl/NBj4BpjA4RqFW9blEkmuT7 YyA= X-Received: by 2002:a05:600c:4f88:b0:4a1:9c71:9f17 with SMTP id 5b1f17b1804b1-4a1d75fe190mr168114545e9.9.1792426953065; Mon, 19 Oct 2026 09:22:33 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/4] hw/intc/exynos4210_combiner: Make reg_set[] only as large as it needs to be Date: Mon, 19 Oct 2026 17:22:16 +0100 Message-ID: <20261019162217.3272337-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261019162217.3272337-1-peter.maydell@linaro.org> References: <20261019162217.3272337-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1792427022235158500 Content-Type: text/plain; charset="utf-8" The reg_set[] array holds the register values for registers in the "sets of 4 registers IIESRn, IIECRn, IISTRn, IIMSRn" part of this device, not the extra non-grouped ICIPSRn registers at the end. It therefore needs at most 0x40 entries (for registers at offset 0x0 up to offset 0xFC), but we oversized it at 0x41. Reduce the size to what it ought to be. This is a migration break, but we don't care for the exynos boards. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- include/hw/intc/exynos4210_combiner.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/hw/intc/exynos4210_combiner.h b/include/hw/intc/exynos= 4210_combiner.h index b1db48cb880..94177827196 100644 --- a/include/hw/intc/exynos4210_combiner.h +++ b/include/hw/intc/exynos4210_combiner.h @@ -39,7 +39,11 @@ OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210CombinerState, EXYN= OS4210_COMBINER) /* Number of groups and total number of interrupts for the internal combin= er */ #define IIC_NGRP 64 #define IIC_NIRQ (IIC_NGRP * 8) -#define IIC_REGSET_SIZE 0x41 +/* + * Number of registers in the IIESRn, IIECRn, IISTRn, IIMSRn part + * of the register map. + */ +#define IIC_REGSET_SIZE 0x40 =20 struct Exynos4210CombinerState { SysBusDevice parent_obj; --=20 2.43.0 From nobody Mon Nov 23 04:44:17 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1792427002; cv=none; d=zohomail.com; s=zohoarc; b=jcqPYhIdOAT6RZ2L4tuH/GddJ3kamywN1pudgO5FvZ9NCzKzrKJN+n1KhEj73Oj7NbwMlrlQIzGQfT5+3xJ1Hz09PTZS3XN8ZEd0YYkH/oOwrwejH6JDLM2h23bwF0mtEkgzPlR/YFXWbyhkamDU1gKUVDrPjc6LzXhLMFBdldQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1792427002; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=01ic6QRfFli6nQ9qpb0kBun3L6TORr+h9ToLk/SJjI4=; b=QV9d6WAFn8EF3xwCoheBvTwbA6HUGeAcuBiBF6kMD643jKKLm8D5nD2BoXLOqAq5LtB/wSlDDsFhkmFXK2gwDKAuZRFunn0cfK00tZp76OrFoYevbR9yKaZWjRSGDG8beDiFp26NQrm9NZvSUvl+n/2QQiNOS3RvDfLsnsUrYBc= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1792427002037464.4815291969047; Mon, 19 Oct 2026 09:23:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xIq8F-0007dg-Or; Mon, 19 Oct 2026 12:22:39 -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 1xIq8D-0007cS-A1 for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:37 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xIq8B-000118-PK for qemu-devel@nongnu.org; Mon, 19 Oct 2026 12:22:37 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-48e1d0e5dafso17968f8f.1 for ; Mon, 19 Oct 2026 09:22:35 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1f2cdc342sm3100095e9.13.2026.10.19.09.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2026 09:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1792426954; x=1793031754; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=01ic6QRfFli6nQ9qpb0kBun3L6TORr+h9ToLk/SJjI4=; b=nW+vbFJ6aYOTbY+6qTciQnRxoKUvHCjWgYPMMIeDHFm3nk6lESdjFiYQ2lmw+STVsI 73J9Kd0om/K8gyZUGfA7zpKbyk0FuTVKYS8EHWRsaRTIbCfziAW3xR7OHeDC83V6uK9Z FrcDyRxVlPoQk3V4UPriMWAkjDx+2PXiMPdrBhzXGgDcdfKQZEbvVAs16mSJw4BvMq6R dQ1mCQRldRL6jK3hAPQ9bW+vUvt/scUKZr6+eR1KdGjcWbfPlJmbr4pkoZF3ubqsu47m riNp447ppVhl1tXcXDQEqJ5LFP6M9AUI4AyVcWEZTAcDzMNKZXIaR4XhsAJMTOAy87il 2KeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792426954; x=1793031754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=01ic6QRfFli6nQ9qpb0kBun3L6TORr+h9ToLk/SJjI4=; b=Hk0jHBJrQbcF+Z+G214EzMYHUJJ5O5JRMXjoupuLLkX9Pd3hek3DEVmEx33zN9FmaT iiMQL7tONcUTWDM+yw/vSqW430i6vzHL0v6CfsuwHiaFRFVamws1xw4imiWLYazoitEq jPstUlfvbNbc+lagG+wdbMUZ5W3wkL9XIKsaz6r3ZSo85LmnIGpX/Unyj6X2gf5RCJPH vD8uvnXBZ63By2yavuXaZVQHfZ+SwJiXLH+t/SOa9kkHKS3E8PQOej5DF55UwRkOW/vA I/sQuHrXs6hC9vZCH8mh7JM4lLaMHqvayFIKF7FOhGsX8A6DLylgbnQYyn9O+QkbrOoQ GQGg== X-Forwarded-Encrypted: i=1; AKwUvBzbCkH9MjkfWkrNpkMh/NPsHYchsutUOdTRLu9PIXL1Cc/9OYZ4Pu523aM3T7zsm0+F8G6kgRonOTmA@nongnu.org X-Gm-Message-State: AFq9FYJRVjp8gihjTRUJSO2TxIWVBPCNgO+5Ht1mKkP3FifnqFM4V2t6 aPExMcaKYeZQoJQLPBYgCaP3S+eTzXqOqtszq5YUD+ZYgnwAM8qXfegLN2LKE6qNVAA= X-Gm-Gg: AYBFou03vd1V2pTi7jlX85Zn2VMCXbgAbDswrqw/MI4k6duYE4za/w/pNMwCgDWesdK FHXm7B/aw2R6udG0dUnfAXTc57qCMKxGNRTJuo8tr1rqYvBcyYawWm3CWZiR6AokLolZOw3U4WG nQBPeWM4tW5BP0ExfQXZ9lwCwTKYpaviZi+2BMjKt9RpArkQ67Rg7z0NRLOi3puEKULLLvMn0YO 38t2mFvqG1q0gZGKEKeq0jRqnutsma+DnBwNXLDowBMLzBnOCc7ZJvfPMGe7URv2mytUR1qfH5l 0tMAytb/dO2HMS+3HFYd3cv6wOexYobCy8L1yvOPo7i9pKCq+6Ujx6aEHgdj/O3/8C32J9Da1kY cc1ow0QPJf/qCvkZrDNWQwCvXLozspQ2xxQJDjKQmVP/qioNiC8Q04OlRJ3N0KgE+kbcwIq0xdI K6cnbNwMZQplwlFWMfnM5LjXenZ1sAMrUGykOVOY42X2cmQL2yc3K36w7B0tPlOIIDX3KKq2SaA dc1Q8EGlZ2UsbZ4Mq/4FWBkJcOgh4Y+09/59r7iAHORXmR5ga0KFq7ORbuPycBTF23Y+rb+vcxJ jXnl7KWGdkzOag== X-Received: by 2002:a05:600c:c090:b0:4a1:ac66:604b with SMTP id 5b1f17b1804b1-4a1d75a470emr128193785e9.1.1792426954003; Mon, 19 Oct 2026 09:22:34 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/4] hw/intc/exynos4210_combiner: write default case is unreachable, not guest error Date: Mon, 19 Oct 2026 17:22:17 +0100 Message-ID: <20261019162217.3272337-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261019162217.3272337-1-peter.maydell@linaro.org> References: <20261019162217.3272337-1-peter.maydell@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 @linaro.org) X-ZM-MESSAGEID: 1792427003930158500 Content-Type: text/plain; charset="utf-8" In exynos4210_combiner_write(), we rule out "reg_n > 1" before we start doing anything as being an invalid guest access. The default case in the later "switch (reg_n)" is therefore unreachable, because it has explicit cases for 0 and 1. Use g_assert_not_reached() instead of a LOG_GUEST_ERROR. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- hw/intc/exynos4210_combiner.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 2bdb9a0152c..80295ae6402 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -242,9 +242,7 @@ static void exynos4210_combiner_write(void *opaque, hwa= ddr offset, exynos4210_combiner_update(s, grp_quad_base_n + 3); break; default: - qemu_log_mask(LOG_GUEST_ERROR, - "exynos4210.combiner: unallowed write access at offs= et 0x" - HWADDR_FMT_plx "\n", offset); + g_assert_not_reached(); break; } } --=20 2.43.0