xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* arm: Missing memset in setup_frametable_mappings
@ 2016-03-10  0:08 vikrams
  2016-03-10  8:51 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: vikrams @ 2016-03-10  0:08 UTC (permalink / raw)
  To: xen-devel; +Cc: stefano.stabellini, ian.campbell, shankerd

Hello Ian, Stefano,
I believe there is a bug in setup_frametable_mappings() where the function
allocates pages for pagetables via alloc_boot_pages() but does not zero them
out. This results in a crash on Qualcomm systems when prefetching is enabled
since the processor is free to prefetch a location for which it finds a
'valid'
translation in the page tables, but actually holds uninitialized memory.

A memset to 0 of the variable 'second' for the nr_second pages that were
allocated fixes the problem.

I didn't see a fix in master branch but may have missed a bug report on the
mailing list.

Thanks,
Vikram
Qualcomm Technologies Inc, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
Foundation Collaborative Project



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: arm: Missing memset in setup_frametable_mappings
  2016-03-10  0:08 arm: Missing memset in setup_frametable_mappings vikrams
@ 2016-03-10  8:51 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2016-03-10  8:51 UTC (permalink / raw)
  To: vikrams; +Cc: xen-devel, stefano.stabellini, shankerd

>>> On 10.03.16 at 01:08, <vikrams@codeaurora.org> wrote:
> I believe there is a bug in setup_frametable_mappings() where the function
> allocates pages for pagetables via alloc_boot_pages() but does not zero them
> out. This results in a crash on Qualcomm systems when prefetching is enabled
> since the processor is free to prefetch a location for which it finds a
> 'valid'
> translation in the page tables, but actually holds uninitialized memory.
> 
> A memset to 0 of the variable 'second' for the nr_second pages that were
> allocated fixes the problem.
> 
> I didn't see a fix in master branch but may have missed a bug report on the
> mailing list.

Why don't you submit your patch then? That said, I'm getting the
impression that all three uses of alloc_boot_pages() in arm/mm.c
have this problem, not just the one you mention.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-10  8:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10  0:08 arm: Missing memset in setup_frametable_mappings vikrams
2016-03-10  8:51 ` Jan Beulich

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).