Skip to contentSkip to conversation

glibc: Enable memory tagging for aarch64

PATCH Superseded Khem Raj 2 participants 3 messages May 23, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 glibc: Enable memory tagging for aarch64

Glibc on aarch64 has a memory tagging option that can be enabled via GLIBC_TUNABLES="glibc.mem.tagging=$SOMETHING" when glibc is built with memory tagging support and the kernel/HW supports MTE. There should be no side effects unless the user turns it on with approprate HW support

Linux 5.4 headers and binutils 2.33.1 or newer is needed.

---
 meta/recipes-core/glibc/glibc_2.34.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/glibc/glibc_2.34.bb +1 -0
index 0deb727ae4..37cf8ed85f 100644
@@ -91,6 +91,7 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
 
 EXTRA_OECONF_append_x86 = " --enable-cet"
 EXTRA_OECONF_append_x86-64 = " --enable-cet"
+EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging"
 
 PACKAGECONFIG ??= "nscd"
 PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"
Signature · 1 line
2.31.1
#1 lore raw
Quoted 29 lines · Khem Raj

Glibc on aarch64 has a memory tagging option that can be enabled via GLIBC_TUNABLES="glibc.mem.tagging=$SOMETHING" when glibc is built with memory tagging support and the kernel/HW supports MTE. There should be no side effects unless the user turns it on with approprate HW support

Linux 5.4 headers and binutils 2.33.1 or newer is needed.

---
 meta/recipes-core/glibc/glibc_2.34.bb | 1 +

 1 file changed, 1 insertion(+)
meta/recipes-core/glibc/glibc_2.34.bb +0 -0
index 0deb727ae4..37cf8ed85f 100644
@@ -91,6 +91,7 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"

 EXTRA_OECONF_append_x86 = " --enable-cet" EXTRA_OECONF_append_x86-64 = " --enable-cet" +EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging"

Quoted 2 lines

 PACKAGECONFIG ??= "nscd"
 PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"

glibc 2.34 doesn't exist in master? :)

Cheers,

Richard

author
#2 lore raw
Quoted 31 lines · Richard Purdie
Quoted 29 lines · Khem Raj

Glibc on aarch64 has a memory tagging option that can be enabled via GLIBC_TUNABLES="glibc.mem.tagging=$SOMETHING" when glibc is built with memory tagging support and the kernel/HW supports MTE. There should be no side effects unless the user turns it on with approprate HW support

Linux 5.4 headers and binutils 2.33.1 or newer is needed.

---
 meta/recipes-core/glibc/glibc_2.34.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/glibc/glibc_2.34.bb +1 -0
index 0deb727ae4..37cf8ed85f 100644
@@ -91,6 +91,7 @@ EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
 
 
 
 
 EXTRA_OECONF_append_x86 = " --enable-cet"
 EXTRA_OECONF_append_x86-64 = " --enable-cet"
+EXTRA_OECONF_append_aarch64 = " --enable-memory-tagging"
Quoted 4 lines
Quoted 2 lines

PACKAGECONFIG ??= "nscd"
PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"

glibc 2.34 doesn't exist in master? :)

ah I should have rebased

Quoted 5 lines

Cheers,

Richard