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

Re: [Xen-devel] [PATCH RFC 04/55] x86/mm: introduce l{1, 2}t local variables to map_pages_to_xen



>>> On 07.02.19 at 17:44, <wei.liu2@xxxxxxxxxx> wrote:
> The pl2e and pl1e variables are heavily (ab)used in that function. It
> is fine at the moment because all page tables are always mapped so
> there is no need to track the life time of each variable.
> 
> We will soon have the requirement to map and unmap page tables. We
> need to track the life time of each variable to avoid leakage.
> 
> Introduce some l{1,2}t variables with limited scope so that we can
> track life time of pointers to xen page tables more easily.

But you retain some uses of the old variables, and to be honest it's
not really clear to me by what criteria (and having multiple instances
of a variable name in a single function isn't necessarily less confusing).
I think we either stick to what's there (doesn't look too bad to me),
or you switch to scope restricted page table pointers throughout the
function, such that the function scope symbols can go away
altogether).

Jan



_______________________________________________
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®.