[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+fCnZe1U_nV_ByK2+XjBdXq0WNYzB0f30BsrsZKcxyOSu9cTg@mail.gmail.com>
Date: Sat, 22 Feb 2025 16:08:25 +0100
From: Andrey Konovalov <andreyknvl@...il.com>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>
Cc: kees@...nel.org, julian.stecklina@...erus-technology.de,
kevinloughlin@...gle.com, peterz@...radead.org, tglx@...utronix.de,
justinstitt@...gle.com, catalin.marinas@....com, wangkefeng.wang@...wei.com,
bhe@...hat.com, ryabinin.a.a@...il.com, kirill.shutemov@...ux.intel.com,
will@...nel.org, ardb@...nel.org, jason.andryuk@....com,
dave.hansen@...ux.intel.com, pasha.tatashin@...een.com,
ndesaulniers@...gle.com, guoweikang.kernel@...il.com, dwmw@...zon.co.uk,
mark.rutland@....com, broonie@...nel.org, apopple@...dia.com, bp@...en8.de,
rppt@...nel.org, kaleshsingh@...gle.com, richard.weiyang@...il.com,
luto@...nel.org, glider@...gle.com, pankaj.gupta@....com,
pawan.kumar.gupta@...ux.intel.com, kuan-ying.lee@...onical.com,
tony.luck@...el.com, tj@...nel.org, jgross@...e.com, dvyukov@...gle.com,
baohua@...nel.org, samuel.holland@...ive.com, dennis@...nel.org,
akpm@...ux-foundation.org, thomas.weissschuh@...utronix.de, surenb@...gle.com,
kbingham@...nel.org, ankita@...dia.com, nathan@...nel.org, ziy@...dia.com,
xin@...or.com, rafael.j.wysocki@...el.com, andriy.shevchenko@...ux.intel.com,
cl@...ux.com, jhubbard@...dia.com, hpa@...or.com,
scott@...amperecomputing.com, david@...hat.com, jan.kiszka@...mens.com,
vincenzo.frascino@....com, corbet@....net, maz@...nel.org, mingo@...hat.com,
arnd@...db.de, ytcoode@...il.com, xur@...gle.com, morbo@...gle.com,
thiago.bauermann@...aro.org, linux-doc@...r.kernel.org,
kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org, x86@...nel.org
Subject: Re: [PATCH v2 13/14] x86: runtime_const used for KASAN_SHADOW_END
On Fri, Feb 21, 2025 at 4:27 PM Maciej Wieczor-Retman
<maciej.wieczor-retman@...el.com> wrote:
>
> Also I was wondering if you know what "hwasan-mapping-offset-dynamic" option is?
> I noticed it in the llvm docs but can't find a good description what it does,
> even from looking at the code in HWAddressSanitizer.cpp. If
> hwasan-mapping-offset is not implemeneted for x86 I doubt this is but maybe it
> could help in a cleaner makefile for x86 at least? Especially once these options
> will be working in x86 llvm.
Yeah, reading the code [1] works better to understand these options.
My understanding is that specifying
-hwasan-mapping-offset-dynamic=global without -hwasan-mapping-offset
would make the generated code get the shadow memory address from the
__hwasan_shadow_memory_dynamic_address global variable. This option is
in the common code, so it should work on x86 too. But I believe it's
intended for userspace, not sure if it would work for the kernel.
Even if we use this option, I don't get how it would make the Makefile
cleaner - to me it already looks clean tbh :) But it will possibly
make KASAN work slower.
[1] https://github.com/llvm/llvm-project/blob/llvmorg-21-init/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp#L1929
Powered by blists - more mailing lists