Thread (107 messages) 107 messages, 6 authors, 2020-11-13

Re: [PATCH v9 44/44] kselftest/arm64: Check GCR_EL1 after context switch

From: Alexander Potapenko <glider@google.com>
Date: 2020-11-12 16:41:36
Also in: linux-mm, lkml

On Thu, Nov 12, 2020 at 5:09 PM Marco Elver [off-list ref] wrote:
On Thu, 12 Nov 2020 at 16:59, Alexander Potapenko [off-list ref] wrote:
quoted
On Tue, Nov 10, 2020 at 11:12 PM Andrey Konovalov [off-list ref] wrote:
quoted
From: Vincenzo Frascino <vincenzo.frascino@arm.com>

This test is specific to MTE and verifies that the GCR_EL1 register
is context switched correctly.

It spawn 1024 processes and each process spawns 5 threads. Each thread
Nit: "spawns"

quoted
+       srand(time(NULL) ^ (pid << 16) ^ (tid << 16));
+
+       prctl_tag_mask = rand() % 0xffff;
Nit: if you want values between 0 and 0xffff you probably want to use
bitwise AND.
Another question would be, is the max here meant to be 0xffff or
0xffff-1. Because, as-is now, it's 0xffff-1. Only one of them has a
trivial conversion to bitwise AND ( x % 2^n == x & (2^n - 1) ).
Yes, that is basically what I meant, assuming that Vincenzo wanted the
max to be 0xffff

-- 
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help