On 06/02/2020 11:43, Jan Beulich wrote:
On 06.02.2020 11:12, Durrant, Paul wrote:
From: Julien Grall <jul...@xen.org>
Sent: 06 February 2020 10:04
On 03/02/2020 10:56, Paul Durrant wrote:
@@ -2332,11 +2350,23 @@ struct page_info *alloc_domheap_pages(
memflags, d)) == NULL)) )
return NULL;
- if ( d && !(memflags & MEMF_no_owner) &&
- assign_pages(d, pg, order, memflags) )
+ if ( d && !(memflags & MEMF_no_owner) )
{
- free_heap_pages(pg, order, memflags & MEMF_no_scrub);
- return NULL;
+ if ( memflags & MEMF_no_refcount )
+ {
+ unsigned long i;
+
+ for ( i = 0; i < (1ul << order); i++ )
+ {
+ ASSERT(!pg[i].count_info);
+ pg[i].count_info = PGC_extra;
... this is pursuing the wrongness of the code above and not safe
against offlining.
We could argue this is an already existing bug, however I am a bit
unease to add more abuse in the code. Jan, what do you think?
I'd consider a straightforward patch-clash. If this patch goes in
after yours then it needs to be modified accordingly, or vice versa.
While generally I advocate for not widening existing issues, I agree
with Paul here. His patch should not be penalized by us _later_
having found an issue (which is quite a bit wider).
Fair enough. For the Arm bits:
Acked-by: Julien Grall <jul...@xen.org>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel