From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Sami Tolvanen <samitolvanen@google.com>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev
Subject: Re: [PATCH] ARM: Use conditionals for CFI branches
Date: Tue, 30 Apr 2024 10:23:20 +0100 [thread overview]
Message-ID: <ZjC4iL7lAvReKbx0@shell.armlinux.org.uk> (raw)
In-Reply-To: <CAMj1kXEfQYMk-PHBDBJS-LxTcx72+6ZZVffGtnoiHB4KcdoaSQ@mail.gmail.com>
On Tue, Apr 30, 2024 at 11:18:55AM +0200, Ard Biesheuvel wrote:
> On Tue, 30 Apr 2024 at 10:26, Linus Walleij <linus.walleij@linaro.org> wrote:
> > diff --git a/arch/arm/mm/cache-fa.S b/arch/arm/mm/cache-fa.S
> > index db454033b76f..4a3668b52a2d 100644
> > --- a/arch/arm/mm/cache-fa.S
> > +++ b/arch/arm/mm/cache-fa.S
> > @@ -112,7 +112,9 @@ SYM_FUNC_END(fa_flush_user_cache_range)
> > * - end - virtual end address
> > */
> > SYM_TYPED_FUNC_START(fa_coherent_kern_range)
> > +#ifdef CONFIG_CFI_CLANG /* Fallthrough if !CFI */
>
> These functions are only called indirectly if MULTI_CACHE is enabled,
> right? If so, this could be
>
> #if defined(CONFIG_CFI_CLANG) && defined(MULTI_CACHE)
I don't see that makes any difference. Whether or not they're called
indirectly, the symbol is the entry point to the function. If called
directly and the useless branch is there, we'll incur the overhead of
the BL instruction flushing the pipeline followed immediately by the
overhead of the B instruction flushing the pipeline again.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-04-30 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 8:26 [PATCH] ARM: Use conditionals for CFI branches Linus Walleij
2024-04-30 9:18 ` Ard Biesheuvel
2024-04-30 9:23 ` Russell King (Oracle) [this message]
2024-04-30 9:37 ` Ard Biesheuvel
2024-04-30 11:45 ` Linus Walleij
2024-04-30 13:45 ` Ard Biesheuvel
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=ZjC4iL7lAvReKbx0@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=samitolvanen@google.com \
/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