From: cuibixuan@huawei•com (Bixuan Cui)
To: linux-arm-kernel@lists•infradead.org
Subject: 【BUG】The kernel start fail when enable CONFIG_ARM64_LSE_ATOMICS and KCOV_INSTRUMENT_ALL
Date: Tue, 17 Oct 2017 20:42:24 +0800 [thread overview]
Message-ID: <59E5FAB0.5030801@huawei.com> (raw)
In-Reply-To: <20171017110210.fz7srr2p5jiawvkg@lakrids.cambridge.arm.com>
> This is a known issue [1,2] that's being worked on at the moment.
>
> The problem is that the out-of-line LL/SC atomics are built with a
> special ABI, but KCOV inserts calls to other code that does not follow
> this ABI, resulting in register corruption.
>
> When I saw this happen, this resulted in cmpxchg() spuriously failing
> somewhere in the page init code, which looks similar to what you're
> seeing.
>
> The patch at [1] is sufficient to work around this for the time being.
Thank you for your explanation :-D .
Thanks,
Bixuan Cui
>
> Thanks,
> Mark.
>
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-September/533105.html
> [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-October/537018.html
>
>>
>> After I try kernel v4.13 and it's the same result.
>> I trace the code and find it stop at the end of '__init_single_page(page, pfn, zone, nid)' in memmap_init_zone() of mm/page_alloc.c ?
>>
>> static void __meminit __init_single_page(struct page *page, unsigned long pfn,
>> unsigned long zone, int nid)
>> {
>> set_page_links(page, zone, nid, pfn);
>> init_page_count(page);
>> page_mapcount_reset(page);
>> page_cpupid_reset_last(page);
>>
>> INIT_LIST_HEAD(&page->lru);
>>
>> #ifdef WANT_PAGE_VIRTUAL
>> /* The shift won't overflow because ZONE_NORMAL is below 4G. */
>> if (!is_highmem_idx(zone))
>> set_page_address(page, __va(pfn << PAGE_SHIFT));
>> #endif
>> // printk("stop here\n");
>> }
>>
>> Anyone can give me advice?
>>
>> Thanks,
>> Bixuan Cui
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> .
>
prev parent reply other threads:[~2017-10-17 12:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 5:54 【BUG】The kernel start fail when enable CONFIG_ARM64_LSE_ATOMICS and KCOV_INSTRUMENT_ALL Bixuan Cui
2017-10-17 11:02 ` Mark Rutland
2017-10-17 12:42 ` Bixuan Cui [this message]
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=59E5FAB0.5030801@huawei.com \
--to=cuibixuan@huawei$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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