Re: [PATCH 0/3] Fix crypto/vmx/p8_ghash memory corruption

2016-10-03 Thread Marcelo Cerri
Thank you. -- Regards, Marcelo On Sun, Oct 02, 2016 at 10:40:47PM +0800, Herbert Xu wrote: > On Thu, Sep 29, 2016 at 06:59:08AM +1000, Anton Blanchard wrote: > > Hi Marcelo > > > > > This series fixes the memory corruption found by Jan Stancek in > > > 4.8-rc7. The problem however also affects

Re: Crashes in refresh_zone_stat_thresholds when some nodes have no memory

2016-10-03 Thread Michal Hocko
[Sorry I have only now noticed this email] On Thu 04-08-16 16:44:10, Paul Mackerras wrote: > It appears that commit 75ef71840539 ("mm, vmstat: add infrastructure > for per-node vmstats", 2016-07-28) has introduced a regression on > machines that have nodes which have no memory, such as the POWER8

Re: Crashes in refresh_zone_stat_thresholds when some nodes have no memory

2016-10-03 Thread Michal Hocko
On Mon 03-10-16 14:47:16, Michal Hocko wrote: > [Sorry I have only now noticed this email] > > On Thu 04-08-16 16:44:10, Paul Mackerras wrote: [...] > > [1.717648] Call Trace: > > [1.717687] [c00ff0707b80] [c0270d08] > > refresh_zone_stat_thresholds+0xb8/0x240 (unreliable) > >

Re: [PATCH v3 1/5] drivers/of: introduce of_fdt_is_available()

2016-10-03 Thread Rob Herring
On Sun, Sep 25, 2016 at 1:36 PM, Reza Arbab wrote: > In __fdt_scan_reserved_mem(), the availability of a node is determined > by testing its "status" property. > > Move this check into its own function, borrowing logic from the > unflattened version, of_device_is_available(). > > Another caller wi

Re: powerpc: add kernel parameter iommu_alloc_quiet

2016-10-03 Thread Mauricio Faria de Oliveira
Hi Michael, On 09/21/2016 11:34 AM, Mauricio Faria de Oliveira wrote: So, the intent is to have a single/common hack that upstream is OK w/, then apply that downstream in the multiple distros. Of course, if you are not OK w/ this patch (which is obviously fair) we'll have to try it downstream o

[PATCH v6] powerpc: Do not make the entire heap executable

2016-10-03 Thread Denys Vlasenko
On 32-bit powerpc the ELF PLT sections of binaries (built with --bss-plt, or with a toolchain which defaults to it) look like this: [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0 0 4 [18] .plt NOBITS 0002b00c 01aff8 84 00 WAX 0 0 4 [1

Re: [v3,4/5] powerpc/pm: support deep sleep feature on T104x

2016-10-03 Thread Scott Wood
On Thu, 2016-09-29 at 10:21 +, C.H. Zhao wrote: > > From: Scott Wood > Sent: Thursday, September 29, 2016 4:03 AM > To: C.H. Zhao > Cc: linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; z.chenhui@g > mail.com; Jason Jin > Subject: Re: [v3,4/5] powerpc/pm: support deep sleep feature

[PATCH] cxl: Flush PSL cache before resetting the adapter

2016-10-03 Thread Frederic Barrat
If the capi link is going down while the PSL owns a dirty cache line, any access from the host for that data could lead to an Unrecoverable Error. So when resetting the capi adapter through sysfs, make sure the PSL cache is flushed. It won't help if there are any active Process Elements on the card

Re: [PATCH v21 06/19] perf, tools: Support alias descriptions

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 28, 2016 at 11:29:16AM -0700, Sukadev Bhattiprolu escreveu: > Arnaldo Carvalho de Melo [a...@kernel.org] wrote: > > Em Tue, Sep 27, 2016 at 11:11:16AM -0700, Sukadev Bhattiprolu escreveu: > > > Arnaldo Carvalho de Melo [a...@kernel.org] wrote: > > > > Em Thu, Sep 15, 2016 at 03:24:43PM

Re: [PATCH v6] powerpc: Do not make the entire heap executable

2016-10-03 Thread Kees Cook
On Mon, Oct 3, 2016 at 9:13 AM, Denys Vlasenko wrote: > On 32-bit powerpc the ELF PLT sections of binaries (built with --bss-plt, > or with a toolchain which defaults to it) look like this: > > [17] .sbss NOBITS 0002aff8 01aff8 14 00 WA 0 0 > 4 > [18] .plt

Re: [PATCH] powerpc: During context switch, check before setting mm_cpumask

2016-10-03 Thread Balbir Singh
On 03/10/16 17:40, Anton Blanchard wrote: > From: Anton Blanchard > > During context switch, switch_mm() sets our current CPU in mm_cpumask. > We can avoid this atomic sequence in most cases by checking before > setting the bit. > > Testing on a POWER8 using our context switch microbenchmark:

Re: [PATCH] powerpc: During context switch, check before setting mm_cpumask

2016-10-03 Thread Benjamin Herrenschmidt
On Tue, 2016-10-04 at 10:25 +1100, Balbir Singh wrote: > I think this makes sense, in fact I think in the longer term we can > even use __set_bit() reorder-able version since we have a sync > coming out of schedule(). The read side for TLB flush can use a RMB No, that wouldn't be atomic vs. other

Re: [PATCH v6] powerpc: Do not make the entire heap executable

2016-10-03 Thread Michael Ellerman
Kees Cook writes: > On Mon, Oct 3, 2016 at 9:13 AM, Denys Vlasenko wrote: >> On 32-bit powerpc the ELF PLT sections of binaries (built with --bss-plt, >> or with a toolchain which defaults to it) look like this: ... >> >> Signed-off-by: Jason Gunthorpe >> Signed-off-by: Denys Vlasenko >> Acked

Re: [PATCH] powerpc: During context switch, check before setting mm_cpumask

2016-10-03 Thread Balbir Singh
On 04/10/16 10:58, Benjamin Herrenschmidt wrote: > On Tue, 2016-10-04 at 10:25 +1100, Balbir Singh wrote: >> I think this makes sense, in fact I think in the longer term we can >> even use __set_bit() reorder-able version since we have a sync >> coming out of schedule(). The read side for TLB flu

Re: [PATCH v21 11/19] perf, tools: Add alias support for long descriptions

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 15, 2016 at 03:24:48PM -0700, Sukadev Bhattiprolu escreveu: > Previously we were dropping the useful longer descriptions that some > events have in the event list completely. Now that jevents provides > support for longer descriptions (see previous patch), add support for > parsing the

Re: [PATCH v21 12/19] perf, tools: Support long descriptions with perf list

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 15, 2016 at 03:24:49PM -0700, Sukadev Bhattiprolu escreveu: > Previously we were dropping the useful longer descriptions that some > events have in the event list completely. This patch makes them appear with > perf list. Squashed this with 11/19 so that we don't break bisect. > Old

Re: [PATCH v21 14/19] perf, tools, jevents: Handle header line in mapfile

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 15, 2016 at 03:24:51PM -0700, Sukadev Bhattiprolu escreveu: > From: Andi Kleen > > To work with existing mapfiles, assume that the first line in > 'mapfile.csv' is a header line and skip over it. Moved this more to the front of this patchkit so that when testing it, reproducing the t

Re: [PATCH v21 15/19] perf, tools: Add README for info on parsing JSON/map files

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 15, 2016 at 03:24:52PM -0700, Sukadev Bhattiprolu escreveu: > Signed-off-by: Sukadev Bhattiprolu > Acked-by: Jiri Olsa > Acked-by: Ingo Molnar > --- > Changelog[v21] > - Update README to reflect the Topics.json directory tree layout. Fixed this: [acme@jouet linux]$ am /wb/1.p

Re: [PATCH v21 16/19] perf, tools: Make alias matching case-insensitive

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 15, 2016 at 03:24:53PM -0700, Sukadev Bhattiprolu escreveu: > From: Andi Kleen > > Make alias matching the events parser case-insensitive. This is useful > with the JSON events. perf uses lower case events, but the CPU manuals > generally use upper case event names. The JSON files use

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-10-03 Thread Balbir Singh
On 27/09/16 10:14, Reza Arbab wrote: > On Tue, Sep 27, 2016 at 07:12:31AM +1000, Benjamin Herrenschmidt wrote: >> In any case, if the memory hasn't been hotplug, this shouldn't be necessary >> as we shouldn't be considering it for allocation. > > Right. To be clear, the background info I put in

Re: [PATCH v21 16/19] perf, tools: Make alias matching case-insensitive

2016-10-03 Thread Arnaldo Carvalho de Melo
Em Mon, Oct 03, 2016 at 09:47:06PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Sep 15, 2016 at 03:24:53PM -0700, Sukadev Bhattiprolu escreveu: > > From: Andi Kleen > > > > Make alias matching the events parser case-insensitive. This is useful > > with the JSON events. perf uses lower case

[PATCH 03/22] tools build: Add support for host programs format

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa In some cases, like for fixdep and shortly for jevents, we need to build a tool to run on the host that will be used in building a tool, such as perf, that is being cross compiled, so do like the kernel and provide HOSTCC, HOSTLD and HOSTAR to do that. Signed-off-by: Jiri Olsa

[PATCH 05/22] perf tools: Add jsmn `jasmine' JSON parser

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen I need a JSON parser. This adds the simplest JSON parser I could find -- Serge Zaitsev's jsmn `jasmine' -- to the perf library. I merely converted it to (mostly) Linux style and added support for non 0 terminated input. The parser is quite straight forward and does not copy any

[PATCH 06/22] perf jevents: Program to convert JSON file

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen This is a modified version of an earlier patch by Andi Kleen. We expect architectures to create JSON files describing the performance monitoring (PMU) events that each CPU model/family of the architecture supports. Following is an example of the JSON file entry for an x86 event

[PATCH 08/22] perf powerpc: Support CPU ID matching for Powerpc

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhava

[PATCH 09/22] perf tools: Support CPU id matching for x86 v2

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Implement the code to match CPU types to mapfile types for x86 based on CPUID. This extends an existing similar function, but changes it to use the x86 mapfile cpu description. This allows to resolve event lists generated by jevents. Signed-off-by: Andi Kleen Signed-off-by: Su

[PATCH 10/22] perf jevents: Handle header line in mapfile

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen To work with existing mapfiles, assume that the first line in 'mapfile.csv' is a header line and skip over it. Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1473978296-

[PATCH 07/22] perf pmu: Use pmu_events table to create aliases

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu At run time (when 'perf' is starting up), locate the specific table of PMU events that corresponds to the current CPU. Using that table, create aliases for the each of the PMU events in the CPU. The use these aliases to parse the user specified perf event. In short this

[PATCH 12/22] perf tools: Query terminal width and use in perf list

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Automatically adapt the now wider and word wrapped perf list output to wider terminals. This requires querying the terminal before the auto pager takes over, and exporting this information from the pager subsystem. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu A

[PATCH 14/22] perf pmu: Add override support for event list CPUID

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add a PERF_CPUID variable to override the CPUID of the current CPU (within the current architecture). This is useful for testing, so that all event lists can be tested on a single system. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked

[PATCH 13/22] perf list: Add a --no-desc flag

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add a --no-desc flag to 'perf list' to not print the event descriptions that were earlier added for JSON events. This may be useful to get a less crowded listing. It's still default to print descriptions as that is the more useful default for most users. Signed-off-by: Andi Kle

[PATCH 11/22] perf pmu: Support alias descriptions

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add support to print alias descriptions in perf list, which are taken from the generated event files. The sorting code is changed to put the events with descriptions at the end. The descriptions are printed as possibly multiple word wrapped lines. Example output: % perf list .

[PATCH 17/22] perf list jevents: Add support for event list topics

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add support to group the output of perf list by the Topic field in the JSON file. Example output: % perf list ... Cache: l1d.replacement [L1D data line replacements] l1d_pend_miss.pending [L1D miss oustandings duration in cycles] l1d_pend_miss.pending_cycles

[PATCH 15/22] perf jevents: Add support for long descriptions

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu Implement support in jevents to parse long descriptions for events that may have them in the JSON files. A follow on patch will make this long description available to user through the 'perf list' command. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu A

[PATCH 18/22] perf tools: Add README for info on parsing JSON/map files

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Acked-by: Jiri Olsa Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-16-git-send-email-suka...@linux.vnet.ibm.com Signed-off-by: Arn

[PATCH 19/22] perf tools: Allow period= in perf stat CPU event descriptions.

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu This avoids the JSON PMU events parser having to know whether its aliases are for perf stat or perf record. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Ingo Molnar Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.o

[PATCH 16/22] perf list: Support long jevents descriptions

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Sukadev Bhattiprolu Previously we were dropping the useful longer descriptions that some events have in the event list completely. This patch makes them appear with perf list. Old perf list: baclears: baclears.all [Counts the number of baclears] vs new: perf list -v: ... baclea

[PATCH 20/22] perf tools: Make alias matching case-insensitive

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Make alias matching the events parser case-insensitive. This is useful with the JSON events. perf uses lower case events, but the CPU manuals generally use upper case event names. The JSON files use lower case by default too. But if we search case insensitively then users can cut

[PATCH 21/22] perf pmu-events: Fix fixed counters on Intel

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen The JSON event lists use a different encoding for fixed counters than perf for instructions and cycles (ref-cycles is ok) This lead to some common events like inst_retired.any or cpu_clk_unhalted.thread not counting, when specified with their JSON name. Special case these event

[PATCH 22/22] perf pmu-events: Add Skylake frontend MSR support

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Andi Kleen Add support for the "frontend" extra MSR on Skylake in the JSON conversion. Signed-off-by: Andi Kleen Acked-by: Ingo Molnar Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/1473978296-20712-19-git-send-email-suka...

[PATCH 04/22] tools build: Make fixdep a hostprog

2016-10-03 Thread Arnaldo Carvalho de Melo
From: Jiri Olsa It is used in the build process, so stop suppressing its build in tools cross builds. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http:

[GIT PULL 00/22] perf/core improvements and fixes

2016-10-03 Thread Arnaldo Carvalho de Melo
into perf/core (2016-09-29 19:09:58 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20161003 for you to fetch changes up to b42c7369e3f451e22c2b0be5d193955498d37546: perf pmu-events: Add Skylake frontend M

Re: [PATCH] powerpc: Remove static branch prediction in atomic{, 64}_add_unless

2016-10-03 Thread Nicholas Piggin
On Mon, 3 Oct 2016 17:03:03 +1100 Anton Blanchard wrote: > From: Anton Blanchard > > I see quite a lot of static branch mispredictions on a simple > web serving workload. The issue is in __atomic_add_unless(), called > from _atomic_dec_and_lock(). There is no obvious common case, so it > is be

Re: [PATCH] cxl: Flush PSL cache before resetting the adapter

2016-10-03 Thread Andrew Donnellan
On 04/10/16 06:36, Frederic Barrat wrote: If the capi link is going down while the PSL owns a dirty cache line, any access from the host for that data could lead to an Unrecoverable IIRC, s/Unrecoverable/Uncorrectable/ Error. So when resetting the capi adapter through sysfs, make sure the PSL

Re: [PATCH] cxl: Flush PSL cache before resetting the adapter

2016-10-03 Thread Ian Munsie
Acked-by: Ian Munsie

Re: [PATCH] cxl: Flush PSL cache before resetting the adapter

2016-10-03 Thread Vaibhav Jain
Hi Fred, Frederic Barrat writes: > > + /* the adapter is about to be reset, so ignore errors */ > + cxl_data_cache_flush(adapter); > + Will be a good idea if we return error and not let the reset to proceed, if cxl_data_cache_flush returns EBUSY as continuing again may cause the UE error

Re: [PATCH] crypto: sha1-powerpc: little-endian support

2016-10-03 Thread Michael Ellerman
Marcelo Cerri writes: > [ Unknown signature status ] > On Wed, Sep 28, 2016 at 09:20:15PM +0800, Herbert Xu wrote: >> On Wed, Sep 28, 2016 at 10:15:51AM -0300, Marcelo Cerri wrote: >> > Hi Herbert, >> > >> > Any thoughts on this one? >> >> Can this patch wait until the next merge window? On the

Re: UBSAN: Undefined behaviour in /home/mathieu/tmp/linux-4.6.4/drivers/scsi/scsi_devinfo.c:458:21

2016-10-03 Thread Michael Ellerman
Mathieu Malaterre writes: > On Sat, Oct 1, 2016 at 3:43 PM, Mathieu Malaterre wrote: > [...] >> [1.443124] UBSAN: Undefined behaviour in >> /home/mathieu/tmp/linux-4.6.4/drivers/scsi/scsi_devinfo.c:458:21 > [...] > > Fixed by: https://lkml.org/lkml/2016/8/8/665 Thanks. > Sorry for the nois