From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Richard Earnshaw <rearnsha@arm.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v4 4/6] linux: Add compatibility definitions to sys/prctl.h for MTE
Date: Mon, 21 Dec 2020 19:02:22 +0530 [thread overview]
Message-ID: <3257efec-348c-6047-8afd-c91c74e2d06e@gotplt.org> (raw)
In-Reply-To: <20201218192957.11035-5-rearnsha@arm.com>
On 12/19/20 12:59 AM, Richard Earnshaw via Libc-alpha wrote:
>
> Older versions of the Linux kernel headers obviously lack support for
> memory tagging, but we still want to be able to build in support when
> using those (obviously it can't be enabled on such systems).
>
> The linux kernel extensions are made to the platform-independent
> header (linux/prctl.h), so this patch takes a similar approach.
> ---
> sysdeps/unix/sysv/linux/sys/prctl.h | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
Please put the additions into an architecture-specific
sysdeps/unix/sysv/linux/aarch64/sys/prctl.h and include_next this file
from there.
>
> diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h
> index 7f748ebeeb..4d01379c23 100644
> --- a/sysdeps/unix/sysv/linux/sys/prctl.h
> +++ b/sysdeps/unix/sysv/linux/sys/prctl.h
> @@ -21,6 +21,24 @@
> #include <features.h>
> #include <linux/prctl.h> /* The magic values come from here */
>
> +/* Recent extensions to linux which may post-date the kernel headers
> + we're picking up... */
> +
> +/* Memory tagging control operations (for AArch64). */
> +#ifndef PR_TAGGED_ADDR_ENABLE
> +# define PR_TAGGED_ADDR_ENABLE (1UL << 8)
> +#endif
> +
> +#ifndef PR_MTE_TCF_SHIFT
> +# define PR_MTE_TCF_SHIFT 1
> +# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
> +# define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
> +# define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
> +# define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
> +# define PR_MTE_TAG_SHIFT 3
> +# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
> +#endif
> +
> __BEGIN_DECLS
>
> /* Control process execution. */
next prev parent reply other threads:[~2020-12-21 13:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 19:29 [PATCH v4 0/6] Memory tagging support Richard Earnshaw
2020-12-18 19:29 ` [PATCH v4 1/6] config: Allow memory tagging to be enabled when configuring glibc Richard Earnshaw
2020-12-21 12:40 ` Siddhesh Poyarekar
2020-12-18 19:29 ` [PATCH v4 2/6] elf: Add a tunable to control use of tagged memory Richard Earnshaw
2020-12-21 12:42 ` Siddhesh Poyarekar
2020-12-18 19:29 ` [PATCH v4 3/6] malloc: Basic support for memory tagging in the malloc() family Richard Earnshaw
2020-12-21 13:27 ` Siddhesh Poyarekar
2020-12-21 13:46 ` Florian Weimer
2020-12-21 14:31 ` Richard Earnshaw
2020-12-21 14:31 ` Szabolcs Nagy
2020-12-18 19:29 ` [PATCH v4 4/6] linux: Add compatibility definitions to sys/prctl.h for MTE Richard Earnshaw
2020-12-21 13:32 ` Siddhesh Poyarekar [this message]
2020-12-21 13:34 ` Richard Earnshaw
2020-12-21 13:38 ` Siddhesh Poyarekar
2020-12-21 13:39 ` Florian Weimer
2020-12-21 13:41 ` Siddhesh Poyarekar
2020-12-18 19:29 ` [PATCH v4 5/6] aarch64: Add sysv specific enabling code for memory tagging Richard Earnshaw
2020-12-21 12:27 ` Szabolcs Nagy
2020-12-21 13:36 ` Siddhesh Poyarekar
2020-12-18 19:29 ` [PATCH v4 6/6] aarch64: Add aarch64-specific files for memory tagging support Richard Earnshaw
2020-12-21 12:44 ` Szabolcs Nagy
2020-12-21 12:50 ` Richard Earnshaw
2020-12-18 20:18 ` [PATCH v4 0/6] Memory " H.J. Lu
2020-12-21 12:28 ` Siddhesh Poyarekar
2020-12-21 13:44 ` Siddhesh Poyarekar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3257efec-348c-6047-8afd-c91c74e2d06e@gotplt.org \
--to=siddhesh@gotplt.org \
--cc=libc-alpha@sourceware.org \
--cc=rearnsha@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).