[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49849e0b-5ed6-44a4-94b3-1d5dd54b9a29@amd.com>
Date: Tue, 20 Aug 2024 16:22:18 +0530
From: Shivank Garg <shivankg@....com>
To: Brendan Jackman <jackmanb@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, Alexandre Chartre <alexandre.chartre@...cle.com>,
Liran Alon <liran.alon@...cle.com>,
Jan Setje-Eilers <jan.setjeeilers@...cle.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Andrew Morton <akpm@...ux-foundation.org>, Mel Gorman <mgorman@...e.de>,
Lorenzo Stoakes <lstoakes@...il.com>, David Hildenbrand <david@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>, Michal Hocko <mhocko@...nel.org>,
Khalid Aziz <khalid.aziz@...cle.com>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Valentin Schneider <vschneid@...hat.com>, Paul Turner <pjt@...gle.com>,
Reiji Watanabe <reijiw@...gle.com>, Junaid Shahid <junaids@...gle.com>,
Ofir Weisse <oweisse@...gle.com>, Yosry Ahmed <yosryahmed@...gle.com>,
Patrick Bellasi <derkling@...gle.com>, KP Singh <kpsingh@...gle.com>,
Alexandra Sandulescu <aesa@...gle.com>, Matteo Rizzo
<matteorizzo@...gle.com>, Jann Horn <jannh@...gle.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kvm@...r.kernel.org
Subject: Re: [PATCH 26/26] KVM: x86: asi: Add some mitigations on address
space transitions
Hi Brendan,
> .:: Minor issues
>
> - fill_return_buffer() causes an “unreachable instruction” objtool
> warning. I haven’t investigated this.
> +
> +.pushsection .noinstr.text, "ax"
> +SYM_CODE_START(fill_return_buffer)
> + __FILL_RETURN_BUFFER(%_ASM_AX,RSB_CLEAR_LOOPS)
> + RET
> +SYM_CODE_END(fill_return_buffer)
> +.popsection
>
I'm getting this error when buiding the ASI patchset:
OBJCOPY modules.builtin.modinfo
GEN modules.builtin
GEN .vmlinux.objs
MODPOST Module.symvers
ERROR: modpost: "fill_return_buffer" [arch/x86/kvm/kvm.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 1
make[1]: *** [/home/shivank/linux/Makefile:1871: modpost] Error 2
make: *** [Makefile:240: __sub-make] Error 2
I'm wondering if we need to annotate the asm code with
UNWIND_HINT_FUNC and EXPORT the fill_return_buffer and to avoid this?
---
diff --git a/arch/x86/lib/retpoline.S b/arch/x86/lib/retpoline.S
index db5b8ee01efe..4084ab49e2a7 100644
--- a/arch/x86/lib/retpoline.S
+++ b/arch/x86/lib/retpoline.S
@@ -399,7 +399,9 @@ EXPORT_SYMBOL(__x86_return_thunk)
.pushsection .noinstr.text, "ax"
SYM_CODE_START(fill_return_buffer)
+ UNWIND_HINT_FUNC
__FILL_RETURN_BUFFER(%_ASM_AX,RSB_CLEAR_LOOPS)
RET
SYM_CODE_END(fill_return_buffer)
+__EXPORT_THUNK(fill_return_buffer)
.popsection
---
This solved the issue for me.
Thanks,
Shivank
Powered by blists - more mailing lists