mailing list of musl libc
 help / color / mirror / code / Atom feed
351483812a92d6c0c75a48a45a1e89f44a42684a blob 884 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
#include <stdint.h>

#define MTE_TAG_GRANULE		16
#define MTE_TAG_MASK		(0xFULL << 56)

static inline uint64_t mte_load_tag(uint64_t addr)
{
	uint64_t tag;

	__asm__ __volatile__ ("ldg	%x0, [%x1]\n"
			      : "=&r"(tag) : "r"(addr));

	return tag;
}

static inline void mte_store_tag(uint64_t addr)
{
	__asm__ __volatile__ ("stg	%0, [%0]"
			      : : "r"(addr) : "memory");
}

static inline void mte_store_zero_tag(uint64_t addr)
{
	__asm__ __volatile__ ("stzg	%x0, [%x0]"
			      : : "r"(addr) : "memory");
}

static inline uint64_t mte_get_exclude_mask(uint64_t addr)
{
	uint64_t reg;

	__asm__ __volatile__("gmi	%x0, %x1, xzr\n"
			     : "=r"(reg) : "r" (addr));
	return reg;
}

static inline uint64_t mte_insert_random_tag(uint64_t addr, uint64_t mask)
{
	uint64_t reg;

	__asm__ __volatile__("irg	%x0, %x2, %x1\n"
			     : "=r"(reg) : "r" (mask), "r" (addr));
	return reg;
}
debug log:

solving 35148381 ...
found 35148381 in https://inbox.vuxu.org/musl/20240610123624.305051-2-stefanjumarea02@gmail.com/

applying [1/1] https://inbox.vuxu.org/musl/20240610123624.305051-2-stefanjumarea02@gmail.com/
diff --git a/arch/aarch64/mte.h b/arch/aarch64/mte.h
new file mode 100644
index 00000000..35148381

Checking patch arch/aarch64/mte.h...
Applied patch arch/aarch64/mte.h cleanly.

index at:
100644 351483812a92d6c0c75a48a45a1e89f44a42684a	arch/aarch64/mte.h

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).