From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sami Tolvanen <samitolvanen@google.com>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Ard Biesheuvel <ardb@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev
Subject: Re: [PATCH v5 04/10] ARM: mm: Type-annotate all cache assembly routines
Date: Mon, 29 Apr 2024 14:18:28 +0100 [thread overview]
Message-ID: <Zi+eJM8+ulDBYGrQ@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240415-arm32-cfi-v5-4-ff11093eeccc@linaro.org>
On Mon, Apr 15, 2024 at 03:43:23PM +0200, Linus Walleij wrote:
> -ENTRY(fa_flush_user_cache_all)
> - /* FALLTHROUGH */
> +SYM_TYPED_FUNC_START(fa_flush_user_cache_all)
> + b fa_flush_kern_cache_all
> +SYM_FUNC_END(fa_flush_user_cache_all)
The thing I don't like about this is that it makes these functions
less efficient - the early CPUs do _not_ have branch predictors,
and they flush the pipeline on branches, so rather than just dropping
rough, this kind of thing introduces pointless multi-cycle delays for
functionality just to keep CFI happy.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sami Tolvanen <samitolvanen@google.com>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Ard Biesheuvel <ardb@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev
Subject: Re: [PATCH v5 04/10] ARM: mm: Type-annotate all cache assembly routines
Date: Mon, 29 Apr 2024 14:18:28 +0100 [thread overview]
Message-ID: <Zi+eJM8+ulDBYGrQ@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240415-arm32-cfi-v5-4-ff11093eeccc@linaro.org>
On Mon, Apr 15, 2024 at 03:43:23PM +0200, Linus Walleij wrote:
> -ENTRY(fa_flush_user_cache_all)
> - /* FALLTHROUGH */
> +SYM_TYPED_FUNC_START(fa_flush_user_cache_all)
> + b fa_flush_kern_cache_all
> +SYM_FUNC_END(fa_flush_user_cache_all)
The thing I don't like about this is that it makes these functions
less efficient - the early CPUs do _not_ have branch predictors,
and they flush the pipeline on branches, so rather than just dropping
rough, this kind of thing introduces pointless multi-cycle delays for
functionality just to keep CFI happy.
--
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-29 13:18 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 13:43 [PATCH v5 00/10] CFI for ARM32 using LLVM Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 01/10] ARM: bugs: Check in the vtable instead of defined aliases Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 02/10] ARM: ftrace: Define ftrace_stub_graph Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 03/10] ARM: mm: Make tlbflush routines CFI safe Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 04/10] ARM: mm: Type-annotate all cache assembly routines Linus Walleij
2024-04-15 16:35 ` Ard Biesheuvel
2024-04-15 16:35 ` Ard Biesheuvel
2024-04-16 7:38 ` Linus Walleij
2024-04-16 7:38 ` Linus Walleij
2024-04-29 13:18 ` Russell King (Oracle) [this message]
2024-04-29 13:18 ` Russell King (Oracle)
2024-04-15 13:43 ` [PATCH v5 05/10] ARM: mm: Rewrite cacheflush vtables in CFI safe C Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 06/10] ARM: mm Type-annotate all per-processor assembly routines Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 07/10] ARM: mm: Define prototypes for all per-processor calls Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 08/10] ARM: lib: Annotate loop delay instructions for CFI Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 09/10] ARM: hw_breakpoint: Handle CFI breakpoints Linus Walleij
2024-04-15 13:43 ` Linus Walleij
2024-04-15 13:43 ` [PATCH v5 10/10] ARM: Support CLANG CFI Linus Walleij
2024-04-15 13:43 ` Linus Walleij
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=Zi+eJM8+ulDBYGrQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.