Re: [Xen-devel] [PATCH v7 33/36] x86/mm: Use proper encryption attributes with /dev/mem

2017-06-23 Thread Borislav Petkov
On Fri, Jun 16, 2017 at 01:56:07PM -0500, Tom Lendacky wrote: > When accessing memory using /dev/mem (or /dev/kmem) use the proper > encryption attributes when mapping the memory. > > To insure the proper attributes are applied when reading or writing > /dev/mem, update the xlate_dev_mem_ptr()

[Xen-devel] [PATCH v7 33/36] x86/mm: Use proper encryption attributes with /dev/mem

2017-06-16 Thread Tom Lendacky
When accessing memory using /dev/mem (or /dev/kmem) use the proper encryption attributes when mapping the memory. To insure the proper attributes are applied when reading or writing /dev/mem, update the xlate_dev_mem_ptr() function to use memremap() which will essentially perform the same steps