glibc: Enable memory tagging for aarch64
PATCH v2 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.
---
v2: Rebased
meta/recipes-core/glibc/glibc_2.33.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/glibc/glibc_2.33.bb +1 -0
@@ -95,6 +95,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 from me, I had the same patch locally that I was about to send :)
I do wonder if we should start using that PACKAGECONFIG for these tunables, as on non-MTE hardware there is an overhead (albeit small).
Ross
Quoted 34 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.
Signed-off-by Khem Raj <[email protected]>---
v2: Rebasedmeta/recipes-core/glibc/glibc_2.33.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-core/glibc/glibc_2.33.bb +1
-1@@ -95,6 +95,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" --2.31.1
Quoted 6 lines · Ross Burton
+1 from me, I had the same patch locally that I was about to send :)
I do wonder if we should start using that PACKAGECONFIG for these tunables, as on non-MTE hardware there is an overhead (albeit small).
for aarch64 it would be better to stay with common glibc for wide subset if we can
Quoted 37 lines
Ross
Quoted 34 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.
Signed-off-by Khem Raj <[email protected]>---
v2: Rebasedmeta/recipes-core/glibc/glibc_2.33.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-core/glibc/glibc_2.33.bb +1
-1@@ -95,6 +95,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" --2.31.1