From: Juergen Gross <jgross@suse.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Ingo Molnar <mingo@kernel.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH] objtool: Fix SYSCALL instruction handling and INSN_CONTEXT_SWITCH
Date: Fri, 4 Apr 2025 17:03:26 +0200 [thread overview]
Message-ID: <de4fa449-8b33-481f-86f3-190be450541b@suse.com> (raw)
In-Reply-To: <iqalk74mk6onmntltkpodnbtp7zxxgx3u3ycuipmkizcmz7uvm@b7j7kubwzpl6>
[-- Attachment #1.1.1: Type: text/plain, Size: 936 bytes --]
On 04.04.25 16:46, Josh Poimboeuf wrote:
> On Fri, Apr 04, 2025 at 12:49:38PM +0200, Peter Zijlstra wrote:
>> On Thu, Apr 03, 2025 at 11:48:13AM -0700, Josh Poimboeuf wrote:
>>
>>> The real problem here is that INSN_CONTEXT_SWITCH is ambiguous. It can
>>> represent both call semantics (SYSCALL, SYSENTER) and return semantics
>>> (SYSRET, IRET, RETS, RETU). Those differ significantly: calls preserve
>>> control flow whereas returns terminate it.
>>
>> Does that not rather suggest we should perhaps have INSN_SYSCALL /
>> INSN_SYSRET to replace the single ambiguous thing?
>
> Is there any reason to have INSN_SYSCALL in the first place?
>
xen_hypercall_pv() needs a syscall which will return after the call of
the hypervisor.
xen_iret() is a special case where the syscall won't return.
Whether objtool has a need for special casing it is another question I
don't feel qualified to answer.
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
prev parent reply other threads:[~2025-04-04 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 18:48 [PATCH] objtool: Fix SYSCALL instruction handling and INSN_CONTEXT_SWITCH Josh Poimboeuf
2025-04-03 18:57 ` Andrew Cooper
2025-04-03 19:05 ` Josh Poimboeuf
2025-04-03 19:15 ` Andrew Cooper
2025-04-03 19:20 ` Josh Poimboeuf
2025-04-04 7:40 ` Jürgen Groß
2025-04-04 10:49 ` Peter Zijlstra
2025-04-04 14:46 ` Josh Poimboeuf
2025-04-04 14:54 ` Peter Zijlstra
2025-04-04 15:02 ` Josh Poimboeuf
2025-04-04 15:03 ` Juergen Gross [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=de4fa449-8b33-481f-86f3-190be450541b@suse.com \
--to=jgross@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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