From: Luis Araneda <luaraneda@gmail.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Michal Simek <michal.simek@xilinx.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up
Date: Wed, 31 Jul 2019 00:12:11 -0400 [thread overview]
Message-ID: <CAHbBuxoMBiq23Rkt7-jm42O4ePY=23ZsgNEVf3UJKQ2Dg+3fbg@mail.gmail.com> (raw)
In-Reply-To: <20190730104746.GA1330@shell.armlinux.org.uk>
Hi Russell,
Thanks for reviewing.
On Tue, Jul 30, 2019 at 6:47 AM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Tue, Jul 30, 2019 at 12:43:26AM -0400, Luis Araneda wrote:
> > This fixes a kernel panic (read overflow) on memcpy when
> > FORTIFY_SOURCE is enabled.
[...]
>
> I'm not convinced that this is correct. It looks like
> zynq_secondary_trampoline could be either ARM or Thumb code - there is
> no .arm directive before it. If it's ARM code, then this is fine. If
> Thumb code, then zynq_secondary_trampoline will be offset by one, and
> we will miss copying the first byte of code.
You're right, I tested what happens if the zynq_secondary_trampoline
is ARM or Thumb by editing the file where it's defined, headsmp.S
When the .arm directive is used, the CPU is brought-up correctly,
but if I use .thumb, I get the following message (no panic):
> CPU1: failed to come online
This seems unrelated to solving the panic, as the message
even appears with memcpy and FORTIFY_SOURCE disabled.
I could add the .arm directive to headsmp.S
Is that your expected solution?
Should that change be on a separate commit?
I'd like to know Michal's opinion, as he wrote the code.
next prev parent reply other threads:[~2019-07-31 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 4:43 [RFC PATCH] ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up Luis Araneda
2019-07-30 10:47 ` Russell King - ARM Linux admin
2019-07-31 4:12 ` Luis Araneda [this message]
2019-08-05 9:53 ` Michal Simek
2019-08-06 1:52 ` Luis Araneda
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='CAHbBuxoMBiq23Rkt7-jm42O4ePY=23ZsgNEVf3UJKQ2Dg+3fbg@mail.gmail.com' \
--to=luaraneda@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@xilinx.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;
as well as URLs for NNTP newsgroup(s).