Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-14 Thread Tom Lendacky
On 6/14/2017 12:42 PM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:17:45PM -0500, Tom Lendacky wrote: The IOMMU is programmed with physical addresses for the various tables and buffers that are used to communicate between the device and the driver. When the driver allocates this memory it

Re: your mail

2017-06-14 Thread Yury Norov
Hi Catalin, all. Thank you for your time on reviewing the series. I really appreciate it. This is the updated version where I tried to address all comments: https://github.com/norov/linux/commits/ilp32-20170613.4 (3 last patches here is the Andrew Pinski's rework of vdso rebased on ilp32 series)

Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-14 Thread Tom Lendacky
On 6/14/2017 11:50 AM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:17:32PM -0500, Tom Lendacky wrote: Add warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the

Re: [PATCH v6 24/34] x86, swiotlb: Add memory encryption support

2017-06-14 Thread Tom Lendacky
On 6/14/2017 11:45 AM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:17:21PM -0500, Tom Lendacky wrote: Since DMA addresses will effectively look like 48-bit addresses when the memory encryption mask is set, SWIOTLB is needed if the DMA mask of the device performing the DMA does not support

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:17:45PM -0500, Tom Lendacky wrote: > The IOMMU is programmed with physical addresses for the various tables > and buffers that are used to communicate between the device and the > driver. When the driver allocates this memory it is encrypted. In order > for the IOMMU to a

Re: [PATCH v6 20/34] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-14 Thread Borislav Petkov
On Wed, Jun 14, 2017 at 12:06:54PM -0500, Tom Lendacky wrote: > This isn't new... there are a number of messages issued in this file > with that prefix, so I was just following convention. The "convention" that some of the messages are prefixed and some aren't? :-) > Changing the prefix could b

[PATCH v2 0/3] DAX common 4k zero page

2017-06-14 Thread Ross Zwisler
When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has two major drawbacks: 1) It consumes memory unnecessarily. For every 4k page that is read via a DAX mmap() o

[PATCH v2 1/3] mm: add vm_insert_mixed_mkwrite()

2017-06-14 Thread Ross Zwisler
To be able to use the common 4k zero page in DAX we need to have our PTE fault path look more like our PMD fault path where a PTE entry can be marked as dirty and writeable as it is first inserted, rather than waiting for a follow-up dax_pfn_mkwrite() => finish_mkwrite_fault() call. Right now we c

[PATCH v2 3/3] dax: use common 4k zero page for dax mmap reads

2017-06-14 Thread Ross Zwisler
When servicing mmap() reads from file holes the current DAX code allocates a page cache page of all zeroes and places the struct page pointer in the mapping->page_tree radix tree. This has two major drawbacks: 1) It consumes memory unnecessarily. For every 4k page that is read via a DAX mmap() o

[PATCH v2 2/3] dax: relocate dax_load_hole()

2017-06-14 Thread Ross Zwisler
dax_load_hole() will soon need to call dax_insert_mapping_entry(), so it needs to be moved lower in dax.c so the definition exists. Signed-off-by: Ross Zwisler --- fs/dax.c | 88 1 file changed, 44 insertions(+), 44 deletions(-) d

Re: [PATCH v6 20/34] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-14 Thread Tom Lendacky
On 6/14/2017 11:07 AM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:16:43PM -0500, Tom Lendacky wrote: The SMP MP-table is built by UEFI and placed in memory in a decrypted state. These tables are accessed using a mix of early_memremap(), early_memunmap(), phys_to_virt() and virt_to_phys().

Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:17:32PM -0500, Tom Lendacky wrote: > Add warnings to let the user know when bounce buffers are being used for > DMA when SME is active. Since the bounce buffers are not in encrypted > memory, these notifications are to allow the user to determine some > appropriate actio

Re: [PATCH v6 24/34] x86, swiotlb: Add memory encryption support

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:17:21PM -0500, Tom Lendacky wrote: > Since DMA addresses will effectively look like 48-bit addresses when the > memory encryption mask is set, SWIOTLB is needed if the DMA mask of the > device performing the DMA does not support 48-bits. SWIOTLB will be > initialized to c

Re: [PATCH v6 23/34] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-14 Thread Borislav Petkov
On Wed, Jun 14, 2017 at 06:24:16PM +0200, Borislav Petkov wrote: > On Wed, Jun 07, 2017 at 02:17:09PM -0500, Tom Lendacky wrote: > > When Secure Memory Encryption is enabled, the trampoline area must not > > be encrypted. A CPU running in real mode will not be able to decrypt > > memory that has be

Re: [PATCH v6 23/34] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-14 Thread Tom Lendacky
On 6/14/2017 11:24 AM, Borislav Petkov wrote: On Wed, Jun 07, 2017 at 02:17:09PM -0500, Tom Lendacky wrote: When Secure Memory Encryption is enabled, the trampoline area must not be encrypted. A CPU running in real mode will not be able to decrypt memory that has been encrypted because it will n

Re: [PATCH v6 22/34] x86/mm: Add support for changing the memory encryption attribute

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:17:00PM -0500, Tom Lendacky wrote: > Add support for changing the memory encryption attribute for one or more > memory pages. This will be useful when we have to change the AP trampoline > area to not be encrypted. Or when we need to change the SWIOTLB area to > not be en

Re: [PATCH v6 23/34] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:17:09PM -0500, Tom Lendacky wrote: > When Secure Memory Encryption is enabled, the trampoline area must not > be encrypted. A CPU running in real mode will not be able to decrypt > memory that has been encrypted because it will not be able to use addresses > with the memo

Re: [PATCH v6 20/34] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-14 Thread Borislav Petkov
On Wed, Jun 07, 2017 at 02:16:43PM -0500, Tom Lendacky wrote: > The SMP MP-table is built by UEFI and placed in memory in a decrypted > state. These tables are accessed using a mix of early_memremap(), > early_memunmap(), phys_to_virt() and virt_to_phys(). Change all accesses > to use early_memrema

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-14 Thread Logan Gunthorpe
Hi Linus, On 14/06/17 03:59 AM, Linus Walleij wrote: > I started to take a stab at it at one point and incorporated some feedback > from Torvalds etc, it's here: > https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/commit/?h=chrdev-warn&id=65e5b1e9eb3f777ab7535b74b490e882eeec79d

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Alan Cox
> That would cut it, but TIOCPKT is too coupled with having a linked tty. > I could make acm behave like a pty (accept TIOCPKT and issue the > ctrl_status bits), but for that I need n_tty to know that packet does > not always mean a linked tty is present, and that in case it isn't we > take our own

Re: [PATCH 02/20] 32-bit ABI: introduce ARCH_32BIT_OFF_T config option

2017-06-14 Thread Catalin Marinas
On Tue, Jun 13, 2017 at 02:04:11PM +0300, Yury Norov wrote: > On Thu, Jun 08, 2017 at 04:09:50PM +0100, Catalin Marinas wrote: > > On Sun, Jun 04, 2017 at 02:59:51PM +0300, Yury Norov wrote: > > > All new 32-bit architectures should have 64-bit off_t type, but existing > > > architectures has 32-bi

[PATCH] docs-rst: fix broken links to dynamic-debug-howto in kernel-parameters

2017-06-14 Thread Steffen Maier
Another place in lib/Kconfig.debug was already fixed in commit f8998c226587 ("lib/Kconfig.debug: correct documentation paths"). Fixes: 9d85025b0418 ("docs-rst: create an user's manual book") Signed-off-by: Steffen Maier --- Documentation/admin-guide/kernel-parameters.txt | 6 -- 1 file chang

Re: [Merge tag 'pci-v4.12-changes' of git] 857f864014: BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8

2017-06-14 Thread Linus Walleij
On Tue, Jun 13, 2017 at 6:34 AM, Greg Kroah-Hartman wrote: > Ah, that makes sense. Well, someone can always work on expanding the > range of dynamic char major numbers if they are running out of them on a > real system, I'll gladly take patches for that :) I started to take a stab at it at one

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Tal Shorer
On Wed, Jun 14, 2017 at 11:20 AM, Tal Shorer wrote: > On Wed, Jun 14, 2017 at 4:15 AM, Alan Cox wrote: >> On Tue, 13 Jun 2017 09:52:07 +0300 >> Tal Shorer wrote: >> >>> If a tty driver wants to notify the user of some exceptional event, >>> such as a usb cdc acm device set_line_coding event, it

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-14 Thread Tal Shorer
On Wed, Jun 14, 2017 at 4:15 AM, Alan Cox wrote: > On Tue, 13 Jun 2017 09:52:07 +0300 > Tal Shorer wrote: > >> If a tty driver wants to notify the user of some exceptional event, >> such as a usb cdc acm device set_line_coding event, it needs a way to >> modify the mask returned by poll() and pos