[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190926152210.GI9689@arrakis.emea.arm.com>
Date: Thu, 26 Sep 2019 16:22:11 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Vincenzo Frascino <vincenzo.frascino@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
ard.biesheuvel@...aro.org, ndesaulniers@...gle.com,
will@...nel.org, tglx@...utronix.de
Subject: Re: [PATCH v2 3/4] arm64: vdso32: Fix compilation warning
On Thu, Sep 26, 2019 at 02:38:04PM +0100, Vincenzo Frascino wrote:
> diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
> index b61b50bf68b1..cfa9cd87af14 100644
> --- a/arch/arm64/include/asm/memory.h
> +++ b/arch/arm64/include/asm/memory.h
> @@ -228,11 +228,16 @@ static inline unsigned long kaslr_offset(void)
> #define __tag_get(addr) 0
> #endif /* CONFIG_KASAN_SW_TAGS */
>
> +#ifdef __aarch64__
> static inline const void *__tag_set(const void *addr, u8 tag)
> {
> u64 __addr = (u64)addr & ~__tag_shifted(0xff);
> return (const void *)(__addr | __tag_shifted(tag));
> }
> +#else
> +/* Unused in compat vdso */
> +#define __tag_set(addr, tag) 0
> +#endif
Do we actually need an #else block here? I think the #ifdef is
sufficient, with a comment along the lines of "Do not attempt to compile
when included in the compat vdso" (or pick some better wording).
--
Catalin
Powered by blists - more mailing lists