From: Borislav Petkov <bp@alien8.de>
To: linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org,
kernel test robot <lkp@intel.com>,
Sean Christopherson <seanjc@google.com>,
x86@kernel.org
Subject: Re: [tip: x86/alternatives] x86/alternatives, kvm: Fix a couple of CALLs without a frame pointer
Date: Thu, 20 Jun 2024 10:48:53 +0200 [thread overview]
Message-ID: <20240620084853.GAZnPs9Q94aakywkUn@fat_crate.local> (raw)
In-Reply-To: <171878639288.10875.12927337921927674667.tip-bot2@tip-bot2>
On Wed, Jun 19, 2024 at 08:39:52AM -0000, tip-bot2 for Borislav Petkov (AMD) wrote:
> The following commit has been merged into the x86/alternatives branch of tip:
>
> Commit-ID: 93f78dadee5e56ae48aff567583d503868aa3bf2
> Gitweb: https://git.kernel.org/tip/93f78dadee5e56ae48aff567583d503868aa3bf2
> Author: Borislav Petkov (AMD) <bp@alien8.de>
> AuthorDate: Tue, 18 Jun 2024 21:57:27 +02:00
> Committer: Borislav Petkov (AMD) <bp@alien8.de>
> CommitterDate: Wed, 19 Jun 2024 10:33:25 +02:00
>
> x86/alternatives, kvm: Fix a couple of CALLs without a frame pointer
>
> objtool complains:
>
> arch/x86/kvm/kvm.o: warning: objtool: .altinstr_replacement+0xc5: call without frame pointer save/setup
> vmlinux.o: warning: objtool: .altinstr_replacement+0x2eb: call without frame pointer save/setup
>
> Make sure rSP is an output operand to the respective asm() statements.
>
> The test_cc() hunk courtesy of peterz. Also from him add some helpful
> debugging info to the documentation.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202406141648.jO9qNGLa-lkp@intel.com/
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> Acked-by: Sean Christopherson <seanjc@google.com>
> ---
> arch/x86/include/asm/alternative.h | 2 +-
> arch/x86/kernel/alternative.c | 2 +-
> arch/x86/kvm/emulate.c | 2 +-
> tools/objtool/Documentation/objtool.txt | 19 +++++++++++++++++++
> 4 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
> index 89fa50d..8cff462 100644
> --- a/arch/x86/include/asm/alternative.h
> +++ b/arch/x86/include/asm/alternative.h
> @@ -248,7 +248,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
> */
> #define alternative_call(oldfunc, newfunc, ft_flags, output, input...) \
> asm_inline volatile(ALTERNATIVE("call %c[old]", "call %c[new]", ft_flags) \
> - : output : [old] "i" (oldfunc), [new] "i" (newfunc), ## input)
> + : output, ASM_CALL_CONSTRAINT : [old] "i" (oldfunc), [new] "i" (newfunc), ## input)
Yeah, this doesn't fly currently:
https://lore.kernel.org/r/202406200507.AXxJ6Bmw-lkp@intel.com
because those atomic64_32.h macros do
alternative_atomic64(set, /* no output */,
"S" (v), "b" (low), "c" (high)
so without an output, it ends up becoming:
asm __inline volatile("# ALT: oldinstr\n" ... ".popsection\n" : , "+r" (current_stack_pointer) : [old] "i" ...
note the preceding ",".
And I can't do "output..." macro argument with ellipsis and paste with "##
output" because "input..." already does that. :-\
So I am not sure what to do here. Removing the ASM_CALL_CONSTRAINT works,
let's see whether it passes build tests.
Or add dummy output arguments to the three atomic macros which have no
output?
Hm.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2024-06-20 8:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 8:39 tip-bot2 for Borislav Petkov (AMD)
2024-06-20 8:48 ` Borislav Petkov [this message]
2024-06-25 11:20 ` [PATCH -v2] " Borislav Petkov
2024-06-25 15:42 ` Sean Christopherson
2024-07-01 10:58 ` [tip: x86/alternatives] " tip-bot2 for Borislav Petkov (AMD)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240620084853.GAZnPs9Q94aakywkUn@fat_crate.local \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lkp@intel.com \
--cc=seanjc@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®