All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Junjie Mao <junjie.mao@hotmail.com>
Cc: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	 qemu-devel@nongnu.org,  Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH] rust/pl011: Fix range checks for device ID accesses
Date: Mon, 18 Nov 2024 10:38:17 +0000	[thread overview]
Message-ID: <87mshwu8rq.fsf@draig.linaro.org> (raw)
In-Reply-To: <SY0P300MB10265E91E369AB15B611018D95272@SY0P300MB1026.AUSP300.PROD.OUTLOOK.COM> (Junjie Mao's message of "Mon, 18 Nov 2024 17:54:29 +0800")

Junjie Mao <junjie.mao@hotmail.com> writes:

> Alex Bennée <alex.bennee@linaro.org> writes:
>
>> Junjie Mao <junjie.mao@hotmail.com> writes:
>>
>>> The peripheral and PrimeCell identification registers of pl011 are located at
>>> offset 0xFE0 - 0xFFC. To check if a read falls to such registers, the C
>>> implementation checks if the offset-shifted-by-2 (not the offset itself) is in
>>> the range 0x3F8 - 0x3FF.
>>>
>>> Use the same check in the Rust implementation.
>>>
>>> This fixes the timeout of the following avocado tests:
>>>
>>>   * tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_virt
>>>   * tests/avocado/replay_kernel.py:ReplayKernelNormal.test_arm_virt
>>>   * tests/avocado/replay_kernel.py:ReplayKernelNormal.test_arm_vexpressa9
>>>
>>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>>> Signed-off-by: Junjie Mao <junjie.mao@hotmail.com>
>>
>> This certainly fixes the avocado failures.
>>
>> Tested-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>>
>
> Thanks for reviewing and testing, Alex!
>
> Meanwhile, Manos has submitted another fix [1] which also replaces
> arrays of constant register values with more explicit register
> getters. His change may supercedes mine.
>
> [1]
> https://lore.kernel.org/qemu-devel/20241117161039.3758840-1-manos.pitsidianakis@linaro.org

Yes I'm looking at that series now. I just wanted to note this simple
fix might be more relevant to 9.2 as its concise and easy to see what
its doing.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-11-18 10:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  6:13 [PATCH] rust/pl011: Fix range checks for device ID accesses Junjie Mao
2024-11-18  9:43 ` Alex Bennée
2024-11-18  9:54   ` Junjie Mao
2024-11-18 10:38     ` Alex Bennée [this message]
2024-11-21 16:47 ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mshwu8rq.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=junjie.mao@hotmail.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.