Misaligned patch-site bcm2836_arm_irqchip_handle_irq+0x0/0x88

Mark Rutland mark.rutland at arm.com
Mon Feb 27 04:10:05 PST 2023


On Mon, Feb 27, 2023 at 11:32:22AM +0000, Mark Rutland wrote:
> Hi Florian,
> 
> On Sat, Feb 25, 2023 at 07:26:50AM -0800, Florian Fainelli wrote:
> > On 2/25/2023 2:37 AM, Marc Zyngier wrote:
> > > On Fri, 24 Feb 2023 23:39:24 +0000,
> > > Florian Fainelli <f.fainelli at gmail.com> wrote:
> > > > 
> > > > Hello,
> > > > 
> > > > You will find a complete boot log [1] below that shows the failure as
> > > > well as the configuration file [2], however I am hitting what you see
> > > > below as of v6.2-10217-ga93e884edf61. Have not tried linux-next yet,
> > > > so if this is a known issue, please ignore :)
> > > > 
> > > > This is seen with on a Raspberry pi 4B running in AArch64 mode.
> > > > 
> > > > [1]: https://gist.github.com/b1a977b5fea837d180ccb800f091218a
> > > > [2]: https://gist.github.com/64cf18b6ee770d58f64371e1db01afb9
> > > 
> > >  From the config file:
> > > 
> > > CONFIG_ARM=y
> > > 
> > > Can you please provide the config file for the build you're seeing
> > > this on?
> > 
> > Yes, sorry about that, here is the 64-bit configuration:
> > 
> > https://gist.github.com/4eb83740c25b10f75b54560f8c8febb1
> 
> I think the problem here is:
> 
>   CONFIG_CC_OPTIMIZE_FOR_SIZE=y
> 
> ... since GCC is known to ignore function alignment when -Os is passed.
> 
> We can have DYNANMIC_FTRACE_WITH_CALL_OPS depend on
> !CONFIG_CC_OPTIMIZE_FOR_SIZE to prevent that.

I've sent out a patch updating arm64's Kconfig to handle this, which should
appear at:

  https://lore.kernel.org/linux-arm-kernel/20230227115819.365630-1-mark.rutland@arm.com

... once lore next updates.

In local testing with GCC 11.3.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE=y that did the
right thing and disabled CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS (and consequently
removed the warning).

Thanks,
Mark.



More information about the linux-arm-kernel mailing list