[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+fCnZdunJhoNgsQMm4cPyephj9L7sMq-YF9sE7ANk0e7h7d=Q@mail.gmail.com>
Date: Fri, 21 Mar 2025 21:16:12 +0100
From: Andrey Konovalov <andreyknvl@...il.com>
To: Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>
Cc: Florian Mayer <fmayer@...gle.com>, Vitaly Buka <vitalybuka@...gle.com>, 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, Mar 21, 2025 at 8:21 PM Maciej Wieczor-Retman
<maciej.wieczor-retman@...el.com> wrote:
>
> >To account for this, let's then set hwasan-instrument-with-calls=0
> >when CONFIG_KASAN_INLINE is enabled. And also please add a comment
> >explaining why this is done.
>
> After adding this option the kernel doesn't want to boot past uncompressing :b
>
> I went into Samuel's clang PR [1] and found there might be one more LShr that
> needs changing into AShr [2]? But I'm not very good at clang code. Do you maybe
> know if anything else in the clang code could be messing things up?
>
> After changing that LShr to AShr it moves a little further and hangs on some
> initmem setup code. Then I thought my KASAN_SHADOW_OFFSET is an issue so I
> changed to 4-level paging and the offset to 0xfffffc0000000000 and it moves a
> little further and panics on kmem_cache_init. I'll be debugging that further but
> just thought I'd ask if you know about something missing from the compiler side?
>
> [1] https://github.com/llvm/llvm-project/pull/103727
> [2] https://github.com/SiFiveHolland/llvm-project/blob/up/hwasan-opt/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp#L995
Hm, I only recall looking at the compiler code when investigating [1].
But as this series points out, [1] can be considered a feature and not
a bug. Other than that, nothing comes to mind.
Thanks!
[1] https://bugzilla.kernel.org/show_bug.cgi?id=218043
Powered by blists - more mailing lists