[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/mm: Add debug code to detect illegal page_lock and put_page_type ordering



On 24/01/18 12:48, George Dunlap wrote:
> The fix for XSA-242 depends on the same cpu never calling
> _put_page_type() while holding a page_lock() for that page.  By having
> no locking discipline between pages, the current code also assumes
> that we will never lock two pages on the same cpu.
>
> Add a check to debug builds to verify that both of these are true.
>
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Is there any requirement or expectation that we only ever lock a single
page at once?

If yes, then this check needs to be more than just a debug check.  If
not, then the code as presented may falsely explode.

Independently of this, it would probably be cleaner to split these out
into predicates to avoid all the ifdefary.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.