[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-04-07 Thread Andrey Konovalov
Ah, there's v4 now. Tested with KASAN tests + a custom test to check unaligned accesses that span across two granules, everything works. Thank you! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1921

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-04-07 Thread Andrey Konovalov
Is this with QEMU master without the patches mentioned in this bug? Which kernel version do you use? Could you share your kernel config? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1921948 Title:

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-04-07 Thread Andrey Konovalov
This warning is caused by "virtualization=on" QEMU option. This is another QEMU bug AFAIU, see [1] and [2]. [1] https://lore.kernel.org/lkml/CAAeHK+wDz8aSLyjq1b=q3+hg9ajxxwyr6+gn_ftttmn5osm...@mail.gmail.com/ [2] https://lore.kernel.org/lkml/20210311123315.GF37303@C02TD0UTHF1T.local/T/ -- You r

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-04-03 Thread Andrey Konovalov
With v2, a lot of KASAN tests start failing. This likely means that MTE tag faults stop being generated in certain cases. With v3 [1], no MTE faults are generated at all. [1] https://patchew.org/QEMU/20210402214217.422585-1-richard.hender...@linaro.org/ -- You received this bug notification bec

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-04-02 Thread Andrey Konovalov
Hi Richard, I tried your patch, but QEMU crashes with: ERROR:../target/arm/mte_helper.c:588:mte_check_fail: code should not be reached Bail out! ERROR:../target/arm/mte_helper.c:588:mte_check_fail: code should not be reached when running KASAN tests. Thanks! -- You received this bug notifica

[Bug 1921948] [NEW] MTE tags not checked properly for unaligned accesses at EL1

2021-03-30 Thread Andrey Konovalov
Public bug reported: For kernel memory accesses that span across two memory granules, QEMU's MTE implementation only checks the tag of the first granule but not of the second one. To reproduce this, build the Linux kernel with CONFIG_KASAN_HW_TAGS enabled, apply the patch below, and boot the kern

Re: [PATCH 0/3] target/arm: Complete ISS for MTE tag check fail

2020-08-13 Thread Andrey Konovalov
On Thu, Aug 13, 2020 at 12:01 PM Kevin Brodsky wrote: > > On 12/08/2020 20:06, Evgenii Stepanov wrote: > > On Wed, Aug 12, 2020 at 11:03 AM Andrey Konovalov > wrote: >> >> On Wed, Aug 12, 2020 at 7:52 PM Richard Henderson >> wrote: >> > >&g

Re: [PATCH 0/3] target/arm: Complete ISS for MTE tag check fail

2020-08-12 Thread Andrey Konovalov
On Wed, Aug 12, 2020 at 7:52 PM Richard Henderson wrote: > > On 8/12/20 10:38 AM, Andrey Konovalov wrote: > > On Wed, Aug 12, 2020 at 7:19 PM Richard Henderson > > wrote: > >> > >> As reported by Andrey, I was missing the complete ISS info for > >>

Re: [PATCH 0/3] target/arm: Complete ISS for MTE tag check fail

2020-08-12 Thread Andrey Konovalov
On Wed, Aug 12, 2020 at 7:19 PM Richard Henderson wrote: > > As reported by Andrey, I was missing the complete ISS info for > the Data Abort raised upon a synchronous tag check fail. > > The following should fix that. All the twisty little rules for > the ISS.ISV bit are already handled by merge_