[PATCH v8 RESEND 03/38] x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap for RAM mappings

2017-06-27 Thread Tom Lendacky
The ioremap() function is intended for mapping MMIO. For RAM, the memremap() function should be used. Convert calls from ioremap() to memremap() when re-mapping RAM. This will be used later by SME to control how the encryption mask is applied to memory mappings, with certain memory locations being

[PATCH v8 RESEND 02/38] x86/mm/pat: Set write-protect cache mode for full PAT support

2017-06-27 Thread Tom Lendacky
For processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Acked-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x8

[PATCH v8 RESEND 04/38] x86/CPU/AMD: Add the Secure Memory Encryption CPU feature

2017-06-27 Thread Tom Lendacky
Update the CPU features to include identifying and reporting on the Secure Memory Encryption (SME) feature. SME is identified by CPUID 0x801f, but requires BIOS support to enable it (set bit 23 of MSR_K8_SYSCFG). Only show the SME feature as available if reported by CPUID and enabled by BIOS.

[PATCH v8 RESEND 01/38] x86: Document AMD Secure Memory Encryption (SME)

2017-06-27 Thread Tom Lendacky
Create a Documentation entry to describe the AMD Secure Memory Encryption (SME) feature and add documentation for the mem_encrypt= kernel parameter. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- Documentation/admin-guide/kernel-parameters.txt | 11 Documentation/x86/amd-me

Re: [PATCH 01/11] net: phy: Add rockchip phy driver support

2017-06-27 Thread David.Wu
Hi Andrew, 在 2017/6/27 22:46, Andrew Lunn 写道: it has been licensed from somebody. And does that somebody already have a driver for it? There is no point adding a driver, if all you need to do is add the ID to another driver. I didn't find it. Maybe use the same, but the configuration is dif

[PATCH v8 RESEND 07/38] x86/mm: Remove phys_to_virt() usage in ioremap()

2017-06-27 Thread Tom Lendacky
Currently there is a check if the address being mapped is in the ISA range (is_ISA_range()), and if it is, then phys_to_virt() is used to perform the mapping. When SME is active, the default is to add pagetable mappings with the encryption bit set unless specifically overridden. The resulting paget

[PATCH v8 RESEND 00/38] x86: Secure Memory Encryption (AMD)

2017-06-27 Thread Tom Lendacky
RESENDING - Mail Server Issues This patch series provides support for AMD's new Secure Memory Encryption (SME) feature. SME can be used to mark individual pages of memory as encrypted through the page tables. A page of memory that is marked encrypted will be automatically decrypted when read from

[PATCH v8 RESEND 10/38] x86/mm: Provide general kernel support for memory encryption

2017-06-27 Thread Tom Lendacky
Changes to the existing page table macros will allow the SME support to be enabled in a simple fashion with minimal changes to files that use these macros. Since the memory encryption mask will now be part of the regular pagetable macros, we introduce two new macros (_PAGE_TABLE_NOENC and _KERNPG_

[PATCH v8 RESEND 05/38] x86/CPU/AMD: Handle SME reduction in physical address size

2017-06-27 Thread Tom Lendacky
When System Memory Encryption (SME) is enabled, the physical address space is reduced. Adjust the x86_phys_bits value to reflect this reduction. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/kernel/cpu/amd.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions

[PATCH v8 RESEND 16/38] efi: Add an EFI table address match function

2017-06-27 Thread Tom Lendacky
Add a function that will determine if a supplied physical address matches the address of an EFI table. Reviewed-by: Matt Fleming Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- drivers/firmware/efi/efi.c | 33 + include/linux/efi.h|7 +

[PATCH v8 RESEND 11/38] x86/mm: Add SME support for read_cr3_pa()

2017-06-27 Thread Tom Lendacky
The cr3 register entry can contain the SME encryption mask that indicates the PGD is encrypted. The encryption mask should not be used when creating a virtual address from the cr3 register, so remove the SME encryption mask in the read_cr3_pa() function. During early boot SME will need to use a n

[PATCH] x86: fix fortified memcpy

2017-06-27 Thread Arnd Bergmann
__memcpy3d is not available when CONFIG_FORTIFY_SOURCE is enabled, leading to a link error on 32-bit kernels: arch/x86/lib/memcpy_32.c: In function 'memcpy': arch/x86/lib/memcpy_32.c:10:9: error: implicit declaration of function '__memcpy3d'; did you mean '__memcpy'? [-Werror=implicit-function-de

[PATCH v8 25/38] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-27 Thread Tom Lendacky
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 action - if necessary. Actions can range from utilizing an IOMMU, replacin

[PATCH v8 21/38] x86/mm: Add support to access persistent memory in the clear

2017-06-27 Thread Tom Lendacky
Persistent memory is expected to persist across reboots. The encryption key used by SME will change across reboots which will result in corrupted persistent memory. Persistent memory is handed out by block devices through memory remapping functions, so be sure not to map this memory as encrypted.

[PATCH v8 29/38] x86, drm, fbdev: Do not specify encrypted memory for video mappings

2017-06-27 Thread Tom Lendacky
Since video memory needs to be accessed decrypted, be sure that the memory encryption mask is not set for the video ranges. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h | 14 +- arch/x86/mm/pageattr.c |2 ++ drivers/gp

[PATCH v8 28/38] x86, realmode: Check for memory encryption on the APs

2017-06-27 Thread Tom Lendacky
Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP, then set the memory encryption bit (bit 23) of MSR_K8_SYSCFG to enable memory encryption on that AP and allow th

[PATCH v8 30/38] kvm: x86: svm: Support Secure Memory Encryption within KVM

2017-06-27 Thread Tom Lendacky
Update the KVM support to work with SME. The VMCB has a number of fields where physical addresses are used and these addresses must contain the memory encryption mask in order to properly access the encrypted memory. Also, use the memory encryption mask when creating and using the nested page table

Re: [PATCH 1/3] ARM: dts: Bindings for Altera Quadspi Controller Version 2

2017-06-27 Thread Marek Vasut
On 06/27/2017 04:32 PM, matthew.gerl...@linux.intel.com wrote: > > > On Tue, 27 Jun 2017, Marek Vasut wrote: > > Hi Marek, > > Thanks for the feedback. See my comments below. > > Matthew Gerlach > >> On 06/26/2017 06:13 PM, matthew.gerl...@linux.intel.com wrote: >>> From: Matthew Gerlach >>

[PATCH v8 RESEND 06/38] x86/mm: Add Secure Memory Encryption (SME) support

2017-06-27 Thread Tom Lendacky
Add support for Secure Memory Encryption (SME). This initial support provides a Kconfig entry to build the SME support into the kernel and defines the memory encryption mask that will be used in subsequent patches to mark pages as encrypted. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendack

[PATCH v8 RESEND 09/38] x86/mm: Simplify p[g4um]d_page() macros

2017-06-27 Thread Tom Lendacky
Create a pgd_pfn() macro similar to the p[4um]d_pfn() macros and then use the p[g4um]d_pfn() macros in the p[g4um]d_page() macros instead of duplicating the code. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/pgtable.h | 16 +--- 1 file changed,

[PATCH v8 RESEND 08/38] x86/mm: Add support to enable SME in early boot processing

2017-06-27 Thread Tom Lendacky
Add support to the early boot code to use Secure Memory Encryption (SME). Since the kernel has been loaded into memory in a decrypted state, encrypt the kernel in place and update the early pagetables with the memory encryption mask so that new pagetable entries will use memory encryption. The rou

[PATCH v8 RESEND 12/38] x86/mm: Extend early_memremap() support with additional attrs

2017-06-27 Thread Tom Lendacky
Add early_memremap() support to be able to specify encrypted and decrypted mappings with and without write-protection. The use of write-protection is necessary when encrypting data "in place". The write-protect attribute is considered cacheable for loads, but not stores. This implies that the hardw

[PATCH v8 RESEND 14/38] x86/mm: Insure that boot memory areas are mapped properly

2017-06-27 Thread Tom Lendacky
The boot data and command line data are present in memory in a decrypted state and are copied early in the boot process. The early page fault support will map these areas as encrypted, so before attempting to copy them, add decrypted mappings so the data is accessed properly when copied. For the

[PATCH v8 RESEND 13/38] x86/mm: Add support for early encrypt/decrypt of memory

2017-06-27 Thread Tom Lendacky
Add support to be able to either encrypt or decrypt data in place during the early stages of booting the kernel. This does not change the memory encryption attribute - it is used for ensuring that data present in either an encrypted or decrypted memory area is in the proper state (for example the i

[PATCH v8 RESEND 15/38] x86/boot/e820: Add support to determine the E820 type of an address

2017-06-27 Thread Tom Lendacky
Add a function that will return the E820 type associated with an address range. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/e820/api.h |2 ++ arch/x86/kernel/e820.c | 26 +++--- 2 files changed, 25 insertions(+), 3 deletio

[PATCH v8 RESEND 17/38] efi: Update efi_mem_type() to return an error rather than 0

2017-06-27 Thread Tom Lendacky
The efi_mem_type() function currently returns a 0, which maps to EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for the supplied physical address. Returning EFI_RESERVED_TYPE implies that a memmap entry exists, when it doesn't. Instead of returning 0, change the function to re

[PATCH v8 RESEND 18/38] x86/efi: Update EFI pagetable creation to work with SME

2017-06-27 Thread Tom Lendacky
When SME is active, pagetable entries created for EFI need to have the encryption mask set as necessary. When the new pagetable pages are allocated they are mapped encrypted. So, update the efi_pgt value that will be used in cr3 to include the encryption mask so that the PGD table can be read succ

[PATCH v8 RESEND 19/38] x86/mm: Add support to access boot related data in the clear

2017-06-27 Thread Tom Lendacky
Boot data (such as EFI related data) is not encrypted when the system is booted because UEFI/BIOS does not run with SME active. In order to access this data properly it needs to be mapped decrypted. Update early_memremap() to provide an arch specific routine to modify the pagetable protection attr

[PATCH v8 RESEND 20/38] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-27 Thread Tom Lendacky
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_memremap()/early_memunmap(). This allows for proper setting of the encryption

Re: [PATCH] ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems

2017-06-27 Thread Rafael J. Wysocki
On Tuesday, June 27, 2017 03:50:33 PM Tom Lanyon wrote: > On 23 June 2017 at 12:40, Linus Torvalds > wrote: > > On Thu, Jun 22, 2017 at 4:56 PM, Rafael J. Wysocki > > wrote: > >> > >> Some recent Dell laptops, including the XPS13 model numbers 9360 and > >> 9365, cannot be woken up from suspend

[PATCH v8 RESEND 22/38] x86/mm: Add support for changing the memory encryption attribute

2017-06-27 Thread Tom Lendacky
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 encrypted in support of devices that can't support the encryption mask r

[PATCH v8 RESEND 23/38] x86/realmode: Decrypt trampoline area if memory encryption is active

2017-06-27 Thread Tom Lendacky
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 memory encryption mask. Reviewed-by: Borislav Petkov Signed-off-by: Tom

Re: [PATCH 1/5] [media] rockchip/rga: v4l2 m2m support

2017-06-27 Thread Jacob Chen
Hi Nicolas. 2017-06-26 23:49 GMT+08:00 Nicolas Dufresne : > > Le lundi 26 juin 2017 à 22:51 +0800, Jacob Chen a écrit : > > Rockchip RGA is a separate 2D raster graphic acceleration unit. It > > accelerates 2D graphics operations, such as point/line drawing, image > > scaling, rotation, BitBLT, al

[PATCH v8 RESEND 21/38] x86/mm: Add support to access persistent memory in the clear

2017-06-27 Thread Tom Lendacky
Persistent memory is expected to persist across reboots. The encryption key used by SME will change across reboots which will result in corrupted persistent memory. Persistent memory is handed out by block devices through memory remapping functions, so be sure not to map this memory as encrypted.

[PATCH v8 RESEND 25/38] swiotlb: Add warnings for use of bounce buffers with SME

2017-06-27 Thread Tom Lendacky
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 action - if necessary. Actions can range from utilizing an IOMMU, replacin

[PATCH v8 RESEND 27/38] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-27 Thread Tom Lendacky
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 access the memory as encrypted the encryption mask needs to be included

[PATCH v8 RESEND 26/38] x86/CPU/AMD: Make the microcode level available earlier in the boot

2017-06-27 Thread Tom Lendacky
Move the setting of the cpuinfo_x86.microcode field from amd_init() to early_amd_init() so that it is available earlier in the boot process. This avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/kernel/

Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T

2017-06-27 Thread Ziping Chen
2017-06-27 1:15 GMT+08:00 Maxime Ripard : > Hi, > > On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote: >> From: Ziping Chen >> >> Allwinner A83T SoC has a low res adc like the one >> in Allwinner A10 SoC. >> >> Add binding for it. >> >> Signed-off-by: Ziping Chen >> Acked-by: Rob Herrin

[PATCH v8 RESEND 33/38] x86/mm: Use proper encryption attributes with /dev/mem

2017-06-27 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 of

[PATCH v8 RESEND 31/38] x86/mm, kexec: Allow kexec to be used with SME

2017-06-27 Thread Tom Lendacky
Provide support so that kexec can be used to boot a kernel when SME is enabled. Support is needed to allocate pages for kexec without encryption. This is needed in order to be able to reboot in the kernel in the same manner as originally booted. Additionally, when shutting down all of the CPUs w

Re: [PATCH v5 4/7] drivers: dma-coherent: Introduce default DMA pool

2017-06-27 Thread Christoph Hellwig
On Tue, Jun 27, 2017 at 03:36:16PM +0100, Robin Murphy wrote: > I admit I'm almost in agreement, were it not for the fact that > dma-contiguous already supports all four combinations of both per-device > and global pools, and both reserved mem and direct declarations from > arch/platform code, all

[PATCH v8 RESEND 30/38] kvm: x86: svm: Support Secure Memory Encryption within KVM

2017-06-27 Thread Tom Lendacky
Update the KVM support to work with SME. The VMCB has a number of fields where physical addresses are used and these addresses must contain the memory encryption mask in order to properly access the encrypted memory. Also, use the memory encryption mask when creating and using the nested page table

[PATCH v8 RESEND 29/38] x86, drm, fbdev: Do not specify encrypted memory for video mappings

2017-06-27 Thread Tom Lendacky
Since video memory needs to be accessed decrypted, be sure that the memory encryption mask is not set for the video ranges. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h | 14 +- arch/x86/mm/pageattr.c |2 ++ drivers/gp

[PATCH] cifs: hide unused functions

2017-06-27 Thread Arnd Bergmann
Some functions are only referenced under an #ifdef, causing a harmless warning: fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function] We could mark them __maybe_unused or add another #ifdef, I picked the second approach here. Fixes: b3fdda4d1e1b ("cifs:

[PATCH v8 RESEND 28/38] x86, realmode: Check for memory encryption on the APs

2017-06-27 Thread Tom Lendacky
Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP, then set the memory encryption bit (bit 23) of MSR_K8_SYSCFG to enable memory encryption on that AP and allow th

[PATCH v8 RESEND 24/38] x86, swiotlb: Add memory encryption support

2017-06-27 Thread Tom Lendacky
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 create decrypted bounce buffers for use by these devices. Signed-off-b

Re: 4.12.0-rc6+: WQ_MEM_RECLAIM hci0:hci_power_off is flushing !WQ_MEM_RECLAIM events:btusb_work

2017-06-27 Thread Tejun Heo
Hello, On Sun, Jun 25, 2017 at 08:21:49PM +0200, Dominik Brodowski wrote: > On my Dell XPS 13 9343 (x86_64), the following warning was logged right > after a resume from suspend-to-mem (not on *every* resume, though, so it > might be hard to reproduce). The kernel is v4.12.0-rc6+ as of 94a6df251dd

Re: [RFC v4 09/17] powerpc: call the hash functions with the correct pkey value

2017-06-27 Thread Aneesh Kumar K.V
On Tuesday 27 June 2017 03:41 PM, Ram Pai wrote: Pass the correct protection key value to the hash functions on page fault. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h | 11 +++ arch/powerpc/mm/hash_utils_64.c | 4 arch/powerpc/mm/mem.c| 6 +

Re: [tpmdd-devel] [PATCH v3 3/6] tpm: introduce tpm_pcr_bank_info structure with digest_size from TPM

2017-06-27 Thread Mimi Zohar
On Wed, 2017-06-21 at 16:29 +0200, Roberto Sassu wrote: > This patch introduces the new structure tpm_pcr_bank_info to store > information regarding PCR banks. The next patch will replace the array of > TPM algorithms IDs with an array of the new structure. > > tpm_pcr_bank_info contains the TPM a

[PATCH 1/3] fs/locks: Use allocation rather than the stack in fcntl_getlk()

2017-06-27 Thread Benjamin Coddington
Struct file_lock is fairly large, so let's save some space on the stack by using an allocation for struct file_lock in fcntl_getlk(), just as we do for fcntl_setlk(). Signed-off-by: Benjamin Coddington --- fs/locks.c | 46 ++ 1 file changed, 26 inserti

[PATCH 2/3] fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks

2017-06-27 Thread Benjamin Coddington
Since commit c69899a17ca4 "NFSv4: Update of VFS byte range lock must be atomic with the stateid update", NFSv4 has been inserting locks in rpciod worker context. The result is that the file_lock's fl_nspid is the kworker's pid instead of the original userspace pid. The fl_nspid is only used to re

[PATCH 3/3] staging/lustre, 9p, ceph, cifs, dlm: negate remote pids for F_GETLK

2017-06-27 Thread Benjamin Coddington
In the previous patch, the locks API will expect that if a filesystem returns a remote pid as opposed to a local pid for F_GETLK, that remote pid will be <= 0. This signifies that the pid is remote, and the locks API will forego translating that pid into the pid namespace of the local calling proc

[PATCH 0/3 v6] Fixups for l_pid

2017-06-27 Thread Benjamin Coddington
LTP fcntl tests (fcntl11 fcntl14 fcntl17 fcntl19 fcntl20 fcntl21) have been failing for NFSv4 mounts due to an unexpected l_pid. What follows are some fixups: v2: - Rebase onto linux-next - Revert back to using the stack in locks_mandatory_area(), and fixup patch description for 1/3

Re: [Devel] [RESEND PATCH v9 3/3] iommu/arm-smmu-v3: Add workaround for Cavium ThunderX2 erratum #126

2017-06-27 Thread Robert Richter
On 27.06.17 20:28:14, Geetha Akula wrote: > On Tue, Jun 27, 2017 at 7:36 PM, Will Deacon wrote: > > On Tue, Jun 27, 2017 at 03:56:10PM +0200, Robert Richter wrote: > >> On 23.06.17 19:04:36, Geetha sowjanya wrote: > >> > From: Geetha Sowjanya > >> > > >> > Cavium ThunderX2 SMMU doesn't support MS

Re: [PATCH 1/2] iommu/s390: Use iommu_group_get_for_dev() in s390_iommu_add_device()

2017-06-27 Thread Joerg Roedel
Hi Gerald, sorry for the delay. Answers inline. On Fri, Jun 16, 2017 at 07:33:01PM +0200, Gerald Schaefer wrote: > Seems pretty straightforward, so > Reviewed-by: Gerald Schaefer Thanks, I add it to the patch. > With generic_device_group() returning NULL in case the allocation failed, > this p

Re: [PATCH v3 0/4] kmod: help make deterministic

2017-06-27 Thread Jessica Yu
+++ Luis R. Rodriguez [27/06/17 00:44 +0200]: On Mon, Jun 26, 2017 at 11:37:36PM +0200, Jessica Yu wrote: +++ Kees Cook [20/06/17 17:23 -0700]: > On Tue, Jun 20, 2017 at 1:56 PM, Luis R. Rodriguez wrote: > > On Fri, May 26, 2017 at 02:12:24PM -0700, Luis R. Rodriguez wrote: > > > This v3 nukes

Re: [PATCH 1/2] dt-bindings: Document the STM32 SPDIFRX interface

2017-06-27 Thread Olivier MOYSAN
Hello Rob, On 06/23/2017 08:55 PM, Rob Herring wrote: > On Fri, Jun 16, 2017 at 03:57:31PM +0200, olivier moysan wrote: >> This adds documentation of device tree bindings for the >> STM32 SPDIFRX interface. >> >> Signed-off-by: olivier moysan >> --- >> .../devicetree/bindings/sound/st,stm32-spd

[PATCH] iwlwifi: mvm: fix iwl_mvm_sar_find_wifi_pkg corner case

2017-06-27 Thread Arnd Bergmann
gcc warns about what it thinks is an uninitialized variable access: drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function 'iwl_mvm_sar_find_wifi_pkg.isra.14': drivers/net/wireless/intel/iwlwifi/mvm/fw.c:1102:5: error: 'wifi_pkg' may be used uninitialized in this function [-Werror=maybe-uninit

Re: [PATCH V2 00/37] perf intel-pt: Power events and PTWRITE

2017-06-27 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 12, 2017 at 10:56:05AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jun 12, 2017 at 04:04:44PM +0300, Adrian Hunter escreveu: > > On 26/05/17 11:17, Adrian Hunter wrote: > > > Hi > > > > > > Here are some patches to support Intel PT Power events and PTWRITE. > > > Power events r

Re: [PATCH v2] rtc: ds3232: add temperature support

2017-06-27 Thread Kirill Esipov
2017-06-27 16:00 GMT+03:00 Alexandre Belloni : > On 27/06/2017 at 15:24:57 +0300, Kirill Esipov wrote: >> 2017-06-25 19:39 GMT+03:00 Andy Shevchenko : >> > On Thu, Jun 22, 2017 at 7:58 PM, Kirill Esipov wrote: >> >> DS3232/DS3234 has the temperature registers with a resolution of 0.25 >> >> degree

Re: [PATCH v2] drm/core: Fail atomic IOCTL with no CRTC state but with signaling.

2017-06-27 Thread Daniel Vetter
On Tue, Jun 27, 2017 at 04:29:44PM +0200, Maarten Lankhorst wrote: > Op 27-06-17 om 09:37 schreef Daniel Vetter: > > On Mon, Jun 26, 2017 at 03:44:07PM -0400, Harry Wentland wrote: > >> On 2017-06-20 01:57 PM, Andrey Grodzovsky wrote: > >>> Problem : While running IGT kms_atomic_transition test sui

Re: [PATCH v6 0/7] ARM: Fix dma_alloc_coherent() and friends for NOMMU

2017-06-27 Thread Christoph Hellwig
I've applied patches 1, 3 and 4 to the dma-mapping tree. 2 will need a respin for less code duplication. I'd be happy to take 5,6 and 7 if Russell is fine with that.

[PATCH v8 27/38] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-27 Thread Tom Lendacky
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 access the memory as encrypted the encryption mask needs to be included

Re: [linux-sunxi] Re: [PATCH v3 2/3] dt-bindings: input: Add R_LRADC support for A83T

2017-06-27 Thread icenowy
在 2017-06-27 23:18,Ziping Chen 写道: 2017-06-27 1:15 GMT+08:00 Maxime Ripard : Hi, On Sat, Jun 24, 2017 at 10:45:14AM +0800, Ziping Chen wrote: From: Ziping Chen Allwinner A83T SoC has a low res adc like the one in Allwinner A10 SoC. Add binding for it. Signed-off-by: Ziping Chen Acked-by:

[PATCH v8 26/38] x86/CPU/AMD: Make the microcode level available earlier in the boot

2017-06-27 Thread Tom Lendacky
Move the setting of the cpuinfo_x86.microcode field from amd_init() to early_amd_init() so that it is available earlier in the boot process. This avoids having to read MSR_AMD64_PATCH_LEVEL directly during early boot. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/kernel/

Re: [PATCH 2/2] iommu/s390: Add support for iommu_device handling

2017-06-27 Thread Joerg Roedel
On Mon, Jun 19, 2017 at 05:02:19PM +0200, Gerald Schaefer wrote: > On Thu, 15 Jun 2017 15:11:52 +0200 > Joerg Roedel wrote: > > + rc = zpci_init_iommu(zdev); > > + if (rc) > > + goto out_free; > > + > > After this point, there are two options for failure (zpci_enable_device + > zpci

Re: [PATCH 3/3] mtd: spi-nor: Altera Quadspi Flash Controller v2 Platform driver

2017-06-27 Thread matthew . gerlach
On Tue, 27 Jun 2017, Marek Vasut wrote: On 06/26/2017 06:13 PM, matthew.gerl...@linux.intel.com wrote: From: Matthew Gerlach Just wrap it into the Altera QSPI driver , no need for separate platform driver IMO. Hi Marek, I answered this question when you asked why the header file was nec

[PATCH v8 23/38] x86/realmode: Decrypt trampoline area if memory encryption is active

2017-06-27 Thread Tom Lendacky
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 memory encryption mask. Reviewed-by: Borislav Petkov Signed-off-by: Tom

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Greg KH
On Tue, Jun 27, 2017 at 05:13:59PM +0200, Greg KH wrote: > On Tue, Jun 27, 2017 at 02:10:32PM +0530, Naresh Kamboju wrote: > > selftest capabilities test failed on linux mainline and linux-next and > > PASS on linux-4.4.70+ > > Odd. Any chance you can use 'git bisect' to track down the offending

Re: [PATCH V3 0/5] arch_topology: Minor cleanups

2017-06-27 Thread Juri Lelli
Hi Viresh, On 23/06/17 14:55, Viresh Kumar wrote: > Hi Greg, > > You weren't included in the first [1] version of this series, as it was > targeting arch/arm*/ directories then. > > Here are some cleanups for the arch_topology core. > > Tested on ARM64 Hikey board by setting following in cpu no

[PATCH v8 RESEND 36/38] x86/boot: Add early cmdline parsing for options with arguments

2017-06-27 Thread Tom Lendacky
Add a cmdline_find_option() function to look for cmdline options that take arguments. The argument is returned in a supplied buffer and the argument length (regardless of whether it fits in the supplied buffer) is returned, with -1 indicating not found. Signed-off-by: Tom Lendacky --- arch/x86/i

[PATCH v8 RESEND 37/38] compiler-gcc.h: Introduce __nostackp function attribute

2017-06-27 Thread Tom Lendacky
Create a new function attribute, __nostackp, that can used to turn off stack protection on a per function basis. Signed-off-by: Tom Lendacky --- include/linux/compiler-gcc.h |2 ++ include/linux/compiler.h |4 2 files changed, 6 insertions(+) diff --git a/include/linux/compiler

[PATCH v8 RESEND 38/38] x86/mm: Add support to make use of Secure Memory Encryption

2017-06-27 Thread Tom Lendacky
Add support to check if SME has been enabled and if memory encryption should be activated (checking of command line option based on the configuration of the default state). If memory encryption is to be activated, then the encryption mask is set and the kernel is encrypted "in place." Signed-off-

[PATCH v8 RESEND 35/38] x86/mm: Add support to encrypt the kernel in-place

2017-06-27 Thread Tom Lendacky
Add the support to encrypt the kernel in-place. This is done by creating new page mappings for the kernel - a decrypted write-protected mapping and an encrypted mapping. The kernel is encrypted by copying it through a temporary buffer. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_enc

[PATCH v8 RESEND 34/38] x86/mm: Create native_make_p4d() for PGTABLE_LEVELS <= 4

2017-06-27 Thread Tom Lendacky
Currently, native_make_p4d() is only defined when CONFIG_PGTABLE_LEVELS is greater than 4. Create a macro that will allow for defining and using native_make_p4d() when CONFIG_PGTABLES_LEVELS is not greater than 4. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/pgtable_types.h |5 +

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Greg KH
On Tue, Jun 27, 2017 at 02:10:32PM +0530, Naresh Kamboju wrote: > selftest capabilities test failed on linux mainline and linux-next and > PASS on linux-4.4.70+ Odd. Any chance you can use 'git bisect' to track down the offending commit? Does this also fail on x86 or any other platform you have

[PATCH v8 RESEND 32/38] xen/x86: Remove SME feature in PV guests

2017-06-27 Thread Tom Lendacky
Xen does not currently support SME for PV guests. Clear the SME CPU capability in order to avoid any ambiguity. Reviewed-by: Borislav Petkov Reviewed-by: Juergen Gross Signed-off-by: Tom Lendacky --- arch/x86/xen/enlighten_pv.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xe

[PATCH] staging: fsl-mc: remove stale Makefile entry for dpmng.o

2017-06-27 Thread Arnd Bergmann
Removing the file causes a build failure: make[5]: *** No rule to make target 'drivers/staging/fsl-mc/bus/dpmng.o', needed by 'drivers/staging/fsl-mc/bus/mc-bus-driver.o'. This adapts the Makefile as needed. Fixes: b065307fe0ad ("staging: fsl-mc: remove dpmng API files") Signed-off-by: Arnd Ber

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Shuah Khan
gt; version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Mon > Jun 26 20:04:35 UTC 2017 > > Linux version 4.12.0-rc7-next-20170627 (buildslave@x86-64-07) (gcc > version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #1 SMP PREEMPT Tue > Jun 27 06:33:39 UTC 2017 > > LAVA

Re: [PATCH v2 00/15] staging: fsl-mc: clean up header files

2017-06-27 Thread Arnd Bergmann
On Tue, Jun 27, 2017 at 4:41 PM, wrote: > From: Laurentiu Tudor > > This patch series contain mainly clean-ups of the mc-bus header files > with the final goal of reorganizing them in just 2 files: a public > and a private one, as per GregKH suggestion [1]. > Here's a summary of the header reorg

Re: [PATCH v2 07/22] fpga: intel: pcie: parse feature list and create platform device for features.

2017-06-27 Thread Alan Tull
On Mon, Jun 26, 2017 at 1:42 PM, Moritz Fischer wrote: Hi Hao, I'll be out until July 5. I'll be able to start looking at this v2 after that. Alan > Hi Xiao / Wu, > > general question, can't you make the /* */ comments > for the structs kernel-doc ([1]) markup instead (see below)? > > > On Mo

Re: [PATCH v2 1/3] cros_ec: Don't return error when checking command version

2017-06-27 Thread Benson Leung
Hi Thierry, On Tue, Feb 14, 2017 at 08:58:00PM +0100, Thierry Escande wrote: > With this patch, cros_ec_query_all() does not return an error if it > fails to check for MKBP events support. Instead, the EC device structure > indicates that it does not support MKBP events (mkbp_event_supported > fie

Re: [RFC PATCH] userfaultfd: Add feature to request for a signal delivery

2017-06-27 Thread Mike Rapoport
On Tue, Jun 27, 2017 at 09:06:43AM +0200, Michal Hocko wrote: > This is an user visible API so let's CC linux-api mailing list. > > On Mon 26-06-17 12:46:13, Prakash Sangappa wrote: > > In some cases, userfaultfd mechanism should just deliver a SIGBUS signal > > to the faulting process, instead of

[PATCH] mtd: spi-nor: cqspi: remove duplicate const

2017-06-27 Thread Arnd Bergmann
The variable was already marked 'const' before the previous patch, but the qualifier was in an unusual place, and now the extra 'const' causes a harmless warning: drivers/mtd/spi-nor/cadence-quadspi.c:1286:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier] This

Re: [PATCH v2 2/3] cros_ec: Fix deadlock when EC is not responsive at probe

2017-06-27 Thread Benson Leung
Hi Thierry, On Tue, Feb 14, 2017 at 08:58:01PM +0100, Thierry Escande wrote: > From: Gwendal Grignou > > When the EC is not responsive at probe, we try to get basic information > (protocol to use) later on through cros_xfer_cmd() call. > This patch makes sure there is no deadlock when re-probing

Re: [next-20170609] Oops while running CPU off-on (cpuset.c/cpuset_can_attach)

2017-06-27 Thread Tejun Heo
Hello, Abdul. Sorry about the long delay. On Mon, Jun 12, 2017 at 04:53:42PM +0530, Abdul Haleem wrote: > linux-next kernel crashed while running CPU offline and online. > > Machine: Power 8 LPAR > Kernel : 4.12.0-rc4-next-20170609 > gcc : version 5.2.1 > config: attached > testcase: CPU off/on

[PATCH] platform/chrome: cros_ec_lightbar - hide unused PM functions

2017-06-27 Thread Arnd Bergmann
The only reference to the new functions is inside of an #ifdef, which now causes a harmless warning when CONFIG_PM_SLEEP is not set: chrome/cros_ec_dev.c:478:12: error: 'ec_device_resume' defined but not used [-Werror=unused-function] chrome/cros_ec_dev.c:469:12: error: 'ec_device_suspend' define

[PATCH] ras: mark stub functions as 'inline'

2017-06-27 Thread Arnd Bergmann
With CONFIG_RAS disabled, we get two harmless warnings about unused functions: include/linux/ras.h:37:13: error: 'log_arm_hw_error' defined but not used [-Werror=unused-function] static void log_arm_hw_error(struct cper_sec_proc_arm *err) { return; } include/linux/ras.h:33:13: error: 'log_non_st

Re: [GIT PULL] extcon next for v4.13

2017-06-27 Thread Greg KH
On Fri, Jun 23, 2017 at 02:49:58PM +0900, Chanwoo Choi wrote: > Dear Greg, > > This is extcon-next pull request for v4.13. I add detailed description of > this pull request on below. Please pull extcon with following updates. > > Best Regards, > Chanwoo Choi > > The following changes since commi

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Shuah Khan
;> https://pastebin.com/P1uYmdMG >> >> Linux version 4.12.0-rc7-4-gda8b14e (buildslave@x86-64-08) (gcc >> version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Mon >> Jun 26 20:04:35 UTC 2017 >> >> Linux version 4.12.0-rc7-next-20170627 (buildsla

Re: [PATCH v5] trace: ras: add ARM processor error information trace event

2017-06-27 Thread Baicar, Tyler
On 6/27/2017 1:25 AM, Borislav Petkov wrote: On Tue, Jun 27, 2017 at 02:51:22PM +0800, Xie XiuQi wrote: How about we report the full info via arm_err_info_event which just for someone who want the detail information, and leave arm_event closed. If someone do not care the error detail, who could

Re: [PATCH 05/11] net: stmmac: dwmac-rk: Add internal phy support

2017-06-27 Thread Heiko Stuebner
Hi David, Am Dienstag, 27. Juni 2017, 22:33:20 CEST schrieb David.Wu: > 在 2017/6/24 1:19, Heiko Stuebner 写道: > > Am Freitag, 23. Juni 2017, 12:59:07 CEST schrieb David Wu: > >> To make internal phy worked, need to configure the phy_clock, > >> phy cru_reset and related registers. > >> > >> Change-

Re: [PATCH 1/5] [media] rockchip/rga: v4l2 m2m support

2017-06-27 Thread Jacob Chen
Hi Tomasz, Yeah, the comments are wrong, i will correct it >> +*/ >> + pages = (unsigned int *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 3); > > This is rather unfortunate and you should expect failures here on > actively used systems with uptime longer than few hours. Changing this

[PATCHv2 2/9] spi: stm32: fix compatible to fit with new bindings

2017-06-27 Thread Amelie Delaunay
This patch updates of_device_id compatible string to fit with new bindings. Signed-off-by: Amelie Delaunay --- drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 82a6616f..ca38c24 100644 --- a/driver

[PATCHv2 7/9] spi: stm32: enhance DMA error management

2017-06-27 Thread Amelie Delaunay
This patch reworks DMA error management. In case the DMA callback is called while EOT (End Of Transfer) flag is not set, that means that DMA encountered an error. This error will result in an auto-suspend of SPI flow, which could also result in an overrun. So, in DMA mode, SUSP and OVR flags are a

[PATCHv2 3/9] dt-bindings: spi: stm32: fix example with st,spi-midi-ns property

2017-06-27 Thread Amelie Delaunay
This patch aligns example with the optional property description, removes status and replace spidev unvalid compatible with Aarvark SPI Host Adapter one. In slave mode, Aardvark SPI Host Adapter requires 4ms delay between the end of byte n and the start of byte n+1, hence the use of the optional p

[PATCHv2 9/9] spi: spidev: add Aardvark to device tree compatibility list

2017-06-27 Thread Amelie Delaunay
This patch adds an entry for the TotalPhase Aardvark SPI Host Adapter, which can operate as an SPI Slave. Signed-off-by: Amelie Delaunay --- drivers/spi/spidev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 9a2a79a..8093885 100644 --- a/dr

[PATCHv2 6/9] spi: stm32: add runtime PM support

2017-06-27 Thread Amelie Delaunay
This patch reworks suspend and resume callbacks and add runtime_suspend and runtime_resume callbacks. Signed-off-by: Amelie Delaunay --- drivers/spi/spi-stm32.c | 43 --- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-stm32.

[PATCHv2 8/9] spi: stm32: fix potential dereference null return value

2017-06-27 Thread Amelie Delaunay
This patch fixes the usage of rx_dma_desc and tx_dma_desc pointers returned by dmaengine_prep_slave_sg, which can be null. Detected by CoverityScan, CID#1446587 ("Dereference null return value") Reported-by: Colin Ian King Signed-off-by: Amelie Delaunay --- drivers/spi/spi-stm32.c | 16 +++

[PATCHv2 5/9] spi: stm32: use normal conditional statements instead of ternary operator

2017-06-27 Thread Amelie Delaunay
This patch replace ternary operator use by normal condition statements to ease code reading. It also removes redundant !!. Signed-off-by: Amelie Delaunay --- drivers/spi/spi-stm32.c | 44 ++-- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a

<    2   3   4   5   6   7   8   9   10   11   >