qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] target/arm: Fix unaligned mte checks


From: Richard Henderson
Subject: Re: [PATCH 2/2] target/arm: Fix unaligned mte checks
Date: Fri, 2 Apr 2021 11:44:58 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/2/21 11:35 AM, Peter Maydell wrote:
On Fri, 2 Apr 2021 at 06:42, Richard Henderson
<richard.henderson@linaro.org> wrote:

We were incorrectly assuming that only the first byte of an MTE access
is checked against the tags.  But per the ARM, unaligned accesses are
pre-decomposed into single-byte accesses.  So by the time we reach the
actual MTE check in the ARM pseudocode, all accesses are aligned.

Therefore, drop mte_check1, since we cannot know a priori that an
access is aligned.  Rename mte_checkN to mte_check, which now handles
all accesses.  Rename mte_probe1 to mte_probe, and use a common helper.

Drop the computation of the faulting nth element, since all accesses
can be considered to devolve to bytes, and simply compute the faulting
address.

Buglink: https://bugs.launchpad.net/bugs/1921948
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

This is a pretty chunky patch for this point in the release cycle.
I don't suppose there's a way to make it more digestible for review?

Hmm.  I guess I could split it into more pieces...

I had thought one of the intermediary steps was larger than the result, simply because one of the interfaces was adjusted instead of simply being removed.

I'll see what I can come up with.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]