Re: [PATCH] MIPS: Make individual platforms select ARCH_MIGHT_HAVE_PC_SERIO

2017-06-16 Thread Maciej W. Rozycki
On Fri, 16 Jun 2017, Florian Fainelli wrote: > > How did you determine that? Malta for one not only has an SMSC FDC37M817 > > Super I/O Controller featuring an 8042-compatible core, but actual PS/2 > > keyboard and mouse connectors as well. > > I was just grepping for i8042 in platform code

Re: [PATCH] MIPS: Make individual platforms select ARCH_MIGHT_HAVE_PC_SERIO

2017-06-16 Thread Maciej W. Rozycki
On Fri, 16 Jun 2017, Florian Fainelli wrote: > > How did you determine that? Malta for one not only has an SMSC FDC37M817 > > Super I/O Controller featuring an 8042-compatible core, but actual PS/2 > > keyboard and mouse connectors as well. > > I was just grepping for i8042 in platform code

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Johannes Weiner
On Fri, Jun 16, 2017 at 12:14:53PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > > > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > > Hi, > > > > > > I see the following build error in -next when building

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Johannes Weiner
On Fri, Jun 16, 2017 at 12:14:53PM -0700, Andrew Morton wrote: > On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > > > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > > Hi, > > > > > > I see the following build error in -next when building hexagon images. > > > > >

[PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages

2017-06-16 Thread Luck, Tony
From: Tony Luck Speculative processor accesses may reference any memory that has a valid page table entry. While a speculative access won't generate a machine check, it will log the error in a machine check bank. That could cause escalation of a subsequent error since the

[PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages

2017-06-16 Thread Luck, Tony
From: Tony Luck Speculative processor accesses may reference any memory that has a valid page table entry. While a speculative access won't generate a machine check, it will log the error in a machine check bank. That could cause escalation of a subsequent error since the overflow bit will be

[PATCH] [perf/core branch] perf coresight: Fix ARM builds caused by misplaced __printf

2017-06-16 Thread Kim Phillips
Trailing __printf attributes work for function declarations, but not definitions. This patch fixes arm32/64 builds by placing __printf before the declarator. Otherwise this happens: arch/arm64/util/../../arm/util/cs-etm.c:586:1: error: attributes should be specified before the declarator in a

[PATCH] [perf/core branch] perf coresight: Fix ARM builds caused by misplaced __printf

2017-06-16 Thread Kim Phillips
Trailing __printf attributes work for function declarations, but not definitions. This patch fixes arm32/64 builds by placing __printf before the declarator. Otherwise this happens: arch/arm64/util/../../arm/util/cs-etm.c:586:1: error: attributes should be specified before the declarator in a

Re: perf report: fix off-by-one for non-activation frames

2017-06-16 Thread Milian Wolff
On Freitag, 16. Juni 2017 13:57:44 CEST Jan Kratochvil wrote: > On Fri, 16 Jun 2017 13:51:37 +0200, Milian Wolff wrote: > > > perf-4.12.0-0.rc5.git0.1.fc27.x86_64 > > > > > > 39e32e gdb_main (/usr/libexec/gdb) > > > 10b6fa main (/usr/libexec/gdb) > > > > >

Re: perf report: fix off-by-one for non-activation frames

2017-06-16 Thread Milian Wolff
On Freitag, 16. Juni 2017 13:57:44 CEST Jan Kratochvil wrote: > On Fri, 16 Jun 2017 13:51:37 +0200, Milian Wolff wrote: > > > perf-4.12.0-0.rc5.git0.1.fc27.x86_64 > > > > > > 39e32e gdb_main (/usr/libexec/gdb) > > > 10b6fa main (/usr/libexec/gdb) > > > > >

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Luis R. Rodriguez
On Fri, Jun 16, 2017 at 09:29:52PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jun 16, 2017 at 06:46:51PM +0200, Luis R. Rodriguez wrote: > > Kees, please review 47e0bbb7fa98 below. > > Brian, please review be4a1326d12c below. > > > > On Thu, Jun 15, 2017 at 11:26:53PM +0530, Sumit Semwal wrote: >

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Luis R. Rodriguez
On Fri, Jun 16, 2017 at 09:29:52PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jun 16, 2017 at 06:46:51PM +0200, Luis R. Rodriguez wrote: > > Kees, please review 47e0bbb7fa98 below. > > Brian, please review be4a1326d12c below. > > > > On Thu, Jun 15, 2017 at 11:26:53PM +0530, Sumit Semwal wrote: >

Re: [PATCH] tools/testing/selftests/sysctl: Add pre-check to the value of writes_strict

2017-06-16 Thread Orson Zhai
On 16 June 2017 at 22:49, Sumit Semwal wrote: > Hi Orson, > > Thanks for the patch. > > On 16 June 2017 at 14:58, Orson Zhai wrote: >> Sysctl test will fail in some items if the value of /proc/sys/kernel >> /sysctrl_writes_strict is 0 as the

Re: [PATCH] tools/testing/selftests/sysctl: Add pre-check to the value of writes_strict

2017-06-16 Thread Orson Zhai
On 16 June 2017 at 22:49, Sumit Semwal wrote: > Hi Orson, > > Thanks for the patch. > > On 16 June 2017 at 14:58, Orson Zhai wrote: >> Sysctl test will fail in some items if the value of /proc/sys/kernel >> /sysctrl_writes_strict is 0 as the default value in kernel older than v4.5. >> >> Make

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

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:58:56PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:11, Ross Zwisler wrote: > > @@ -216,17 +217,6 @@ static void dax_unlock_mapping_entry(struct > > address_space *mapping, > > dax_wake_mapping_entry_waiter(mapping, index, entry, false); > > } > > > > -static

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

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:58:56PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:11, Ross Zwisler wrote: > > @@ -216,17 +217,6 @@ static void dax_unlock_mapping_entry(struct > > address_space *mapping, > > dax_wake_mapping_entry_waiter(mapping, index, entry, false); > > } > > > > -static

Re: [PATCH] PCI / PM: Restore the status of PCI devices across hibernation

2017-06-16 Thread Bjorn Helgaas
On Thu, May 25, 2017 at 04:49:07PM +0800, Chen Yu wrote: > Currently we saw a lot of "No irq handler" errors during hibernation, > which caused the system hang finally: > > [ 710.141581] ata4.00: qc timeout (cmd 0xec) > [ 710.147135] ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [

Re: [PATCH] PCI / PM: Restore the status of PCI devices across hibernation

2017-06-16 Thread Bjorn Helgaas
On Thu, May 25, 2017 at 04:49:07PM +0800, Chen Yu wrote: > Currently we saw a lot of "No irq handler" errors during hibernation, > which caused the system hang finally: > > [ 710.141581] ata4.00: qc timeout (cmd 0xec) > [ 710.147135] ata4.00: failed to IDENTIFY (I/O error, err_mask=0x4) > [

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

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:42:04PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:09, Ross Zwisler wrote: > > 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

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

2017-06-16 Thread Ross Zwisler
On Thu, Jun 15, 2017 at 04:42:04PM +0200, Jan Kara wrote: > On Wed 14-06-17 11:22:09, Ross Zwisler wrote: > > 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

Re: [PATCH RESEND 03/13] mfd: cros_ec: add debugfs, console log file

2017-06-16 Thread Benson Leung
Hi Enric, I have gotten around to reviewing this series, and hope to get this in ASAP. I found an issue with this commit, but I'll go ahead and fix it myself as I'm creating the immutable branch. No need to respin the series. On Tue, May 16, 2017 at 06:13:09PM +0200, Enric Balletbo i Serra

Re: [PATCH RESEND 03/13] mfd: cros_ec: add debugfs, console log file

2017-06-16 Thread Benson Leung
Hi Enric, I have gotten around to reviewing this series, and hope to get this in ASAP. I found an issue with this commit, but I'll go ahead and fix it myself as I'm creating the immutable branch. No need to respin the series. On Tue, May 16, 2017 at 06:13:09PM +0200, Enric Balletbo i Serra

[tip:perf/urgent] perf evsel: Fix probing of precise_ip level for default cycles event

2017-06-16 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID: 7a1ac110c22eb726684c837544a2d42c33e07be7 Gitweb: http://git.kernel.org/tip/7a1ac110c22eb726684c837544a2d42c33e07be7 Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 9 Jun 2017 16:54:28 -0300 Committer: Arnaldo Carvalho de Melo CommitDate:

[tip:perf/urgent] perf evsel: Fix probing of precise_ip level for default cycles event

2017-06-16 Thread tip-bot for Arnaldo Carvalho de Melo
Commit-ID: 7a1ac110c22eb726684c837544a2d42c33e07be7 Gitweb: http://git.kernel.org/tip/7a1ac110c22eb726684c837544a2d42c33e07be7 Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 9 Jun 2017 16:54:28 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 14 Jun 2017 15:44:29 -0300

[tip:perf/urgent] perf tools: Fix build with ARCH=x86_64

2017-06-16 Thread tip-bot for Jiada Wang
Commit-ID: 7a759cd8e8272ee18922838ee711219c7c796a31 Gitweb: http://git.kernel.org/tip/7a759cd8e8272ee18922838ee711219c7c796a31 Author: Jiada Wang AuthorDate: Sun, 9 Apr 2017 20:02:37 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 14

[tip:perf/urgent] perf tools: Fix build with ARCH=x86_64

2017-06-16 Thread tip-bot for Jiada Wang
Commit-ID: 7a759cd8e8272ee18922838ee711219c7c796a31 Gitweb: http://git.kernel.org/tip/7a759cd8e8272ee18922838ee711219c7c796a31 Author: Jiada Wang AuthorDate: Sun, 9 Apr 2017 20:02:37 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 14 Jun 2017 15:44:29 -0300 perf tools: Fix

[tip:perf/urgent] perf unwind: Report module before querying isactivation in dwfl unwind

2017-06-16 Thread tip-bot for Milian Wolff
Commit-ID: 9126cbbacecb8917bd0418809ef1d26616b2061e Gitweb: http://git.kernel.org/tip/9126cbbacecb8917bd0418809ef1d26616b2061e Author: Milian Wolff AuthorDate: Fri, 2 Jun 2017 16:37:53 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16

[tip:perf/urgent] perf unwind: Report module before querying isactivation in dwfl unwind

2017-06-16 Thread tip-bot for Milian Wolff
Commit-ID: 9126cbbacecb8917bd0418809ef1d26616b2061e Gitweb: http://git.kernel.org/tip/9126cbbacecb8917bd0418809ef1d26616b2061e Author: Milian Wolff AuthorDate: Fri, 2 Jun 2017 16:37:53 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Jun 2017 14:37:30 -0300 perf unwind:

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 09:18:29PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > diff --git a/arch/powerpc/include/uapi/asm/ptrace.h > > b/arch/powerpc/include/uapi/asm/ptrace.h > > index 8036b38..109d0c2 100644 > > --- a/arch/powerpc/include/uapi/asm/ptrace.h > > +++

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 09:18:29PM +1000, Michael Ellerman wrote: > Ram Pai writes: > > diff --git a/arch/powerpc/include/uapi/asm/ptrace.h > > b/arch/powerpc/include/uapi/asm/ptrace.h > > index 8036b38..109d0c2 100644 > > --- a/arch/powerpc/include/uapi/asm/ptrace.h > > +++

Re: [GIT PULL 0/3] perf/urgent fixes

2017-06-16 Thread Ingo Molnar
t; Merge tag 'xtensa-20170612' of git://github.com/jcmvbkbc/linux-xtensa > (2017-06-13 15:09:10 +0900) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git > tags/perf-urgent-for-mingo-4.12-20170616 > > for you

Re: [GIT PULL 0/3] perf/urgent fixes

2017-06-16 Thread Ingo Molnar
nsa-20170612' of git://github.com/jcmvbkbc/linux-xtensa > (2017-06-13 15:09:10 +0900) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git > tags/perf-urgent-for-mingo-4.12-20170616 > > for you to fetch changes up to 912

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Logan Gunthorpe
On 16/06/17 12:38 PM, Serge Semin wrote: > On Fri, Jun 16, 2017 at 11:08:52AM -0600, Logan Gunthorpe > wrote: > It's the way the NTB API was created for, to have set of functions to access > NTB devices in the similar way. These aren't my beliefs, it's the way it was >

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Logan Gunthorpe
On 16/06/17 12:38 PM, Serge Semin wrote: > On Fri, Jun 16, 2017 at 11:08:52AM -0600, Logan Gunthorpe > wrote: > It's the way the NTB API was created for, to have set of functions to access > NTB devices in the similar way. These aren't my beliefs, it's the way it was > created. I agree it can

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Greg Kroah-Hartman
On Fri, Jun 16, 2017 at 06:46:51PM +0200, Luis R. Rodriguez wrote: > Kees, please review 47e0bbb7fa98 below. > Brian, please review be4a1326d12c below. > > On Thu, Jun 15, 2017 at 11:26:53PM +0530, Sumit Semwal wrote: > > Hello Greg, Shuah, > > > > While testing 4.4.y and 4.9.y LTS kernels with

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Greg Kroah-Hartman
On Fri, Jun 16, 2017 at 06:46:51PM +0200, Luis R. Rodriguez wrote: > Kees, please review 47e0bbb7fa98 below. > Brian, please review be4a1326d12c below. > > On Thu, Jun 15, 2017 at 11:26:53PM +0530, Sumit Semwal wrote: > > Hello Greg, Shuah, > > > > While testing 4.4.y and 4.9.y LTS kernels with

[PATCH 1/6] rtc: s3c: Jump to central exit point on getting src clock error

2017-06-16 Thread Krzysztof Kozlowski
In other error paths in probe, centralized exit point was used so make this consistent. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index

[PATCH 5/6] rtc: s3c: Handle clock prepare failures in probe

2017-06-16 Thread Krzysztof Kozlowski
clk_prepare_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index c666b95fb8d7..0cb2f27a30b4 100644 ---

[PATCH 1/6] rtc: s3c: Jump to central exit point on getting src clock error

2017-06-16 Thread Krzysztof Kozlowski
In other error paths in probe, centralized exit point was used so make this consistent. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index

[PATCH 5/6] rtc: s3c: Handle clock prepare failures in probe

2017-06-16 Thread Krzysztof Kozlowski
clk_prepare_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index c666b95fb8d7..0cb2f27a30b4 100644 ---

[PATCH 2/6] rtc: s3c: Minor white-space cleanups

2017-06-16 Thread Krzysztof Kozlowski
Minor cleanups to make the code easier to read. No functional changes. 1. Remove one space before labels as this is nowadays mostly preferred. 2. Fix indentation of arguments in function calls. 3. Split structure member declaration. Signed-off-by: Krzysztof Kozlowski ---

[PATCH 2/6] rtc: s3c: Minor white-space cleanups

2017-06-16 Thread Krzysztof Kozlowski
Minor cleanups to make the code easier to read. No functional changes. 1. Remove one space before labels as this is nowadays mostly preferred. 2. Fix indentation of arguments in function calls. 3. Split structure member declaration. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c |

[PATCH 6/6] rtc: s3c: Handle clock enable failures

2017-06-16 Thread Krzysztof Kozlowski
clk_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 72 --- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index

[PATCH 6/6] rtc: s3c: Handle clock enable failures

2017-06-16 Thread Krzysztof Kozlowski
clk_enable() can fail so handle such case. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 72 --- 1 file changed, 57 insertions(+), 15 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index

[PATCH 3/6] rtc: s3c: Drop unneeded cast to void pointer

2017-06-16 Thread Krzysztof Kozlowski
There is no need for casting to void pointer for of_device_id data. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index

[PATCH 4/6] rtc: s3c: Do not remove const from rodata memory

2017-06-16 Thread Krzysztof Kozlowski
All instances of struct s3c_rtc_data are in fact static const thus put in rodata so we should not drop the const while getting the pointer to them. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 3/6] rtc: s3c: Drop unneeded cast to void pointer

2017-06-16 Thread Krzysztof Kozlowski
There is no need for casting to void pointer for of_device_id data. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 2b503dab7957..bfc8660ff1e7 100644

[PATCH 4/6] rtc: s3c: Do not remove const from rodata memory

2017-06-16 Thread Krzysztof Kozlowski
All instances of struct s3c_rtc_data are in fact static const thus put in rodata so we should not drop the const while getting the pointer to them. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s3c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Alexander Alemayhu
On Fri, Jun 16, 2017 at 01:08:04PM +0530, Sumit Semwal wrote: > > Thanks, this was quite helpful, and so now bpf tests build on x86_64 > with current mainline for me. Perhaps we should document these > somewhere, as dependencies? > There is already some documentation available[0], but something

Re: LTS testing with latest kselftests - some failures

2017-06-16 Thread Alexander Alemayhu
On Fri, Jun 16, 2017 at 01:08:04PM +0530, Sumit Semwal wrote: > > Thanks, this was quite helpful, and so now bpf tests build on x86_64 > with current mainline for me. Perhaps we should document these > somewhere, as dependencies? > There is already some documentation available[0], but something

[PATCH 1/3] perf evsel: Fix probing of precise_ip level for default cycles event

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Since commit 18e7a45af91a ("perf/x86: Reject non sampling events with precise_ip") returns -EINVAL for sys_perf_event_open() with an attribute with (attr.precise_ip > 0 && attr.sample_period == 0), just like is done in the routine used to probe the

[PATCH 3/3] perf unwind: Report module before querying isactivation in dwfl unwind

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Milian Wolff The PC returned by dwfl_frame_pc() may map into a not-yet-reported module. We have to report it before we continue unwinding. But when we query for the isactivation flag in dwfl_frame_pc, libdw will actually do one more unwinding step internally which

[PATCH 2/3] perf tools: Fix build with ARCH=x86_64

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Jiada Wang With commit: 0a943cb10ce78 (tools build: Add HOSTARCH Makefile variable) when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of ARCH=x86, so the perf build process searchs header files from tools/arch/x86_64/include, which doesn't exist.

[PATCH 1/3] perf evsel: Fix probing of precise_ip level for default cycles event

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Since commit 18e7a45af91a ("perf/x86: Reject non sampling events with precise_ip") returns -EINVAL for sys_perf_event_open() with an attribute with (attr.precise_ip > 0 && attr.sample_period == 0), just like is done in the routine used to probe the max precise

[PATCH 3/3] perf unwind: Report module before querying isactivation in dwfl unwind

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Milian Wolff The PC returned by dwfl_frame_pc() may map into a not-yet-reported module. We have to report it before we continue unwinding. But when we query for the isactivation flag in dwfl_frame_pc, libdw will actually do one more unwinding step internally which can then break and lead

[PATCH 2/3] perf tools: Fix build with ARCH=x86_64

2017-06-16 Thread Arnaldo Carvalho de Melo
From: Jiada Wang With commit: 0a943cb10ce78 (tools build: Add HOSTARCH Makefile variable) when building for ARCH=x86_64, ARCH=x86_64 is passed to perf instead of ARCH=x86, so the perf build process searchs header files from tools/arch/x86_64/include, which doesn't exist. The following build

[GIT PULL 0/3] perf/urgent fixes

2017-06-16 Thread Arnaldo Carvalho de Melo
) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.12-20170616 for you to fetch changes up to 9126cbbacecb8917bd0418809ef1d26616b2061e: perf unwind: Report module before querying isactivation in dwfl unwind (2017-06-16 14

[GIT PULL 0/3] perf/urgent fixes

2017-06-16 Thread Arnaldo Carvalho de Melo
) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-urgent-for-mingo-4.12-20170616 for you to fetch changes up to 9126cbbacecb8917bd0418809ef1d26616b2061e: perf unwind: Report module before querying isactivation in dwfl unwind (2017-06-16 14

Re: [PATCH net-next] net: dsa: add cross-chip multicast support

2017-06-16 Thread David Miller
From: Vivien Didelot Date: Thu, 15 Jun 2017 16:14:48 -0400 > Similarly to how cross-chip VLAN works, define a bitmap of multicast > group members for a switch, now including its DSA ports, so that > multicast traffic can be sent to all switches of the fabric.

Re: [PATCH net-next] net: dsa: add cross-chip multicast support

2017-06-16 Thread David Miller
From: Vivien Didelot Date: Thu, 15 Jun 2017 16:14:48 -0400 > Similarly to how cross-chip VLAN works, define a bitmap of multicast > group members for a switch, now including its DSA ports, so that > multicast traffic can be sent to all switches of the fabric. > > A switch may drop the frames if

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Logan Gunthorpe
On 16/06/17 12:08 PM, Allen Hubbe wrote: > Alright. I'll leave it to you to find and reconcile common functionalities > of the drivers. What about making spad emulation optional? Ok. I don't see the point of making spad emulation optional. Who would want to disable it and what would be the

Re: [RFC PATCH 00/13] Switchtec NTB Support

2017-06-16 Thread Logan Gunthorpe
On 16/06/17 12:08 PM, Allen Hubbe wrote: > Alright. I'll leave it to you to find and reconcile common functionalities > of the drivers. What about making spad emulation optional? Ok. I don't see the point of making spad emulation optional. Who would want to disable it and what would be the

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 08:33:01PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2017-06-16 at 14:50 +0530, Anshuman Khandual wrote: > > On 06/06/2017 06:35 AM, Ram Pai wrote: > > > The value of the AMR register at the time of the exception > > > is made available in gp_regs[PT_AMR] of the

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 08:33:01PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2017-06-16 at 14:50 +0530, Anshuman Khandual wrote: > > On 06/06/2017 06:35 AM, Ram Pai wrote: > > > The value of the AMR register at the time of the exception > > > is made available in gp_regs[PT_AMR] of the

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > Hi, > > > > I see the following build error in -next when building hexagon images. > > > > CC arch/hexagon/kernel/asm-offsets.s > > In file

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:50 AM, Andi Kleen wrote: >> > Yeah, I think it is easier and more portable, especially on hardware with a >> > PEBS-like mechanism but no branch buffer (like LBR). FYI, I did do a test >> > implementation yesterday to evaluate the difficulty. >> >

Re: hexagon: build error in -next due to 'mm: memcontrol: per-lruvec stats infrastructure'

2017-06-16 Thread Andrew Morton
On Fri, 16 Jun 2017 14:49:51 -0400 Johannes Weiner wrote: > On Wed, Jun 14, 2017 at 12:26:46AM -0700, Guenter Roeck wrote: > > Hi, > > > > I see the following build error in -next when building hexagon images. > > > > CC arch/hexagon/kernel/asm-offsets.s > > In file included from

Re: [PATCH 0/5] perf: add support for capturing skid IP

2017-06-16 Thread Stephane Eranian
On Fri, Jun 16, 2017 at 10:50 AM, Andi Kleen wrote: >> > Yeah, I think it is easier and more portable, especially on hardware with a >> > PEBS-like mechanism but no branch buffer (like LBR). FYI, I did do a test >> > implementation yesterday to evaluate the difficulty. >> > >> A more generalized

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 02:50:13PM +0530, Anshuman Khandual wrote: > On 06/06/2017 06:35 AM, Ram Pai wrote: > > The value of the AMR register at the time of the exception > > is made available in gp_regs[PT_AMR] of the siginfo. > > But its already available there in uctxt->uc_mcontext.regs->amr >

Re: [RFC PATCH 7/7 v1]powerpc: Deliver SEGV signal on protection key violation.

2017-06-16 Thread Ram Pai
On Fri, Jun 16, 2017 at 02:50:13PM +0530, Anshuman Khandual wrote: > On 06/06/2017 06:35 AM, Ram Pai wrote: > > The value of the AMR register at the time of the exception > > is made available in gp_regs[PT_AMR] of the siginfo. > > But its already available there in uctxt->uc_mcontext.regs->amr >

[PATCH v7 00/36] x86: Secure Memory Encryption (AMD)

2017-06-16 Thread Tom Lendacky
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 DRAM and will be automatically

[PATCH v7 00/36] x86: Secure Memory Encryption (AMD)

2017-06-16 Thread Tom Lendacky
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 DRAM and will be automatically

[PATCH v7 03/36] x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap for RAM mappings

2017-06-16 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

[PATCH v7 03/36] x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap for RAM mappings

2017-06-16 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

[PATCH v7 05/36] x86/CPU/AMD: Handle SME reduction in physical address size

2017-06-16 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

[PATCH v7 05/36] x86/CPU/AMD: Handle SME reduction in physical address size

2017-06-16 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

[PATCH v7 10/36] x86/mm: Provide general kernel support for memory encryption

2017-06-16 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

[PATCH v7 10/36] x86/mm: Provide general kernel support for memory encryption

2017-06-16 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

[PATCH v7 19/36] x86/mm: Add support to access boot related data in the clear

2017-06-16 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

[PATCH v7 19/36] x86/mm: Add support to access boot related data in the clear

2017-06-16 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

[PATCH v7 20/36] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-16 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

[PATCH v7 20/36] x86, mpparse: Use memremap to map the mpf and mpc data

2017-06-16 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

[PATCH v7 23/36] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-16 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. Signed-off-by: Tom Lendacky

[PATCH v7 23/36] x86, realmode: Decrypt trampoline area if memory encryption is active

2017-06-16 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. Signed-off-by: Tom Lendacky ---

[PATCH v7 30/36] kvm: x86: svm: Support Secure Memory Encryption within KVM

2017-06-16 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

[PATCH v7 30/36] kvm: x86: svm: Support Secure Memory Encryption within KVM

2017-06-16 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

[PATCH v7 36/36] x86/mm: Add support to make use of Secure Memory Encryption

2017-06-16 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."

[PATCH v7 36/36] x86/mm: Add support to make use of Secure Memory Encryption

2017-06-16 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."

[PATCH v7 34/36] x86/mm: Add support to encrypt the kernel in-place

2017-06-16 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 ---

[PATCH v7 34/36] x86/mm: Add support to encrypt the kernel in-place

2017-06-16 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 ---

[PATCH v7 35/36] x86/boot: Add early cmdline parsing for options with arguments

2017-06-16 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

[PATCH v7 35/36] x86/boot: Add early cmdline parsing for options with arguments

2017-06-16 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 ---

[PATCH v7 31/36] x86/mm, kexec: Allow kexec to be used with SME

2017-06-16 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

[PATCH v7 31/36] x86/mm, kexec: Allow kexec to be used with SME

2017-06-16 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

[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

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

2017-06-16 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 +-

[PATCH v7 32/36] xen/x86: Remove SME feature in PV guests

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

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

2017-06-16 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 ++

[PATCH v7 32/36] xen/x86: Remove SME feature in PV guests

2017-06-16 Thread Tom Lendacky
Xen does not currently support SME for PV guests. Clear the SME cpu capability in order to avoid any ambiguity. Signed-off-by: Tom Lendacky --- arch/x86/xen/enlighten_pv.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index

[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

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