* [PATCH] uaccess: add noop untagged_addr definition
@ 2019-06-04 11:44 Andrey Konovalov
2019-06-04 11:46 ` Koenig, Christian
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Konovalov @ 2019-06-04 11:44 UTC (permalink / raw)
To: Linus Torvalds, linux-arm-kernel, sparclinux, linux-mm, linux-kernel
Cc: Catalin Marinas, Vincenzo Frascino, Will Deacon, Mark Rutland,
Andrew Morton, Greg Kroah-Hartman, Kees Cook, Yishai Hadas,
Felix Kuehling, Alexander Deucher, Christian Koenig,
Mauro Carvalho Chehab, Jens Wiklander, Alex Williamson,
Leon Romanovsky, Luc Van Oostenryck, Dave Martin, Khalid Aziz,
enh, Jason Gunthorpe, Christoph Hellwig, Dmitry Vyukov,
Kostya Serebryany, Evgeniy Stepanov, Lee Smith,
Ramana Radhakrishnan, Jacob Bramley, Ruben Ayrapetyan,
Robin Murphy, Kevin Brodsky, Szabolcs Nagy, Andrey Konovalov
Architectures that support memory tagging have a need to perform untagging
(stripping the tag) in various parts of the kernel. This patch adds an
untagged_addr() macro, which is defined as noop for architectures that do
not support memory tagging. The oncoming patch series will define it at
least for sparc64 and arm64.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
include/linux/mm.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0e8834ac32b7..949d43e9c0b6 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
#include <asm/pgtable.h>
#include <asm/processor.h>
+#ifndef untagged_addr
+#define untagged_addr(addr) (addr)
+#endif
+
#ifndef __pa_symbol
#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
#endif
--
2.22.0.rc1.311.g5d7573a151-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] uaccess: add noop untagged_addr definition
2019-06-04 11:44 [PATCH] uaccess: add noop untagged_addr definition Andrey Konovalov
@ 2019-06-04 11:46 ` Koenig, Christian
2019-06-04 11:48 ` Andrey Konovalov
0 siblings, 1 reply; 5+ messages in thread
From: Koenig, Christian @ 2019-06-04 11:46 UTC (permalink / raw)
To: Andrey Konovalov, Linus Torvalds, linux-arm-kernel, sparclinux,
linux-mm, linux-kernel
Cc: Catalin Marinas, Vincenzo Frascino, Will Deacon, Mark Rutland,
Andrew Morton, Greg Kroah-Hartman, Kees Cook, Yishai Hadas,
Kuehling, Felix, Deucher, Alexander, Mauro Carvalho Chehab,
Jens Wiklander, Alex Williamson, Leon Romanovsky,
Luc Van Oostenryck, Dave Martin, Khalid Aziz, enh,
Jason Gunthorpe, Christoph Hellwig, Dmitry Vyukov,
Kostya Serebryany, Evgeniy Stepanov, Lee Smith,
Ramana Radhakrishnan, Jacob Bramley, Ruben Ayrapetyan,
Robin Murphy, Kevin Brodsky, Szabolcs Nagy
Am 04.06.19 um 13:44 schrieb Andrey Konovalov:
> Architectures that support memory tagging have a need to perform untagging
> (stripping the tag) in various parts of the kernel. This patch adds an
> untagged_addr() macro, which is defined as noop for architectures that do
> not support memory tagging. The oncoming patch series will define it at
> least for sparc64 and arm64.
>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> ---
> include/linux/mm.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 0e8834ac32b7..949d43e9c0b6 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
> #include <asm/pgtable.h>
> #include <asm/processor.h>
>
> +#ifndef untagged_addr
> +#define untagged_addr(addr) (addr)
> +#endif
> +
Maybe add a comment what tagging actually is? Cause that is not really
obvious from the context.
Christian.
> #ifndef __pa_symbol
> #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
> #endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] uaccess: add noop untagged_addr definition
2019-06-04 11:46 ` Koenig, Christian
@ 2019-06-04 11:48 ` Andrey Konovalov
2019-06-04 11:49 ` Koenig, Christian
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Konovalov @ 2019-06-04 11:48 UTC (permalink / raw)
To: Koenig, Christian
Cc: Linus Torvalds, linux-arm-kernel, sparclinux, linux-mm,
linux-kernel, Catalin Marinas, Vincenzo Frascino, Will Deacon,
Mark Rutland, Andrew Morton, Greg Kroah-Hartman, Kees Cook,
Yishai Hadas, Kuehling, Felix, Deucher, Alexander,
Mauro Carvalho Chehab, Jens Wiklander, Alex Williamson,
Leon Romanovsky, Luc Van Oostenryck, Dave Martin, Khalid Aziz,
enh, Jason Gunthorpe, Christoph Hellwig, Dmitry Vyukov,
Kostya Serebryany, Evgeniy Stepanov, Lee Smith,
Ramana Radhakrishnan, Jacob Bramley, Ruben Ayrapetyan,
Robin Murphy, Kevin Brodsky, Szabolcs Nagy
On Tue, Jun 4, 2019 at 1:46 PM Koenig, Christian
<Christian.Koenig@amd.com> wrote:
>
> Am 04.06.19 um 13:44 schrieb Andrey Konovalov:
> > Architectures that support memory tagging have a need to perform untagging
> > (stripping the tag) in various parts of the kernel. This patch adds an
> > untagged_addr() macro, which is defined as noop for architectures that do
> > not support memory tagging. The oncoming patch series will define it at
> > least for sparc64 and arm64.
> >
> > Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> > Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > ---
> > include/linux/mm.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index 0e8834ac32b7..949d43e9c0b6 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
> > #include <asm/pgtable.h>
> > #include <asm/processor.h>
> >
> > +#ifndef untagged_addr
> > +#define untagged_addr(addr) (addr)
> > +#endif
> > +
>
> Maybe add a comment what tagging actually is? Cause that is not really
> obvious from the context.
Hi,
Do you mean a comment in the code or an explanation in the patch description?
Thanks!
>
> Christian.
>
> > #ifndef __pa_symbol
> > #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
> > #endif
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] uaccess: add noop untagged_addr definition
2019-06-04 11:48 ` Andrey Konovalov
@ 2019-06-04 11:49 ` Koenig, Christian
2019-06-04 12:05 ` Andrey Konovalov
0 siblings, 1 reply; 5+ messages in thread
From: Koenig, Christian @ 2019-06-04 11:49 UTC (permalink / raw)
To: Andrey Konovalov
Cc: Linus Torvalds, linux-arm-kernel, sparclinux, linux-mm,
linux-kernel, Catalin Marinas, Vincenzo Frascino, Will Deacon,
Mark Rutland, Andrew Morton, Greg Kroah-Hartman, Kees Cook,
Yishai Hadas, Kuehling, Felix, Deucher, Alexander,
Mauro Carvalho Chehab, Jens Wiklander, Alex Williamson,
Leon Romanovsky, Luc Van Oostenryck, Dave Martin, Khalid Aziz,
enh, Jason Gunthorpe, Christoph Hellwig, Dmitry Vyukov,
Kostya Serebryany, Evgeniy Stepanov, Lee Smith,
Ramana Radhakrishnan, Jacob Bramley, Ruben Ayrapetyan,
Robin Murphy, Kevin Brodsky, Szabolcs Nagy
Am 04.06.19 um 13:48 schrieb Andrey Konovalov:
> On Tue, Jun 4, 2019 at 1:46 PM Koenig, Christian
> <Christian.Koenig@amd.com> wrote:
>> Am 04.06.19 um 13:44 schrieb Andrey Konovalov:
>>> Architectures that support memory tagging have a need to perform untagging
>>> (stripping the tag) in various parts of the kernel. This patch adds an
>>> untagged_addr() macro, which is defined as noop for architectures that do
>>> not support memory tagging. The oncoming patch series will define it at
>>> least for sparc64 and arm64.
>>>
>>> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
>>> Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
>>> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>>> ---
>>> include/linux/mm.h | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>>> index 0e8834ac32b7..949d43e9c0b6 100644
>>> --- a/include/linux/mm.h
>>> +++ b/include/linux/mm.h
>>> @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
>>> #include <asm/pgtable.h>
>>> #include <asm/processor.h>
>>>
>>> +#ifndef untagged_addr
>>> +#define untagged_addr(addr) (addr)
>>> +#endif
>>> +
>> Maybe add a comment what tagging actually is? Cause that is not really
>> obvious from the context.
> Hi,
>
> Do you mean a comment in the code or an explanation in the patch description?
The code, the patch description actually sounds good to me.
Christian.
>
> Thanks!
>
>> Christian.
>>
>>> #ifndef __pa_symbol
>>> #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
>>> #endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] uaccess: add noop untagged_addr definition
2019-06-04 11:49 ` Koenig, Christian
@ 2019-06-04 12:05 ` Andrey Konovalov
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Konovalov @ 2019-06-04 12:05 UTC (permalink / raw)
To: Koenig, Christian
Cc: Linus Torvalds, linux-arm-kernel, sparclinux, linux-mm,
linux-kernel, Catalin Marinas, Vincenzo Frascino, Will Deacon,
Mark Rutland, Andrew Morton, Greg Kroah-Hartman, Kees Cook,
Yishai Hadas, Kuehling, Felix, Deucher, Alexander,
Mauro Carvalho Chehab, Jens Wiklander, Alex Williamson,
Leon Romanovsky, Luc Van Oostenryck, Dave Martin, Khalid Aziz,
enh, Jason Gunthorpe, Christoph Hellwig, Dmitry Vyukov,
Kostya Serebryany, Evgeniy Stepanov, Lee Smith,
Ramana Radhakrishnan, Jacob Bramley, Ruben Ayrapetyan,
Robin Murphy, Kevin Brodsky, Szabolcs Nagy
On Tue, Jun 4, 2019 at 1:49 PM Koenig, Christian
<Christian.Koenig@amd.com> wrote:
>
> Am 04.06.19 um 13:48 schrieb Andrey Konovalov:
> > On Tue, Jun 4, 2019 at 1:46 PM Koenig, Christian
> > <Christian.Koenig@amd.com> wrote:
> >> Am 04.06.19 um 13:44 schrieb Andrey Konovalov:
> >>> Architectures that support memory tagging have a need to perform untagging
> >>> (stripping the tag) in various parts of the kernel. This patch adds an
> >>> untagged_addr() macro, which is defined as noop for architectures that do
> >>> not support memory tagging. The oncoming patch series will define it at
> >>> least for sparc64 and arm64.
> >>>
> >>> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> >>> Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
> >>> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> >>> ---
> >>> include/linux/mm.h | 4 ++++
> >>> 1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/include/linux/mm.h b/include/linux/mm.h
> >>> index 0e8834ac32b7..949d43e9c0b6 100644
> >>> --- a/include/linux/mm.h
> >>> +++ b/include/linux/mm.h
> >>> @@ -99,6 +99,10 @@ extern int mmap_rnd_compat_bits __read_mostly;
> >>> #include <asm/pgtable.h>
> >>> #include <asm/processor.h>
> >>>
> >>> +#ifndef untagged_addr
> >>> +#define untagged_addr(addr) (addr)
> >>> +#endif
> >>> +
> >> Maybe add a comment what tagging actually is? Cause that is not really
> >> obvious from the context.
> > Hi,
> >
> > Do you mean a comment in the code or an explanation in the patch description?
>
> The code, the patch description actually sounds good to me.
Sent v2, thanks!
>
> Christian.
>
> >
> > Thanks!
> >
> >> Christian.
> >>
> >>> #ifndef __pa_symbol
> >>> #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x), 0))
> >>> #endif
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-04 12:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 11:44 [PATCH] uaccess: add noop untagged_addr definition Andrey Konovalov
2019-06-04 11:46 ` Koenig, Christian
2019-06-04 11:48 ` Andrey Konovalov
2019-06-04 11:49 ` Koenig, Christian
2019-06-04 12:05 ` Andrey Konovalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox