From: Jerome Forissier <jerome@forissier.org>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
maz@kernel.org
Subject: Re: Kernel v5.2+ on HiKey960?
Date: Tue, 10 Dec 2019 17:20:52 +0100 [thread overview]
Message-ID: <740865eb-a993-d1dd-ad2e-84529e2012ee@forissier.org> (raw)
In-Reply-To: <20191206160955.GA27982@willie-the-truck>
On 12/6/19 5:09 PM, Will Deacon wrote:
> On Thu, Dec 05, 2019 at 03:54:10PM +0100, Jerome Forissier wrote:
>> On 12/5/19 9:57 AM, Will Deacon wrote:
>>> On Thu, Dec 05, 2019 at 08:26:48AM +0100, Jerome Forissier wrote:
>>>> On 12/4/19 6:57 PM, Will Deacon wrote:
>>>>> On Wed, Dec 04, 2019 at 03:58:57PM +0100, Jerome Forissier wrote:
>>>>>> Fails indeed (panic): https://pastebin.com/F0jpktii
>>>>>
>>>>> Interesting. I followed your instructions and my board boots fine even
>>>>> after applying that patch, but then I see the following on shutdown:
>>>>>
>>>>> [ 83.022955] WARNING: CPU: 0 PID: 1995 at kernel/time/tick-broadcast.c:647 tick_handle_oneshot_broadcast+0x1c8/0x1e8
>>>>> [ 83.033392] Modules linked in:
>>>>> [ 83.036447] CPU: 0 PID: 1995 Comm: init Tainted: G S 5.1.0-253105-g2b41f6584d59 #3
>>>>
>>>> That is not v5.1 plus one commit, is it?
>>>
>>> No, and I wasn't claiming that it was.
>>
>> ;-) My apologies, I was confused.
>>
>>> I followed the instructions you pointed us to [1] and cherry-picked 75a19a0202db> on top. If there's something different that I need to do in order to
>> reproduce> the problem, then please holler.
>>> My experience with Hikey960 has been 100% "bloody awful"
>>> so I don't have a good setup for simply building and running a kernel on it.
>>>
>>> I also had to hack some of the EDK2 code in there to get it to compile, so
>>> it continues to live up to expectations.
>>
>> What error did you encounter? Is it this one by chance?
>>
>> error: ‘__builtin_strncpy’ output truncated [...]
>>
>> I just noticed GCC 9.x shows this, while GCC 8.x doesn't. So it depends
>> on what distribution you are using. I will need to do something to
>> address this problem.
>
> I just bodged it with a strcpy(), but that's probably not the right fix.
>
> That aside, I'm perplexed that I can't reproduce the exact problem you're
> seeing. Are you doing anything other than thos instructions you provided?
> (e.g. different .config, command line, userspace)
As I replied to Vincenzo, it is not a kernel issue, the culprit is
ccache. To reproduce, you can do the following:
1. Clear the cache: ccache -C
2. Build kernel v5.1 with ccache enabled, then clean the build tree
3. Checkout and build v5.4, still with ccache enabled
4. Boot this kernel: it will hang.
Now if you check the SHA1 hashes of arch/arm64/kernel/vdso/vdso.o in
various scenarios:
- v5.4, no ccache:
b82810f6e9495eb8e787e82b4080654ce4afc30a
- v5.4, with ccache, built from a clean cache:
b82810f6e9495eb8e787e82b4080654ce4afc30a
- v5.1, no ccache:
8c09a2f25969e2bf74799d6b3fb52d0fbc3d58a8
- v5.4, with ccache, after building v5.1 (step 3 above):
8c09a2f25969e2bf74799d6b3fb52d0fbc3d58a8
As you can see, ccache introduces the vdso.o file from an older v5.1
build into a v5.4 kernel. No surprise it won't behave as expected :-/
The problematic thing seems to be the .incbin directive in vdso.S, but
TBH I still don't understand why since I am using ccache v3.7.6 which is
supposed to have fixed this bug... [1]
[1]
https://github.com/ccache/ccache/blob/master/doc/NEWS.adoc#ccache-333
--
Jerome
_______________________________________________
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:[~2019-12-10 16:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 15:43 Kernel v5.2+ on HiKey960? Jerome Forissier
2019-12-03 17:47 ` Marc Zyngier
2019-12-04 9:01 ` Jerome Forissier
2019-12-04 10:18 ` Marc Zyngier
2019-12-04 12:22 ` Jerome Forissier
2019-12-04 12:49 ` Vincenzo Frascino
2019-12-04 13:28 ` Jerome Forissier
2019-12-04 10:18 ` Catalin Marinas
2019-12-04 12:55 ` Vincenzo Frascino
2019-12-04 14:03 ` Jerome Forissier
2019-12-05 12:04 ` Vincenzo Frascino
2019-12-05 14:48 ` Jerome Forissier
2019-12-05 14:59 ` Vincenzo Frascino
2019-12-04 13:15 ` Jerome Forissier
2019-12-04 14:28 ` Catalin Marinas
2019-12-04 14:58 ` Jerome Forissier
2019-12-04 17:57 ` Will Deacon
2019-12-05 7:26 ` Jerome Forissier
2019-12-05 8:57 ` Will Deacon
2019-12-05 14:54 ` Jerome Forissier
2019-12-06 16:09 ` Will Deacon
2019-12-10 16:20 ` Jerome Forissier [this message]
2019-12-10 16:26 ` Vincenzo Frascino
2019-12-11 8:57 ` Jerome Forissier
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=740865eb-a993-d1dd-ad2e-84529e2012ee@forissier.org \
--to=jerome@forissier.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=vincenzo.frascino@arm.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).