Message ID | 20241125152105.2100395-25-alex.bennee@linaro.org |
---|---|
State | Accepted |
Commit | f7ceab1e307128c2e07bee1f92fd57d4a948b1f8 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1245379wru; Mon, 25 Nov 2024 07:22:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUqB/Buj4lDPNJ0jkMZGULXrHtguuJPAOJb/XT77ZUWmpRAHUlQeuiQrP6wLEL36nf5IjTZ8g==@linaro.org X-Google-Smtp-Source: AGHT+IFjE6kTkQoCOy31+eJOnS0QexhxPqwUZzC+3Y5WCiUtYgzAxEkVpgu+dCvu5bUd++5ymQ5j X-Received: by 2002:a05:6102:942:b0:4ad:5106:ea4b with SMTP id ada2fe7eead31-4addcb8b179mr13706253137.2.1732548174487; Mon, 25 Nov 2024 07:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732548174; cv=none; d=google.com; s=arc-20240605; b=NPW0jhllX/vn48/hz82cYSZSpXQPDYTH3DXoBkVJU61lq70qLQRdKWmzDMrH8SPOCp immqtiIm2by965jeYADxcLE6Xa/6l6k89fIg9rxEMME/baAQegu4oDlrnu7fwl/Mw+/v HiGWG1YZ+gj6dKkg2mvjMwScQcGmY5bze2o+FlbsZmGLWmomE7KDboPaScc3lvf+pjSL 9fS9SPV46BGbnkOml91MLKyWqU0/k3UXfLl49yGvwZENmZjgJbQfOq+pK0WvGoUUpyu3 S8kU9u4880alvY9w7EUUysq6tNKg/MEVTu05EOgSPDF5z9Ea9xRbL4Mh3CkwS+Ou0wet GnpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DMELCxkOeEAQmSk+N63B9qvpt489uBLoYc1oFZtPpjQ=; fh=Djnm7XpAdvfPOw+0THoefLwZ+5xQNlkleF/uuuh2Cno=; b=Nul31GKNKF1tmx+TkicIOzrAFoXYwWvhJV/bZZhasazNIFjkBTk5yKTRcQujvspKJv wN5N/WhjrKw0kAkB3CFO5Cp69j6GaaYPGJhhlcl7lU0PkVC9MgG03fiIrfWSzQKIAM6n S8aebx8d18ZscxK67A5i7Kb8md3foKA4ZzSKAE8x+LDF0yHXJhHwngn5Tvb3GapVFEp9 zX1zDnQ/Tw9zn1U71o3uc5hol4DP+ZHJxzm1YG5j9g75LKjAV3BRzSl779sqbb38i/ma LPfK4YmJO41qfwxgI2rDi7ZNUfScF9aK20xIJ1mowcEn8vaIHBNqWhFnh10qpKF5hJYB AEBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pChjgK74; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4adda67db26si2624394137.250.2024.11.25.07.22.54 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Nov 2024 07:22:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pChjgK74; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tFatu-000422-BF; Mon, 25 Nov 2024 10:21:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1tFats-00040r-Fy for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:20 -0500 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 <alex.bennee@linaro.org>) id 1tFatq-0001nA-Bh for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:21:20 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43497839b80so14602035e9.2 for <qemu-devel@nongnu.org>; Mon, 25 Nov 2024 07:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548077; x=1733152877; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DMELCxkOeEAQmSk+N63B9qvpt489uBLoYc1oFZtPpjQ=; b=pChjgK741wVwzfY7TnC/KMBlYHW7x6MktMDt4o39LYBILUSFMT1n8u6Bni1/FkIeR1 SbYDGmcT/qDxeLjG7RaHn5lQcH9l+GfxS0QieZhXgLCPNNkTWFBSfnRxJl6Pc9v6dsaJ A4ovCt9RhrsLdKYNMBMXaihw74FqWZaDE/tlED9XrCmer1WOBjHKlL1RjpSdyNipam9u tPJ79eg+/eCvideDudz0NOUf9GyhD6udUkBNdXg62Ibm1smvjihJgjVyJoMbi6+SxbGM aFSjcDKBFdg6rDMuXKLaqbYan3tK8nzreEfZY7c/QkY9Hd4kvlVYrj9dBlsLh5gREY1W ufrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548077; x=1733152877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DMELCxkOeEAQmSk+N63B9qvpt489uBLoYc1oFZtPpjQ=; b=iGai/kxpwhMu+zsIBVgWFrN/92r1fhJbjM3xHeooU39oKPIxKbs0FNKLEeLVa8Ui7Z dFscRSlaaA1oSBeSosXlugM2VL9Tolw354+pOknI3MxYnAsiW0QNAivqbM5hXxxCL58W YPxFM9RWvu7Dh7urqLqMlXQXToUdH2fk+XKAnOubJijlk0CMfiD71C0DwNgXiVVUNV9O C/PqXsKSdHHtFWXUeHTdQInZ5eIS5qHtJR9HST5xExq+4B3QfoSqSmYRBlNFbqcm43+I 6TSNV9NJyfOcyFDkAjejkNuVMaAoS7uGzpEoGcRXZfoPMGjuFsIycceLVxhzGNDGF7vh USsg== X-Gm-Message-State: AOJu0YzCDjx7KcjZRETdu+70HkTpeRjqG69CsaoZTlYqi6DJLY0e1wZb kUT5gcWVHfgXUAHyHz58AdeDkHqJd9GcZRg7uxUMKYw8fWP6lN/1nLKmXWAFG/U= X-Gm-Gg: ASbGncukp/eIG4EJzvAtoTIPJl27bDNFwiHzcTlgclm7g8qFpmy7UGjZDSYOxwxC3yQ 71GnhZkhQKKLLD8TOTuPavyGd7FaWi8iuimCN1mPHKYmbwKN7xAyRz4zLoPqS+JsyomSBBb69OD 4tIMoy5oS5GfULslctRlmjyId50mxbOtWnCMLKs1olfpwKx7l9NaxtzcGcwpO0Aa2LolhKETIW3 gkkIRLIo7E+wOjyJ4rj/tPWtATZ2ODDQ9jZPN42w1MCpBRW X-Received: by 2002:a05:600c:3aca:b0:431:680e:95ff with SMTP id 5b1f17b1804b1-433ce425617mr118928725e9.9.1732548076810; Mon, 25 Nov 2024 07:21:16 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4349fba472asm38343535e9.17.2024.11.25.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:21:15 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F362D63331; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Junjie Mao <junjie.mao@hotmail.com>, Peter Maydell <peter.maydell@linaro.org>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>, qemu-rust@nongnu.org (open list:Rust-related patc...) Subject: [PULL 24/28] rust/pl011: Fix range checks for device ID accesses Date: Mon, 25 Nov 2024 15:21:01 +0000 Message-Id: <20241125152105.2100395-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@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=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-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/28] tests/functional: fix mips64el test to honour workdir
|
expand
|
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs index 2a85960b81..476cacc844 100644 --- a/rust/hw/char/pl011/src/device.rs +++ b/rust/hw/char/pl011/src/device.rs @@ -182,7 +182,7 @@ pub fn read(&mut self, offset: hwaddr, _size: c_uint) -> std::ops::ControlFlow<u use RegisterOffset::*; std::ops::ControlFlow::Break(match RegisterOffset::try_from(offset) { - Err(v) if (0x3f8..0x400).contains(&v) => { + Err(v) if (0x3f8..0x400).contains(&(v >> 2)) => { u64::from(self.device_id[(offset - 0xfe0) >> 2]) } Err(_) => {