Re: [PATCH] cxl: Prevent IRQ storm

2017-04-25 Thread Andrew Donnellan
On 26/04/17 16:40, Alastair D'Silva wrote: From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggere

[PATCH] cxl: Prevent IRQ storm

2017-04-25 Thread Alastair D'Silva
From: Alastair D'Silva In some situations, a faulty AFU slice may create an interrupt storm, rendering the machine unusable. Since these interrupts are informational only, present the interrupt once, then mask it off to prevent it from being retriggered until the card is reset. Signed-off-by: Al

Re: stable-rc build: 0 warnings 2 failures (stable-rc/v4.4.63-29-ge636782)

2017-04-25 Thread Michael Ellerman
Arnd Bergmann writes: > On Tue, Apr 25, 2017 at 7:08 PM, Olof's autobuilder wrote: >> >> Failed defconfigs: >> powerpc.pasemi_defconfig >> powerpc.ppc64_defconfig >> >> --- >> >> Errors: >> >> /work/build

Re: [PATCH] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations

2017-04-25 Thread Masami Hiramatsu
On Tue, 25 Apr 2017 21:37:11 +0530 "Naveen N. Rao" wrote: > Use safer string manipulation functions when dealing with a > user-provided string in kprobe_lookup_name(). > > Reported-by: David Laight > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/kernel/kprobes.c | 47 > ++

linux-next: manual merge of the tip tree with the powerpc tree

2017-04-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the tip tree got a conflict in: kernel/kprobes.c between commits: 49e0b4658fe6 ("kprobes: Convert kprobe_lookup_name() to a function") 290e3070762a ("powerpc/kprobes: Fix handling of function offsets on ABIv2") from the powerpc tree and commit: 1d58

[PATCH v3] KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller

2017-04-25 Thread Michael Ellerman
From: Benjamin Herrenschmidt This patch makes KVM capable of using the XIVE interrupt controller to provide the standard PAPR "XICS" style hypercalls. It is necessary for proper operations when the host uses XIVE natively. This has been lightly tested on an actual system, including PCI pass-thro

Re: [PATCH v3] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs

2017-04-25 Thread Paul Mackerras
On Tue, Apr 25, 2017 at 09:14:01AM +0200, Thomas Huth wrote: > On 05.04.2017 15:58, Thomas Huth wrote: > > According to the PowerISA 2.07, mtspr and mfspr should not always > > generate an illegal instruction exception when being used with an > > undefined SPR, but rather treat the instruction as a

Re: stable-rc build: 0 warnings 2 failures (stable-rc/v4.4.63-29-ge636782)

2017-04-25 Thread Arnd Bergmann
On Tue, Apr 25, 2017 at 7:08 PM, Olof's autobuilder wrote: > > Failed defconfigs: > powerpc.pasemi_defconfig > powerpc.ppc64_defconfig > > --- > > Errors: > > /work/build/batch/arch/powerpc/kernel/misc_64.S

Re: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors

2017-04-25 Thread Cédric Le Goater
On 04/22/2017 08:11 AM, Michael Ellerman wrote: > Shilpasri G Bhat writes: >> On 04/21/2017 05:17 PM, Cédric Le Goater wrote: >>> On 04/21/2017 06:31 AM, Shilpasri G Bhat wrote: diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index 6d2e660..1f329fa8 100644 --- a

RE: [PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-25 Thread Naveen N. Rao
Excerpts from David Laight's message of April 25, 2017 22:06: From: Naveen N. Rao Sent: 25 April 2017 17:18 1. Fail early for invalid/zero length symbols. 2. Detect names of the form and skip checking for kernel symbols in that case. Signed-off-by: Naveen N. Rao --- Masami, Michael, I have ad

RE: [PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-25 Thread David Laight
From: Naveen N. Rao > Sent: 25 April 2017 17:18 > 1. Fail early for invalid/zero length symbols. > 2. Detect names of the form and skip checking for kernel > symbols in that case. > > Signed-off-by: Naveen N. Rao > --- > Masami, Michael, > I have added two very simple checks here, which I felt i

[PATCH 4/4] powerpc/kprobes: blacklist functions involved when returning from exception

2017-04-25 Thread Naveen N. Rao
Blacklist all functions involved when we return from a trap. We: - convert some of the labels into private labels, - remove the duplicate 'restore' label, and - blacklist most functions involved during returning from a trap. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64.S | 46 ++

[PATCH 3/4] powerpc/kprobes: blacklist functions invoked on a trap

2017-04-25 Thread Naveen N. Rao
Blacklist all functions invoked when we get a trap, through to the time we invoke the kprobe handler. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64.S | 1 + arch/powerpc/kernel/exceptions-64s.S | 1 + arch/powerpc/kernel/time.c | 3 +++ arch/powerpc/kernel/traps.c

[PATCH 2/4] powerpc/kprobes: un-blacklist system_call() from kprobes

2017-04-25 Thread Naveen N. Rao
It is actually safe to probe system_call() in entry_64.S, but only till .Lsyscall_exit. To allow this, convert .Lsyscall_exit to a non-local symbol __system_call() and blacklist that symbol, rather than system_call(). Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64.S | 24 +

[PATCH 1/4] powerpc/kprobes: cleanup system_call_common and blacklist it from kprobes

2017-04-25 Thread Naveen N. Rao
Convert some of the labels into private labels and blacklist system_call_common() and system_call() from kprobes. We can't take a trap at parts of these functions as either MSR_RI is unset or the kernel stack pointer is not yet setup. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64

[PATCH 0/4] powerpc: build out kprobes blacklist

2017-04-25 Thread Naveen N. Rao
This is the second in the series of patches to build out an appropriate kprobes blacklist. This series blacklists system_call() and functions involved when handling the trap itself. Not everything is covered, but this is the first set of functions that I have tested with. More patches to follow onc

[PATCH] kallsyms: optimize kallsyms_lookup_name() for a few cases

2017-04-25 Thread Naveen N. Rao
1. Fail early for invalid/zero length symbols. 2. Detect names of the form and skip checking for kernel symbols in that case. Signed-off-by: Naveen N. Rao --- Masami, Michael, I have added two very simple checks here, which I felt is good to have, rather than the elaborate checks in the previous

Re: [PATCH] powerpc/mm: Fix possible out-of-bounds shift in arch_mmap_rnd()

2017-04-25 Thread Kees Cook
On Tue, Apr 25, 2017 at 5:09 AM, Michael Ellerman wrote: > The recent patch to add runtime configuration of the ASLR limits added a bug > in > arch_mmap_rnd() where we may shift an integer (32-bits) by up to 33 bits, > leading to undefined behaviour. > > In practice it exhibits as every process s

[PATCH] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations

2017-04-25 Thread Naveen N. Rao
Use safer string manipulation functions when dealing with a user-provided string in kprobe_lookup_name(). Reported-by: David Laight Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 47 ++- 1 file changed, 20 insertions(+), 27 deletions(-)

[PATCH v2] selftests: splice: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:8: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan --- Changes since v1: - simplified to use EXTRA_CL

[PATCH v2] selftests: sync: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:24: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan --- Changes since v1: - simplified to use EXTRA_C

[PATCH v2] selftests: x86: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
Add override with EXTRA_CLEAN for lib.mk clean to fix the following warnings from clean target run. Makefile:44: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean' Signed-off-by: Shuah Khan --- Changes since v1: - simplified to use EXTRA_C

Re: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
On 04/21/2017 11:41 PM, Michael Ellerman wrote: > Shuah Khan writes: > >> Add override for lib.mk clean to fix the following warnings from clean >> target run. >> >> Makefile:44: warning: overriding recipe for target 'clean' >> ../lib.mk:55: warning: ignoring old recipe for target 'clean' >> >> S

Re: [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
On 04/21/2017 11:41 PM, Michael Ellerman wrote: > Shuah Khan writes: > >> Add override for lib.mk clean to fix the following warnings from clean >> target run. >> >> Makefile:24: warning: overriding recipe for target 'clean' >> ../lib.mk:55: warning: ignoring old recipe for target 'clean' >> >> S

Re: [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
On 04/21/2017 11:40 PM, Michael Ellerman wrote: > Shuah Khan writes: > >> Add override for lib.mk clean to fix the following warnings from clean >> target run. >> >> Makefile:8: warning: overriding recipe for target 'clean' >> ../lib.mk:55: warning: ignoring old recipe for target 'clean' >> >> Si

Re: [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings

2017-04-25 Thread Shuah Khan
On 04/21/2017 11:40 PM, Michael Ellerman wrote: > Shuah Khan writes: > >> Add override for lib.mk clean to fix the following warnings from clean >> target run. >> >> Makefile:11: warning: overriding recipe for target 'clean' >> ../lib.mk:55: warning: ignoring old recipe for target 'clean' >> >> S

Re: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors

2017-04-25 Thread Cédric Le Goater
On 04/25/2017 04:28 PM, Cédric Le Goater wrote: > On 04/22/2017 08:11 AM, Michael Ellerman wrote: >> Shilpasri G Bhat writes: >>> On 04/21/2017 05:17 PM, Cédric Le Goater wrote: On 04/21/2017 06:31 AM, Shilpasri G Bhat wrote: > diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpo

Re: [PATCH] hwmon: (ibmpowernv) Add min/max attributes and current sensors

2017-04-25 Thread Cédric Le Goater
... > + sdata[count].id = sensor_id; > + sdata[count].type = type; > + sdata[count].hwmon_index = sdata[count - 1].hwmon_index; > + create_hwmon_attr(&sdata[count], attr_name, > +

[REBASED PATCH v4 1/2] powerpc: split ftrace bits into a separate file

2017-04-25 Thread Naveen N. Rao
entry_*.S now includes a lot more than just kernel entry/exit code. As a first step at cleaning this up, let's split out the ftrace bits into separate files. Also move all related tracing code into a new trace/ subdirectory. No functional changes. Suggested-by: Michael Ellerman Signed-off-by: Na

[REBASED PATCH v4 2/2] powerpc: ftrace_64: split further based on -mprofile-kernel

2017-04-25 Thread Naveen N. Rao
Split ftrace_64.S further retaining the core ftrace 64-bit aspects in ftrace_64.S and moving ftrace_caller() and ftrace_graph_caller() into separate files based on -mprofile-kernel. The livepatch routines are all now contained within the mprofile file. Signed-off-by: Naveen N. Rao --- arch/power

Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean

2017-04-25 Thread Shuah Khan
On 04/21/2017 11:38 PM, Michael Ellerman wrote: > Shuah Khan writes: > >> Define CLEAN macro to allow Makefiles to override common clean target >> in lib.mk. This will help fix the following failures: >> >> warning: overriding recipe for target 'clean' >> ../lib.mk:55: warning: ignoring old recip

Re: [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel

2017-04-25 Thread Michal Suchánek
On Tue, 25 Apr 2017 18:43:11 +0530 Hari Bathini wrote: > On Monday 24 April 2017 07:30 PM, Michal Suchánek wrote: > > On Mon, 24 Apr 2017 18:26:37 +0530 > > Hari Bathini wrote: > > > >> Hi Michal. > >> > >>> > >> I thinks there is a mixup here.. > >> I am no longer batting for handover a

Re: [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel

2017-04-25 Thread Hari Bathini
On Monday 24 April 2017 07:30 PM, Michal Suchánek wrote: On Mon, 24 Apr 2017 18:26:37 +0530 Hari Bathini wrote: Hi Michal. On Monday 24 April 2017 03:54 PM, Michal Suchánek wrote: On Fri, 21 Apr 2017 00:19:55 +0530 Hari Bathini wrote: On Wednesday 19 April 2017 07:38 PM, Michal Suchán

[PATCH] powerpc/mm: Fix possible out-of-bounds shift in arch_mmap_rnd()

2017-04-25 Thread Michael Ellerman
The recent patch to add runtime configuration of the ASLR limits added a bug in arch_mmap_rnd() where we may shift an integer (32-bits) by up to 33 bits, leading to undefined behaviour. In practice it exhibits as every process seg faulting instantly, presumably because the rnd value hasn't been re

Re: [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca

2017-04-25 Thread Michael Ellerman
Denis Kirjanov writes: > On 3/29/17, Denis Kirjanov wrote: >> with CONFIG_DEBUG_PREEMPT get_paca produces the following warning >> in kvmppc_book3s_init_hv since we are getting into the >> smp_processor_id debugging code >> >> There is no real issue with the xics_phys field. >> If paca->kvm_hsta

Re: [PATCH] kvm: powerpc: book3s: use local_paca instead of get_paca

2017-04-25 Thread Denis Kirjanov
On 3/29/17, Denis Kirjanov wrote: > with CONFIG_DEBUG_PREEMPT get_paca produces the following warning > in kvmppc_book3s_init_hv since we are getting into the > smp_processor_id debugging code > > There is no real issue with the xics_phys field. > If paca->kvm_hstate.xics_phys is non-zero on one c

Re: [PATCH v3] KVM: PPC: Book3S PR: Do not fail emulation with mtspr/mfspr for unknown SPRs

2017-04-25 Thread Thomas Huth
On 05.04.2017 15:58, Thomas Huth wrote: > According to the PowerISA 2.07, mtspr and mfspr should not always > generate an illegal instruction exception when being used with an > undefined SPR, but rather treat the instruction as a NOP or inject a > privilege exception in some cases, too - depending