Re: [PATCH] m68k: Implement _THIS_IP_ using inline asm

Marco Elver <[email protected]>
Newsgroups org.kernel.vger.linux-m68k,org.kernel.vger.linux-kernel
Message-ID <CANpmjNODXLyV3E62v-52Py5SbvpTjhf3iFiSWAHaFM=G5D=tEg@mail.gmail.com>
On Thu, 21 May 2026 at 17:14, Andreas Schwab <[email protected]> wrote:
>
> On Mai 21 2026, Marco Elver wrote:
>
> > version. Additionally, avoiding taking the address of a label prevents
> > compilers from emitting spurious indirect branch targets (e.g. ENDBR or
> > BTI) under control-flow integrity schemes.
>
> Ignoring the fact that m68k will never gain such a feature, dot is still
> a label.  If you want to avoid a label, you need to use %pc(0) (or
> %pc(-2) for an address at insn boundary).

The problematic label here is a C-label.
The inline asm can use labels just fine, and would never affect
codegen as stated.

If this version looks correct to you, feel free to strip the CFI
sentence from the patch description.

Thanks,
-- Marco
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.