[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3102a67f-f18e-33c6-4301-4ab4df4db003@gmail.com>
Date: Tue, 4 Mar 2025 16:28:54 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>, Josh Poimboeuf <jpoimboe@...nel.org>
Cc: linux-kernel@...r.kernel.org,
tip-bot2 for Josh Poimboeuf <tip-bot2@...utronix.de>,
linux-tip-commits@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Brian Gerst <brgerst@...il.com>, x86@...nel.org
Subject: Re: [tip: x86/asm] x86/asm: Make ASM_CALL_CONSTRAINT conditional on
frame pointers
On 4. 03. 25 00:59, H. Peter Anvin wrote:
> On March 3, 2025 2:45:48 PM PST, Josh Poimboeuf <jpoimboe@...nel.org> wrote:
>> On Mon, Mar 03, 2025 at 02:31:50PM -0800, H. Peter Anvin wrote:
>>>> +#ifdef CONFIG_UNWINDER_FRAME_POINTER
>>>> #define ASM_CALL_CONSTRAINT "r" (__builtin_frame_address(0))
>>>> +#else
>>>> +#define ASM_CALL_CONSTRAINT
>>>> +#endif
>>>>
>>>> #endif /* __ASSEMBLY__ */
>>>>
>>>
>>> Wait, why was this changed? I actually tested this form at least once
>>> and found that it didn't work under all circumstances...
>>
>> Do you have any more details about where this didn't work? I tested
>> with several configs and it seems to work fine. Objtool will complain
>> if it doesn't work.
>>
>> See here for the justification (the previous version was producing crap
>> code in Clang):
>>
>> https://lore.kernel.org/dbea2ae2fb39bece21013f939ddeb15507baa7d3.1740964309.git.jpoimboe@kernel.org
>>
>
> I need to dig it up, but I had a discussion about this with some gcc people about a year ago.
It was discussed here [1].
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117311
Uros.
Powered by blists - more mailing lists