[PATCH 1/3] thermal: core: Fix a memory leak in 'thermal_zone_device_register()' error handling path

2017-07-15 Thread Christophe JAILLET
'tz' is freed in some error handling paths but not in the main one. So free it also here to avoid a memory leak. Signed-off-by: Christophe JAILLET --- drivers/thermal/thermal_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.

[PATCH 0/3] thermal: core: Fix some error handling code in 'thermal_zone_device_register()'

2017-07-15 Thread Christophe JAILLET
These 3 patches are all related to error handling in 'thermal_zone_device_register()'. I've splitted them in 3 because each fixes or cleans something different. They could also be merged together because they are all related to the same few lines of code. The 1st one fixes in memory leak. The 2nd

[PATCH 2/3] thermal: core: Reorder 'thermal_zone_device_register()' error handling code

2017-07-15 Thread Christophe JAILLET
Reorder code in the error handling path in order to match the way resources have been allocated. With this new order, we can avoid a call to 'device_unregister()' if 'thermal_zone_create_device_groups'()' fails. At this point, 'device_register()' has not been called yet. Signed-off-by: Christophe

[PATCH] usb: gadget: udc: net2272: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 194532260 5 2171854d6 drivers/usb/g

Re: Submit of a driver for Pi433 - a radio module for Raspberry Pi

2017-07-15 Thread Greg KH
On Sat, Jul 15, 2017 at 07:05:04PM +0200, Wolf Entwicklungen wrote: > Am Sa, 15.07.2017, 15:47 schrieb Greg KH: > > On Sat, Jul 15, 2017 at 03:40:30PM +0200, Marcus Wolf wrote: > >> Hi Greg, > >> > > Hi Greg, > > now I added a TODO file and did a manual patchwork with lines of the old patch > (gi

[PATCH 3/3] PCI: qcom: Allow post_init to fail

2017-07-15 Thread Bjorn Andersson
host_init should detect and propagate errors from post_init. In addition, by acknowleding that post_init can fail we must disable the post_init resources in a step separate from the deinit, so that we don't try to disable the post_init resources a second time. Signed-off-by: Bjorn Andersson ---

[PATCH 2/3] PCI: qcom: Don't unroll init if init fails

2017-07-15 Thread Bjorn Andersson
When the init op fails it will restore the state of the resources, so we should not disable them one more time when this happens. Signed-off-by: Bjorn Andersson --- drivers/pci/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/dwc/pcie-qcom.c b/drive

[PATCH 1/3] PCI: dwc: Handle host_init failures

2017-07-15 Thread Bjorn Andersson
In several dwc based drivers host_init can fail, so make sure to propagate and handle this to avoid continuing operation of a driver or hardware in an invalid state. Signed-off-by: Bjorn Andersson --- drivers/pci/dwc/pci-dra7xx.c | 4 +++- drivers/pci/dwc/pci-exynos.c | 4 +

[PATCH 2/3] PCI: qcom: Don't unroll init if init fails

2017-07-15 Thread Bjorn Andersson
When the init op fails it will restore the state of the resources, so we should not disable them one more time when this happens. Signed-off-by: Bjorn Andersson --- drivers/pci/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/dwc/pcie-qcom.c b/drive

[PATCH 2/3] infiniband: nes: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 10429 780 33 112422bea drivers/infin

[PATCH 3/3] infiniband: pvrdma: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 107741872 8 12654316e infiniband/hw

[PATCH 1/3] infiniband: mthca: constify pci_device_id.

2017-07-15 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. File size before: textdata bss dec hex filename 13067 805 4 138763634 infiniband/hw

[PATCH 0/3] constify infiniband pci_device_id.

2017-07-15 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Arvind Yadav (3): [PATCH 1/3] infiniband: mthca: constify pci_device_id. [PATCH 2/3] infiniband: nes: constify pci_d

Re: [PATCH 06/11] irqchip: mips-cpu: Drop unnecessary static

2017-07-15 Thread Mark D Rustad
> On Jul 15, 2017, at 1:59 PM, Julia Lawall wrote: > > On Sat, 15 Jul 2017, Mark D Rustad wrote: > >> >>> On Jul 15, 2017, at 1:07 PM, Julia Lawall wrote: >>> >>> Drop static on a local variable, when the variable is initialized before >>> any possible use. Thus, the static has no benefit. >

Re: [PATCH v2 1/2] extcon: cros-ec: Add extcon-cros-ec driver to support display out.

2017-07-15 Thread Chanwoo Choi
Hi Enric, On Thu, Jul 13, 2017 at 7:45 PM, Enric Balletbo Serra wrote: > 2017-07-13 12:26 GMT+02:00 Chanwoo Choi : >> Hi Enric, >> >> On 2017년 07월 12일 19:28, Enric Balletbo Serra wrote: >>> Hi Chanwoo, >>> >>> 2017-05-24 0:24 GMT+02:00 Benson Leung : Hi Chanwoo, On Tue, May 23

[GIT PULL] final round of SCSI updates for the 4.12+ merge window

2017-07-15 Thread James Bottomley
This is actually just a small set of mainly bug fixes for the original merge window code plus a few trivial updates and qedi boot from SAN support feature patch. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Colin Ian

Re: [PATCH v2 3/3] DT: leds: Add Qualcomm Light Pulse Generator binding

2017-07-15 Thread Bjorn Andersson
On Sat 15 Jul 02:14 PDT 2017, Pavel Machek wrote: > Hi! > > > This adds the binding document describing the three hardware blocks > > related to the Light Pulse Generator found in a wide range of Qualcomm > > PMICs. > > > > Signed-off-by: Bjorn Andersson > > --- > > > > Changes since v1: > > -

Re: [PATCH v2 0/3] Qualcomm Light Pulse Generator

2017-07-15 Thread Bjorn Andersson
On Sat 15 Jul 02:10 PDT 2017, Pavel Machek wrote: > Hi! > > > This series introduces a generic pattern interface in the LED class and a > > driver for the Qualcomm Light Pulse Generator. > > > > Bjorn Andersson (3): > > leds: core: Introduce generic pattern interface > > This one should be la

Re: [PATCH v8 5/5] [media] platform: Add Synopsys Designware HDMI RX Controller Driver

2017-07-15 Thread kbuild test robot
Hi Jose, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.13-rc1 next-20170714] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jose-Abreu/Synopsys-Designware-HDMI-Vid

Re: [PATCH 05/10] percpu: change reserved_size to end page aligned

2017-07-15 Thread kbuild test robot
Hi Dennis, [auto build test ERROR on percpu/for-next] [also build test ERROR on v4.13-rc1 next-20170714] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dennis-Zhou/percpu-replace-percpu-area-map

Re: [PATCH 10/11] irqchip: digicolor: Drop unnecessary static

2017-07-15 Thread Baruch Siach
Hi Julia, On Sat, Jul 15, 2017 at 10:07:45PM +0200, Julia Lawall wrote: > Drop static on a local variable, when the variable is initialized before > any possible use. Thus, the static has no benefit. > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.lip6.fr/) >

Re: [drm/nouveau] GeForce 8600 GT boot/suspend grumbling

2017-07-15 Thread Mike Galbraith
On Sat, 2017-07-15 at 14:52 -0400, Ilia Mirkin wrote: > > OK, so this issue appears to be that we're calling > drm_crtc_vblank_off() on a crtc for which vblank is already disabled. > My guess is that this happens because the crtc is disabled. > > Not sure what the proper check is to see if vblank

Re: [PATCH net 0/2] Fragmented SKB corrections

2017-07-15 Thread David Miller
From: Doug Berger Date: Fri, 14 Jul 2017 16:12:08 -0700 > Two issues were observed in a review of the bcmgenet driver support for > fragmented SKBs which are addressed by this patch set. > > The first addresses a problem that could occur if the driver is not able > to DMA map a fragment of the S

Re: [PATCH] dt-bindings: net: Remove duplicate NSP Ethernet MAC binding document

2017-07-15 Thread David Miller
From: Florian Fainelli Date: Sat, 15 Jul 2017 10:24:47 -0700 > Commit 07d4510f5251 ("dt-bindings: net: bgmac: add bindings documentation for > bgmac") added both brcm,amac-nsp.txt and brcm,bgmac-nsp.txt. The former is > actually the one that got updated and is in use by the bgmac driver while the

Re: [PATCH 00/10] Constify isdn pci_device_id's.

2017-07-15 Thread David Miller
From: Arvind Yadav Date: Sat, 15 Jul 2017 09:55:41 +0530 > pci_device_id are not supposed to change at runtime. All functions > working with pci_device_id provided by work with > const pci_device_id. So mark the non-const structs as const. Series applied, thanks.

Re: [PATCH v2 5/6] ARM: dts: rockchip: enable RGA for rk3288 devices

2017-07-15 Thread Jacob Chen
Hi Laurent, 2017-07-15 17:16 GMT+08:00 Laurent Pinchart : > Hi Jacob, > > Thank you for the patch. > > On Saturday 15 Jul 2017 14:58:39 Jacob Chen wrote: >> Signed-off-by: Jacob Chen >> --- >> arch/arm/boot/dts/rk3288-evb.dtsi | 4 >> arch/arm/boot/dts/rk3288-firefly-reload-

Re: [PATCH v2 2/6] [media] rockchip/rga: v4l2 m2m support

2017-07-15 Thread Jacob Chen
Hi all, 2017-07-16 0:49 GMT+08:00 Personnel : > Le samedi 15 juillet 2017 à 12:42 +0300, Laurent Pinchart a écrit : >> Hi Jacob, >> >> Thank you for the patch. >> >> On Saturday 15 Jul 2017 14:58:36 Jacob Chen wrote: >> > Rockchip RGA is a separate 2D raster graphic acceleration unit. It >> > acce

[RFC v6 02/62] powerpc: Free up four 64K PTE bits in 64K backed HPTE pages

2017-07-15 Thread Ram Pai
Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6 in the 64K backed HPTE pages. This along with the earlier patch will entirely free up the four bits from 64K PTE. The bit numbers are big-endian as defined in the ISA3.0 This patch does the following change to 64K PTE backed by 64K H

[RFC v6 01/62] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-07-15 Thread Ram Pai
Rearrange 64K PTE bits to free up bits 3, 4, 5 and 6, in the 4K backed HPTE pages.These bits continue to be used for 64K backed HPTE pages in this patch, but will be freed up in the next patch. The bit numbers are big-endian as defined in the ISA3.0 The patch does the following change to t

[RFC v6 03/62] powerpc: introduce pte_set_hash_slot() helper

2017-07-15 Thread Ram Pai
Introduce pte_set_hash_slot().It sets the (H_PAGE_F_SECOND|H_PAGE_F_GIX) bits at the appropriate location in the PTE of 4K PTE. For 64K PTE, it sets the bits in the second part of the PTE. Though the implementation for the former just needs the slot parameter, it does tak

[RFC v6 07/62] powerpc: use helper functions in __hash_page_huge() for 64K PTE

2017-07-15 Thread Ram Pai
replace redundant code in __hash_page_huge() with helper functions pte_get_hash_gslot() and pte_set_hash_slot() Signed-off-by: Ram Pai --- arch/powerpc/mm/hugetlbpage-hash64.c | 24 1 files changed, 4 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/mm/hugetlb

[RFC v6 05/62] powerpc: capture the PTE format changes in the dump pte report

2017-07-15 Thread Ram Pai
The H_PAGE_F_SECOND,H_PAGE_F_GIX are not in the 64K main-PTE. capture these changes in the dump pte report. Signed-off-by: Ram Pai --- arch/powerpc/mm/dump_linuxpagetables.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/

[RFC v6 08/62] powerpc: use helper functions in __hash_page_4K() for 64K PTE

2017-07-15 Thread Ram Pai
replace redundant code in __hash_page_4K() with helper functions pte_get_hash_gslot() and pte_set_hash_slot() Signed-off-by: Ram Pai --- arch/powerpc/mm/hash64_64k.c | 34 +- 1 files changed, 9 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/mm/hash64_

[RFC v6 09/62] powerpc: use helper functions in __hash_page_4K() for 4K PTE

2017-07-15 Thread Ram Pai
replace redundant code with helper functions pte_get_hash_gslot() and pte_set_hash_slot() Signed-off-by: Ram Pai --- arch/powerpc/mm/hash64_4k.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/mm/hash64_4k.c b/arch/powerpc/mm/hash64_4k.c index 6

[RFC v6 12/62] mm: introduce an additional vma bit for powerpc pkey

2017-07-15 Thread Ram Pai
Currently only 4bits are allocated in the vma flags to hold 16 keys. This is sufficient for x86. PowerPC supports 32 keys, which needs 5bits. This patch allocates an additional bit. Signed-off-by: Ram Pai --- fs/proc/task_mmu.c |6 -- include/linux/mm.h | 20 ++-- 2

[RFC v6 10/62] powerpc: use helper functions in flush_hash_page()

2017-07-15 Thread Ram Pai
replace redundant code in flush_hash_page() with helper function pte_get_hash_gslot(). Signed-off-by: Ram Pai --- arch/powerpc/mm/hash_utils_64.c | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c

[RFC v6 14/62] powerpc: helper function to read,write AMR,IAMR,UAMOR registers

2017-07-15 Thread Ram Pai
Implements helper functions to read and write the key related registers; AMR, IAMR, UAMOR. AMR register tracks the read,write permission of a key IAMR register tracks the execute permission of a key UAMOR register enables and disables a key Signed-off-by: Ram Pai --- arch/powerpc/include/asm/bo

[RFC v6 18/62] powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

2017-07-15 Thread Ram Pai
Finally this patch provides the ability for a process to allocate and free a protection key. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/systbl.h |2 ++ arch/powerpc/include/asm/unistd.h |4 +--- arch/powerpc/include/uapi/asm/unistd.h |2 ++ 3 files changed, 5 inser

[RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-15 Thread Ram Pai
Total 32 keys are supported on powerpc. However pkey 0,1 and 31 are reserved. So effectively we have 29 pkeys. This patch keeps track of reserved keys, allocated keys and keys that are currently free. Also it adds skeletal functions and macros, that the architecture-independent code expects

[RFC v6 16/62] powerpc: cleaup AMR,iAMR when a key is allocated or freed

2017-07-15 Thread Ram Pai
cleanup the bits corresponding to a key in the AMR, and IAMR register, when the key is newly allocated/activated or is freed. We dont want some residual bits cause the hardware enforce unintended behavior when the key is activated or freed. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pke

[RFC v6 20/62] powerpc: store and restore the pkey state across context switches

2017-07-15 Thread Ram Pai
Store and restore the AMR, IAMR and UMOR register state of the task before scheduling out and after scheduling in, respectively. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/processor.h |5 + arch/powerpc/kernel/process.c| 18 ++ 2 files changed, 23 inser

[RFC v6 17/62] powerpc: implementation for arch_set_user_pkey_access()

2017-07-15 Thread Ram Pai
This patch provides the detailed implementation for a user to allocate a key and enable it in the hardware. It provides the plumbing, but it cannot be used till the system call is implemented. The next patch will do so. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h | 10 +++

[RFC v6 21/62] powerpc: introduce execute-only pkey

2017-07-15 Thread Ram Pai
This patch provides the implementation of execute-only pkey. The architecture-independent expects the ability to create and manage a special key which has execute-only permission. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/mmu.h |1 + arch/powerpc/include/asm/pkeys.h

[RFC v6 24/62] powerpc: map vma key-protection bits to pte key bits.

2017-07-15 Thread Ram Pai
map the pkey bits in the pte from the key protection bits of the vma. The pte bits used for pkey are 3,4,5,6 and 57. The first four bits are the same four bits that were freed up initially in this patch series. remember? :-) Without those four bits this patch would'nt be possible. Signed-off-by:

[RFC v6 22/62] powerpc: ability to associate pkey to a vma

2017-07-15 Thread Ram Pai
arch-independent code expects the arch to map a pkey into the vma's protection bit setting. The patch provides that ability. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/mman.h |8 +++- arch/powerpc/include/asm/pkeys.h | 18 +++--- 2 files changed, 22 insertions(

[RFC v6 25/62] powerpc: sys_pkey_mprotect() system call

2017-07-15 Thread Ram Pai
Patch provides the ability for a process to associate a pkey with a address range. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/systbl.h |1 + arch/powerpc/include/asm/unistd.h |4 +--- arch/powerpc/include/uapi/asm/unistd.h |1 + 3 files changed, 3 insertions(+), 3

[RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-15 Thread Ram Pai
helper function that checks if the read/write/execute is allowed on the pte. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++ arch/powerpc/include/asm/pkeys.h | 12 + arch/powerpc/mm/pkeys.c | 33

[RFC v6 28/62] powerpc: check key protection for user page access

2017-07-15 Thread Ram Pai
Make sure that the kernel does not access user pages without checking their key-protection. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/pgtable.h | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h

[RFC v6 30/62] powerpc: implementation for arch_vma_access_permitted()

2017-07-15 Thread Ram Pai
This patch provides the implementation for arch_vma_access_permitted(). Returns true if the requested access is allowed by pkey associated with the vma. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/mmu_context.h |5 +++- arch/powerpc/mm/pkeys.c| 43 ++

[RFC v6 29/62] powerpc: Macro the mask used for checking DSI exception

2017-07-15 Thread Ram Pai
Replace the magic number used to check for DSI exception with a meaningful value. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/reg.h |7 ++- arch/powerpc/kernel/exceptions-64s.S |2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/as

[RFC v6 34/62] powerpc: capture the violated protection key on fault

2017-07-15 Thread Ram Pai
Capture the protection key that got violated in paca. This value will be later used to inform the signal handler. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/paca.h |1 + arch/powerpc/kernel/asm-offsets.c |1 + arch/powerpc/mm/fault.c |8 3 files changed,

[RFC v6 32/62] powerpc: capture AMR register content on pkey violation

2017-07-15 Thread Ram Pai
capture AMR register contents, and save it in paca whenever a pkey violation is detected. This value will be needed to deliver pkey-violation signal to the task. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/paca.h |3 +++ arch/powerpc/kernel/asm-offsets.c |5 + arch/powerpc

[RFC v6 38/62] powerpc: implementation for arch_pkeys_enabled()

2017-07-15 Thread Ram Pai
arch_pkeys_enabled() returns true if the cpu supports protection key, and the kernel has it enabled. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/as

[RFC v6 36/62] mm: introduce arch_pkeys_enabled()

2017-07-15 Thread Ram Pai
Only the architecture knows if it supports protection keys. Hence introducing arch_pkeys_enabled(). This function is needed by arch neutral code. One use case is -- to determine if the protection key needs to be displayed in smaps. Signed-off-by: Ram Pai --- include/linux/pkeys.h |

[RFC v6 37/62] x86: implementation for arch_pkeys_enabled()

2017-07-15 Thread Ram Pai
arch_pkeys_enabled() returns true if the cpu supports X86_FEATURE_OSPKE. Signed-off-by: Ram Pai --- arch/x86/include/asm/pkeys.h |1 + arch/x86/kernel/fpu/xstate.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/pkeys.h b/arch/x86/include/asm

[RFC v6 39/62] mm: display pkey in smaps if arch_pkeys_enabled() is true

2017-07-15 Thread Ram Pai
Currently the architecture specific code is expected to display the protection keys in smap for a given vma. This can lead to redundant code and possibly to divergent formats in which the key gets displayed. This patch changes the implementation. It displays the pkey only if the architecture suppo

[RFC v6 40/62] x86: delete arch_show_smap()

2017-07-15 Thread Ram Pai
arch_show_smap() function is not needed anymore. Delete it. Signed-off-by: Ram Pai --- arch/x86/kernel/setup.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index f818236..5efe4c3 100644 --- a/arch/x86/kernel/set

[RFC v6 42/62] selftest/vm: rename all references to pkru to a generic name

2017-07-15 Thread Ram Pai
some pkru references are named to pkey_reg and some prku references are renamed to pkey Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 85 +- tools/testing/selftests/vm/protection_keys.c | 227 ++ 2 files changed, 164 insertions(+), 1

[RFC v6 41/62] selftest/x86: Move protecton key selftest to arch neutral directory

2017-07-15 Thread Ram Pai
Signed-off-by: Ram Pai --- tools/testing/selftests/vm/Makefile |1 + tools/testing/selftests/vm/pkey-helpers.h | 219 tools/testing/selftests/vm/protection_keys.c | 1395 + tools/testing/selftests/x86/Makefile |2 +- tools/testing/self

[RFC v6 44/62] selftest/vm: typecast the pkey register

2017-07-15 Thread Ram Pai
This is in preparation to accomadate a differing size register across architectures. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 27 +- tools/testing/selftests/vm/protection_keys.c | 75 ++ 2 files changed, 54 insertions(+), 48 de

[RFC v6 45/62] selftest/vm: generics function to handle shadow key register

2017-07-15 Thread Ram Pai
helper functions to handler shadow pkey register Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 27 tools/testing/selftests/vm/protection_keys.c | 34 - 2 files changed, 49 insertions(+), 12 deletions(-) diff --git a/to

[RFC v6 48/62] selftest/vm: clear the bits in shadow reg when a pkey is freed.

2017-07-15 Thread Ram Pai
When a key is freed, the key is no more effective. Clear the bits corresponding to the pkey in the shadow register. Otherwise it will carry some spurious bits which can trigger false-positive asserts. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c |3 +++ 1 fi

[RFC v6 43/62] selftest/vm: move generic definitions to header file

2017-07-15 Thread Ram Pai
Moved all the generic definition and helper functions to the header file Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 62 +++-- tools/testing/selftests/vm/protection_keys.c | 54 -- 2 files changed, 57 insertions(+), 59 del

[RFC v6 46/62] selftest/vm: fix the wrong assert in pkey_disable_set()

2017-07-15 Thread Ram Pai
If the flag is 0, no bits will be set. Hence we cant expect the resulting bitmap to have a higher value than what it was earlier. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/testing/selfte

[RFC v6 50/62] selftest/vm: introduce two arch independent abstraction

2017-07-15 Thread Ram Pai
open_hugepage_file() <- opens the huge page file get_start_key() <-- provides the first non-reserved key. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 11 +++ tools/testing/selftests/vm/protection_keys.c |6 +++--- 2 files changed, 14 insertions(+), 3

[RFC v6 49/62] selftest/vm: fix alloc_random_pkey() to make it really random

2017-07-15 Thread Ram Pai
alloc_random_pkey() was allocating the same pkey every time. Not all pkeys were geting tested. fixed it. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/vm/protection

[RFC v6 52/62] selftest/vm: generic cleanup

2017-07-15 Thread Ram Pai
cleanup the code to satisfy coding styles. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 81 ++ 1 files changed, 43 insertions(+), 38 deletions(-) diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protec

[RFC v6 55/62] selftest/vm: associate key on a mapped page and detect access violation

2017-07-15 Thread Ram Pai
detect access-violation on a page to which access-disabled key is associated much after the page is mapped. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/tools/testing/selftests/

Re: [PATCH 05/10] percpu: change reserved_size to end page aligned

2017-07-15 Thread kbuild test robot
Hi Dennis, [auto build test ERROR on percpu/for-next] [also build test ERROR on v4.13-rc1 next-20170714] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dennis-Zhou/percpu-replace-percpu-area-map

[RFC v6 54/62] selftest/vm: fix an assertion in test_pkey_alloc_exhaust()

2017-07-15 Thread Ram Pai
The maximum number of keys that can be allocated has to take into consideration that some keys are reserved by the architecture of specific purpose and cannot be allocated. Fix the assertion in test_pkey_alloc_exhaust() Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c |

[RFC v6 57/62] selftest/vm: associate key on a mapped page and detect write violation

2017-07-15 Thread Ram Pai
detect write-violation on a page to which write-disabled key is associated much after the page is mapped. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tools/testing/selftests/vm/protec

[RFC v6 60/62] selftest/vm: sub-page allocator

2017-07-15 Thread Ram Pai
introduce a new allocator that allocates 4k hardware-pages to back 64k linux-page. This allocator is only applicable on powerpc. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 29 ++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --gi

[RFC v6 56/62] selftest/vm: detect no key violation on a freed key

2017-07-15 Thread Ram Pai
a access-denied key should not trigger any key violation after the key has been freed. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/tools/testing/selftests/vm/protection_k

[RFC v6 62/62] Documentation/vm: PowerPC specific updates to memory protection keys

2017-07-15 Thread Ram Pai
Add documentation updates that capture PowerPC specific changes. Signed-off-by: Ram Pai --- Documentation/vm/protection-keys.txt | 90 - 1 files changed, 65 insertions(+), 25 deletions(-) diff --git a/Documentation/vm/protection-keys.txt b/Documentation/vm/pro

[RFC v6 58/62] selftest/vm: detect no write key-violation on a freed key

2017-07-15 Thread Ram Pai
a write-denied key should not trigger any key violation after the key has been freed. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/tools/testing/selftests/vm/protection_keys.c b

[RFC v6 47/62] selftest/vm: fixed bugs in pkey_disable_clear()

2017-07-15 Thread Ram Pai
instead of clearing the bits, pkey_disable_clear() was setting the bits. Fixed it. Also fixed a wrong assertion in that function. When bits are cleared, the resulting bit value will be less than the original. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c |4 ++-- 1

[RFC v6 61/62] Documentation/x86: Move protecton key documentation to arch neutral directory

2017-07-15 Thread Ram Pai
Since PowerPC and Intel both support memory protection keys, moving the documenation to arch-neutral directory. Signed-off-by: Ram Pai --- Documentation/vm/protection-keys.txt | 85 + Documentation/x86/protection-keys.txt | 85

[RFC v6 51/62] selftest/vm: pkey register should match shadow pkey

2017-07-15 Thread Ram Pai
expected_pkey_fault() is comparing the contents of pkey register with 0. This may not be true all the time. There could be bits set by default by the architecture which can never be changed. Hence compare the value against shadow pkey register, which is supposed to track the bits accurately all thr

[RFC v6 59/62] selftest/vm: detect write violation on a mapped access-denied-key page

2017-07-15 Thread Ram Pai
detect write-violation on a page to which access-disabled key is associated much after the page is mapped. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/protection_keys.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/tools/testing/selftests/vm/prot

[RFC v6 53/62] selftest/vm: powerpc implementation for generic abstraction

2017-07-15 Thread Ram Pai
Introduce powerpc implementation for the various abstactions. Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 97 +++-- tools/testing/selftests/vm/protection_keys.c | 33 + 2 files changed, 107 insertions(+), 23 deletions(-) diff --git a

[RFC v6 33/62] powerpc: introduce get_pte_pkey() helper

2017-07-15 Thread Ram Pai
get_pte_pkey() helper returns the pkey associated with a address corresponding to a given mm_struct. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 + arch/powerpc/mm/hash_utils_64.c | 25 + 2 files changed, 30 insertio

[RFC v6 31/62] powerpc: Handle exceptions caused by pkey violation

2017-07-15 Thread Ram Pai
Handle Data and Instruction exceptions caused by memory protection-key. The CPU will detect the key fault if the HPTE is already programmed with the key. However if the HPTE is not hashed, a key fault will not be detected by the hardware. The software will detect pkey violation in such a cas

[RFC v6 15/62] powerpc: helper functions to initialize AMR, IAMR and UMOR registers

2017-07-15 Thread Ram Pai
Introduce helper functions that can initialize the bits in the AMR, IAMR and UMOR register; the bits that correspond to the given pkey. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h |1 + arch/powerpc/mm/pkeys.c | 44 ++ 2 files ch

[RFC v6 35/62] powerpc: Deliver SEGV signal on pkey violation

2017-07-15 Thread Ram Pai
The value of the AMR register at the time of exception is made available in gp_regs[PT_AMR] of the siginfo. The value of the pkey, whose protection got violated, is made available in si_pkey field of the siginfo structure. Signed-off-by: Ram Pai --- arch/powerpc/include/uapi/asm/ptrace.h |1

[RFC v6 26/62] powerpc: Program HPTE key protection bits

2017-07-15 Thread Ram Pai
Map the PTE protection key bits to the HPTE key protection bits, while creating HPTE entries. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/mmu-hash.h |5 + arch/powerpc/include/asm/pkeys.h | 12 arch/powerpc/mm/hash_utils_64.c |

[RFC v6 23/62] powerpc: implementation for arch_override_mprotect_pkey()

2017-07-15 Thread Ram Pai
arch independent code calls arch_override_mprotect_pkey() to return a pkey that best matches the requested protection. This patch provides the implementation. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/mmu_context.h |5 +++ arch/powerpc/include/asm/pkeys.h | 14 - a

[RFC v6 19/62] powerpc: ability to create execute-disabled pkeys

2017-07-15 Thread Ram Pai
powerpc has hardware support to disable execute on a pkey. This patch enables the ability to create execute-disabled keys. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/pkeys.h | 12 arch/powerpc/mm/pkeys.c | 10 ++ 2 files changed, 22 insertions(+), 0 del

[RFC v6 06/62] powerpc: use helper functions in __hash_page_64K() for 64K PTE

2017-07-15 Thread Ram Pai
replace redundant code in __hash_page_64K() with helper functions pte_get_hash_gslot() and pte_set_hash_slot() Signed-off-by: Ram Pai --- arch/powerpc/mm/hash64_64k.c | 24 1 files changed, 4 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/mm/hash64_64k.c b/a

[RFC v6 11/62] powerpc: initial pkey plumbing

2017-07-15 Thread Ram Pai
basic setup to initialize the pkey system. Only 64K kernel in HPT mode, enables the pkey system. Signed-off-by: Ram Pai --- arch/powerpc/Kconfig | 16 ++ arch/powerpc/include/asm/mmu_context.h |5 +++ arch/powerpc/include/asm/pkeys.h | 51 +

[RFC v6 04/62] powerpc: introduce pte_get_hash_gslot() helper

2017-07-15 Thread Ram Pai
Introduce pte_get_hash_gslot()() which returns the slot number of the HPTE in the global hash table. This function will come in handy as we work towards re-arranging the PTE bits in the later patches. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/hash.h |3 +++ arch/powerpc/

[RFC v6 00/62] powerpc: Memory Protection Keys

2017-07-15 Thread Ram Pai
Memory protection keys enable applications to protect its address space from inadvertent access or corruption from itself. The overall idea: - A process allocates a key and associates it with an address range withinits address space. The process then can dynamic

Re: [PATCH] ARM: dts: uniphier: use SPDX-License-Identifier (2nd)

2017-07-15 Thread Masahiro Yamada
2017-07-11 23:08 GMT+09:00 Masahiro Yamada : > Commit fa53757bca33 ("ARM: dts: uniphier: use SPDX-License-Identifier") > missed to touch these two. Now updating. > > Signed-off-by: Masahiro Yamada Applied to linux-uniphier. -- Best Regards Masahiro Yamada

Re: [PATCH V4 3/3] arm64: dts: uniphier: add watchdog node for LD11 and LD20

2017-07-15 Thread Masahiro Yamada
2017-06-14 16:53 GMT+09:00 Keiji Hayashibara : > Add nodes of watchdog timer for UniPhier LD11 and LD20 SoC. > The watchdog timer is included in sysctrl. > > Signed-off-by: Keiji Hayashibara Applied to linux-uniphier. Thanks! -- Best Regards Masahiro Yamada

drivers//clocksource/timer-of.h:35:28: error: field 'clkevt' has incomplete type

2017-07-15 Thread kbuild test robot
Hi Daniel, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 commit: dc11bae78529526605c5c45c369c9512fd012093 clocksource/drivers: Add timer-of common init routine date: 5 we

include/linux/kernel.h:860:32: error: dereferencing pointer to incomplete type 'struct clock_event_device'

2017-07-15 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 commit: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of() date: 3 days ago config: ia64-allyesconfig (attached a

arch/h8300/include/asm/flat.h:28:3: error: expected ')' before 'val'

2017-07-15 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5771a8c08880cdca3bfb4a3fc6d309d6bba20877 commit: 468138d78510688fb5476f98d23f11ac6a63229a binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail date: 12 days ago config: h8300-h8300h-sim_defcon

Re: perf: bisected sampling bug in Linux 4.11-rc1

2017-07-15 Thread Vince Weaver
On Sat, 15 Jul 2017, Vince Weaver wrote: > Although there is a separate issue also introduced in 4.11-rc1 that still > fails a different testcase. I'm in the middle of bisecting that one and > probably won't have the result of the bisect until Monday. I went and bisected the other issue anyway

Confirmation!!!

2017-07-15 Thread Mikhail Fridman
-- Hello, I Mikhail Fridman. has selected you specially as one of my beneficiaries for my Charitable Donation, Just as I have declared on May 23, 2016 to give my fortune as charity. Check the link below for confirmation: http://www.ibtimes.co.uk/russias-second-wealthiest-man-mikhail-fridma

[PATCH 1/2] PM / suspend: Add platform_suspend_target_state()

2017-07-15 Thread Florian Fainelli
Add an optional platform_suspend_ops callback: target_state, and a helper function globally visible to get this called: platform_suspend_target_state(). This is useful for platform specific drivers that may need to take a slightly different suspend/resume path based on the system's suspend/resume

[PATCH 0/2] PM / suspend: Add platform_suspend_target_state()

2017-07-15 Thread Florian Fainelli
This patch series implements the idea discussed in this thread: https://www.spinics.net/lists/arm-kernel/msg590068.html The last patch is relative to the pending submission of the Broadcom STB S2/S3/S5 suspend/resume code that can be found below, and is provided as an example of how this can be u

  1   2   3   >