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

Re: [Xen-devel] [PATCH 2/2] x86/xpti: Don't leak TSS-adjacent percpu data via Meltdown



Hi,

On 26/07/2019 16:19, Roger Pau Monné wrote:
On Fri, Jul 26, 2019 at 03:45:22PM +0100, Andrew Cooper wrote:
On 26/07/2019 15:38, Roger Pau Monné wrote:
On Fri, Jul 26, 2019 at 02:52:40PM +0100, Andrew Cooper wrote:
There is no way to do this inside DEFINE_PER_CPU_PAGE_ALIGNED(), because
we can't break the type apart to insert __aligned() in the middle.

And doing something like:

#define DEFINE_PER_CPU_PAGE_ALIGNED(type, name) \
     __DEFINE_PER_CPU(type, _##name, .page_aligned) __aligned(PAGE_SIZE)

Won't work either I guess?

I just find it unconformable to have to specify the aligned
attribute in every usage of DEFINE_PER_CPU_PAGE_ALIGNED.

I was about to comment the same on patch #1 and decided to look at one of the caller first.

Because of the name, I was expecting the macro to actually do the alignment for you as well.

If it is not possible, then I think we should add a comment so developers know they have to add the page-alignment themselves.

Cheers,

--
Julien Grall

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