From: Andrew Cooper <andrew.cooper3@citrix.com>
To: hpa@zytor.com
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
bp@alien8.de, dave.hansen@linux.intel.com, edumazet@google.com,
eric.dumazet@gmail.com, linux-kernel@vger.kernel.org,
mingo@redhat.com, tglx@linutronix.de,
torvalds@linux-foundation.org, ubizjak@gmail.com, x86@kernel.org
Subject: Re: [PATCH 2/2] x86/irqflags: Use ASM_OUTPUT_RM in native_save_fl()
Date: Mon, 22 Dec 2025 16:51:10 +0000 [thread overview]
Message-ID: <0a8b8c63-54dc-4194-bdd8-28c9c3fedc54@citrix.com> (raw)
In-Reply-To: <B47FE4E4-477A-44EA-ABC9-C50E31D71135@zytor.com>
>> But something like __builtin_ia32_readeflags_u64() is just entirely
>> pointless. What is the supposed advantage over just doing inline
>> assembly?
>
> Unless they are doing something like actually leaving it on the stack... yeah.
It's not just pointless, it's actively dangerous.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104971
At least with inline assembly, it's the programmer's fault when making a
mistake like this.
~Andrew
prev parent reply other threads:[~2025-12-22 16:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 11:20 [PATCH 0/2] x86: speedup local_irq_save() for clang Eric Dumazet
2025-12-19 11:20 ` [PATCH 1/2] clang: work around asm output constraint problems Eric Dumazet
2025-12-20 22:32 ` Linus Torvalds
2025-12-21 3:46 ` Eric Dumazet
2025-12-19 11:20 ` [PATCH 2/2] x86/irqflags: Use ASM_OUTPUT_RM in native_save_fl() Eric Dumazet
2025-12-21 21:39 ` H. Peter Anvin
2025-12-21 21:47 ` Eric Dumazet
2025-12-21 23:20 ` Linus Torvalds
2025-12-21 23:44 ` H. Peter Anvin
2025-12-22 1:38 ` Linus Torvalds
2025-12-22 4:25 ` H. Peter Anvin
2025-12-22 16:51 ` 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=0a8b8c63-54dc-4194-bdd8-28c9c3fedc54@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.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®