From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Uros Bizjak <ubizjak@gmail.com>, Ard Biesheuvel <ardb@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Mukesh Rathor <mrathor@linux.microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v2] x86/hyperv: Use __naked attribute to fix stackless C function
Date: Sat, 28 Feb 2026 17:38:43 +0000 [thread overview]
Message-ID: <2dea5b92-cb21-4c04-b49b-3b5f1d0ec97b@citrix.com> (raw)
In-Reply-To: <CAFULd4YTkLLdvjTtGXtHgsZCiEMXAYXcjSwciwdsE-RGvnVrdg@mail.gmail.com>
On 28/02/2026 5:34 pm, Uros Bizjak wrote:
> On Sat, Feb 28, 2026 at 5:41 PM Ard Biesheuvel <ardb@kernel.org> wrote:
>> So I don't see any reason for volatile on hv_msr(). However, I do see a potential issue with the compiler assuming that code after the final asm() block is reachable, and calling unreachable() is not permitted [by Clang] due to the __naked attribute.
> As far as the compiler is concerned, there is "nothing" after the last
> asm() block. It can be marked with noreturn attribute, but I don't
> know how it interacts with the naked attribute.
You can't use __builtin_unreachable() in a naked function. I was going
to suggest it against v1, but alas.
~Andrew
prev parent reply other threads:[~2026-02-28 17:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 22:40 Ard Biesheuvel
2026-02-27 23:03 ` Mukesh R
2026-02-28 3:36 ` Mukesh R
2026-02-27 23:07 ` Andrew Cooper
2026-02-28 6:46 ` Uros Bizjak
2026-02-28 9:38 ` Uros Bizjak
2026-02-28 16:37 ` Ard Biesheuvel
2026-02-28 17:15 ` Uros Bizjak
2026-02-28 10:17 ` Uros Bizjak
2026-02-28 16:40 ` Ard Biesheuvel
2026-02-28 17:34 ` Uros Bizjak
2026-02-28 17:38 ` Andrew Cooper [this message]
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=2dea5b92-cb21-4c04-b49b-3b5f1d0ec97b@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=ardb@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mrathor@linux.microsoft.com \
--cc=ubizjak@gmail.com \
--cc=wei.liu@kernel.org \
--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®