From: Florian Fainelli <f.fainelli@gmail.com>
To: Mark Rutland <mark.rutland@arm.com>,
linux-arm-kernel@lists.infradead.org
Cc: catalin.marinas@arm.com, maz@kernel.org, rostedt@goodmis.org,
stefan.wahren@i2se.com, will@kernel.org
Subject: Re: [PATCH] arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE
Date: Mon, 27 Feb 2023 11:56:32 -0800 [thread overview]
Message-ID: <b8c2b11a-c94a-80cb-8bfa-8673e96bd82c@gmail.com> (raw)
In-Reply-To: <20230227115819.365630-1-mark.rutland@arm.com>
On 2/27/2023 3:58 AM, Mark Rutland wrote:
> Florian reports that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE=y,
> he sees "Misaligned patch-site" warnings at boot, e.g.
>
> | Misaligned patch-site bcm2836_arm_irqchip_handle_irq+0x0/0x88
> | WARNING: CPU: 0 PID: 0 at arch/arm64/kernel/ftrace.c:120 ftrace_call_adjust+0x4c/0x70
>
> This is because GCC will silently ignore `-falign-functions=N` when
> passed `-Os`, resulting in functions not being aligned as we expect.
> This is a known issue, and to account for this we modified the kernel to
> avoid `-Os` generally. Unfortunately we forgot to account for
> CONFIG_CC_OPTIMIZE_FOR_SIZE.
>
> Forbid the use of CALL_OPS with CONFIG_CC_OPTIMIZE_FOR_SIZE=y to prevent
> this issue. All exising ftrace features will work as before, though
> without the performance benefit of CALL_OPS.
>
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Link: http://lore.kernel.org/linux-arm-kernel/2d9284c3-3805-402b-5423-520ced56d047@gmail.com
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Stefan Wahren <stefan.wahren@i2se.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Will Deacon <will@kernel.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Thanks Mark!
--
Florian
_______________________________________________
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:[~2023-02-27 19:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 11:58 [PATCH] arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE Mark Rutland
2023-02-27 19:56 ` Florian Fainelli [this message]
2023-02-28 13:54 ` Catalin Marinas
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=b8c2b11a-c94a-80cb-8bfa-8673e96bd82c@gmail.com \
--to=f.fainelli@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stefan.wahren@i2se.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).