Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-10 Thread Benjamin Herrenschmidt
On Mon, 2019-06-10 at 13:44 -0500, Larry Finger wrote: > On 6/7/19 11:21 PM, Benjamin Herrenschmidt wrote: > > > > > Please try the attached patch. I'm not really pleased with it and I will > > > continue to determine why the fallback to a 30-bit mask fails, but at > > > least this > > > one

Re: [PATCH v2 3/6] powerpc/eeh: Improve debug messages around device addition

2019-06-10 Thread Alexey Kardashevskiy
On 07/05/2019 14:30, Sam Bobroff wrote: > Also remove useless comment. > > Signed-off-by: Sam Bobroff > Reviewed-by: Alexey Kardashevskiy > --- > arch/powerpc/kernel/eeh.c| 2 +- > arch/powerpc/platforms/powernv/eeh-powernv.c | 14 >

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Christophe Leroy
Le 10/06/2019 à 06:38, Nicholas Piggin a écrit : For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to allocate huge pages and map them Will this be compatible with Russell's series https://patchwork.ozlabs.org/patch/1099857/ for the implementation of STRICT_MODULE_RWX

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-10 Thread Christophe Leroy
Le 10/06/2019 à 06:38, Nicholas Piggin a écrit : ioremap_page_range is a generic function to create a kernel virtual mapping, move it to mm/vmalloc.c and rename it vmap_range. For clarity with this move, also: - Rename vunmap_page_range (vmap_range's inverse) to vunmap_range. - Rename

Re: [PATCH v3 3/3] powerpc: Add support to initialize ima policy rules

2019-06-10 Thread Satheesh Rajendran
On Mon, Jun 10, 2019 at 04:33:57PM -0400, Nayna Jain wrote: > PowerNV secure boot relies on the kernel IMA security subsystem to > perform the OS kernel image signature verification. Since each secure > boot mode has different IMA policy requirements, dynamic definition of > the policy rules based

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-10 Thread Anshuman Khandual
On 06/11/2019 10:16 AM, Christophe Leroy wrote: > > > Le 10/06/2019 à 04:39, Anshuman Khandual a écrit : >> >> >> On 06/07/2019 09:01 PM, Christophe Leroy wrote: >>> >>> >>> Le 07/06/2019 à 12:34, Anshuman Khandual a écrit : Very similar definitions for notify_page_fault() are being used

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-10 Thread Anshuman Khandual
On 06/10/2019 08:57 PM, Leonardo Bras wrote: > On Mon, 2019-06-10 at 08:09 +0530, Anshuman Khandual wrote: +/* + * To be potentially processing a kprobe fault and to be allowed + * to call kprobe_running(), we have to be non-preemptible. + */ +if

[PATCH kernel v2] powerpc/powernv/ioda: Fix race in TCE level allocation

2019-06-10 Thread Alexey Kardashevskiy
pnv_tce() returns a pointer to a TCE entry and originally a TCE table would be pre-allocated. For the default case of 2GB window the table needs only a single level and that is fine. However if more levels are requested, it is possible to get a race when 2 threads want a pointer to a TCE entry

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-10 Thread Christophe Leroy
Le 10/06/2019 à 04:39, Anshuman Khandual a écrit : On 06/07/2019 09:01 PM, Christophe Leroy wrote: Le 07/06/2019 à 12:34, Anshuman Khandual a écrit : Very similar definitions for notify_page_fault() are being used by multiple architectures duplicating much of the same code. This

Re: [PATCH kernel] powerpc/powernv/ioda: Fix race in TCE level allocation

2019-06-10 Thread Alexey Kardashevskiy
Please ignore this (causes lockdep warnings), v2 is coming. On 11/06/2019 12:31, Alexey Kardashevskiy wrote: > pnv_tce() returns a pointer to a TCE entry and originally a TCE table > would be pre-allocated. For the default case of 2GB window the table > needs only a single level and that is

[PATCH RESEND] Powerpc/Watchpoint: Restore nvgprs while returning from exception

2019-06-10 Thread Ravi Bangoria
Powerpc hw triggers watchpoint before executing the instruction. To make trigger-after-execute behavior, kernel emulates the instruction. If the instruction is 'load something into non-volatile register', exception handler should restore emulated register state while returning back, otherwise

[PATCH kernel] powerpc/powernv/ioda: Fix race in TCE level allocation

2019-06-10 Thread Alexey Kardashevskiy
pnv_tce() returns a pointer to a TCE entry and originally a TCE table would be pre-allocated. For the default case of 2GB window the table needs only a single level and that is fine. However if more levels are requested, it is possible to get a race when 2 threads want a pointer to a TCE entry

Re: [PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-10 Thread Ravi Bangoria
On 6/10/19 8:46 PM, Arnaldo Carvalho de Melo wrote: > Em Mon, Jun 10, 2019 at 12:15:17PM +0530, Anju T Sudhakar escreveu: >> 'perf kvm record' uses 'cycles'(if the user did not specify any event) as >> the default event to profile the guest. >> This will not provide any proper samples from the

[PATCH] crypto: vmx - Document CTR mode counter width quirks

2019-06-10 Thread Daniel Axtens
The CTR code comes from OpenSSL, where it does a 32-bit counter. The kernel has a 128-bit counter. This difference has lead to issues. Document it. Signed-off-by: Daniel Axtens --- drivers/crypto/vmx/aesp8-ppc.pl | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-)

Re: [PATCH v2] powerpc: Add force enable of DAWR on P9 option

2019-06-10 Thread Cédric Le Goater
Hello Michael, > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S > @@ -822,18 +822,21 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_207S) > mtspr SPRN_IAMR, r5 > mtspr SPRN_PSPB, r6 > mtspr SPRN_FSCR, r7 > - ld r5,

Re: [RFC PATCH] powerpc/book3e: KASAN Full support for 64bit

2019-06-10 Thread Daniel Axtens
Christophe Leroy writes: > On 06/03/2019 11:50 PM, Daniel Axtens wrote: >> Christophe Leroy writes: >> >>> Hi, >>> >>> Ok, can you share your .config ? >> >> Sure! This one is with kasan off as the last build I did was testing to >> see if the code reorgisation was the cause of the issues.

Re: crash after NX error

2019-06-10 Thread Haren Myneni
On 06/05/2019 04:06 AM, Michael Ellerman wrote: > Stewart Smith writes: >> On my two socket POWER9 system (powernv) with 842 zwap set up, I >> recently got a crash with the Ubuntu kernel (I haven't tried with >> upstream, and this is the first time the system has died like this, so >> I'm not

[Bug 203839] Kernel 5.2-rc3 fails to boot on a PowerMac G4 3,6: systemd[1]: Failed to bump fs.file-max, ignoring: invalid argument

2019-06-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203839 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #283139|0 |1 is obsolete|

[Bug 203839] Kernel 5.2-rc3 fails to boot on a PowerMac G4 3,6: systemd[1]: Failed to bump fs.file-max, ignoring: invalid argument

2019-06-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203839 --- Comment #6 from Erhard F. (erhar...@mailbox.org) --- Created attachment 283183 --> https://bugzilla.kernel.org/attachment.cgi?id=283183=edit bisect.log bisect took me a while due to quite some skips. Cherry-picking

Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage

2019-06-10 Thread Naoya Horiguchi
On Wed, May 29, 2019 at 04:31:01PM -0700, Mike Kravetz wrote: > On 5/28/19 2:49 AM, Wanpeng Li wrote: > > Cc Paolo, > > Hi all, > > On Wed, 14 Feb 2018 at 06:34, Mike Kravetz wrote: > >> > >> On 02/12/2018 06:48 PM, Michael Ellerman wrote: > >>> Andrew Morton writes: > >>> > On Thu, 08 Feb

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Nicholas Piggin
Anshuman Khandual's on June 10, 2019 6:53 pm: > On 06/10/2019 10:08 AM, Nicholas Piggin wrote: >> For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to >> allocate huge pages and map them. > > IIUC that extends HAVE_ARCH_HUGE_VMAP from iormap to vmalloc. > >> >> This brings

[PATCH 1/1] PPC32: fix ptrace() access to FPU registers

2019-06-10 Thread Radu Rendec
This patch addresses several issues with ptrace() access to FPU registers through PTRACE_PEEKUSR/PTRACE_POKEUSR. Standard CPU registers are of course the size of the machine word on both PPC32/PPC64, but FPU registers are always 64-bit. Because the ptrace() can only transfer one `long` at a time

[PATCH 0/1] PPC32: fix ptrace() access to FPU registers

2019-06-10 Thread Radu Rendec
Hi Everyone, I'm following up on the ptrace() problem that I reported a few days ago. I believe my version of the code handles all cases correctly. While the problem essentially boils down to dividing the fpidx by 2 on PPC32, it becomes tricky when the same code must work correctly on both PPC32

Re: [PATCH v3 14/33] docs: kbuild: convert docs to ReST and rename to *.rst

2019-06-10 Thread Federico Vaga
In data Sunday, June 9, 2019 4:27:04 AM CEST, Mauro Carvalho Chehab ha scritto: > The kbuild documentation clearly shows that the documents > there are written at different times: some use markdown, > some use their own peculiar logic to split sections. > > Convert everything to ReST without

[PATCH v3 2/3] powerpc/powernv: detect the secure boot mode of the system

2019-06-10 Thread Nayna Jain
PowerNV secure boot defines different IMA policies based on the secure boot state of the system. This patch defines a function to detect the secure boot state of the system. Signed-off-by: Nayna Jain --- arch/powerpc/include/asm/secboot.h | 21

[PATCH v3 3/3] powerpc: Add support to initialize ima policy rules

2019-06-10 Thread Nayna Jain
PowerNV secure boot relies on the kernel IMA security subsystem to perform the OS kernel image signature verification. Since each secure boot mode has different IMA policy requirements, dynamic definition of the policy rules based on the runtime secure boot mode of the system is required. On

[PATCH v3 0/3] powerpc: Enabling IMA arch specific secure boot policies

2019-06-10 Thread Nayna Jain
This patch set, previously named "powerpc: Enabling secure boot on powernv systems - Part 1", is part of a series that implements secure boot on PowerNV systems. In order to verify the OS kernel on PowerNV, secure boot requires X.509 certificates trusted by the platform, the secure boot modes,

[PATCH v3 1/3] powerpc/powernv: Add OPAL API interface to get secureboot state

2019-06-10 Thread Nayna Jain
From: Claudio Carvalho The X.509 certificates trusted by the platform and other information required to secure boot the OS kernel are wrapped in secure variables, which are controlled by OPAL. This patch adds support to read OPAL secure variables through OPAL_SECVAR_GET call. It returns the

Re: Latest Git kernel: Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup()

2019-06-10 Thread Christophe Leroy
Michael ? Christian Zigotzky a écrit : Hello Christophe, Could you please add this patch to the GIT kernel because the issue still exists. Thanks, Christian On 15. May 2019, at 12:15, Christophe Leroy wrote: Hi, Le 15/05/2019 à 12:09, Christian Zigotzky a écrit : Hi All, I got the

Re: [PATCH] mm/nvdimm: Fix endian conversion issues 

2019-06-10 Thread Verma, Vishal L
On Fri, 2019-06-07 at 12:17 +0530, Aneesh Kumar K.V wrote: > nd_label->dpa issue was observed when trying to enable the namespace created > with little-endian kernel on a big-endian kernel. That made me run > `sparse` on the rest of the code and other changes are the result of that. > >

Re: [PATCH v3 02/11] s390x/mm: Fail when an altmap is used for arch_add_memory()

2019-06-10 Thread Oscar Salvador
On Mon, May 27, 2019 at 01:11:43PM +0200, David Hildenbrand wrote: > ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we > don't forget arch_add_memory()/arch_remove_memory() when unlocking > support. > > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Andrew Morton > Cc:

Re: [PATCH v3 11/11] mm/memory_hotplug: Remove "zone" parameter from sparse_remove_one_section

2019-06-10 Thread Oscar Salvador
On Mon, May 27, 2019 at 01:11:52PM +0200, David Hildenbrand wrote: > The parameter is unused, so let's drop it. Memory removal paths should > never care about zones. This is the job of memory offlining and will > require more refactorings. > > Reviewed-by: Dan Williams > Signed-off-by: David

Re: [PATCH v3 10/11] mm/memory_hotplug: Make unregister_memory_block_under_nodes() never fail

2019-06-10 Thread Oscar Salvador
On Mon, May 27, 2019 at 01:11:51PM +0200, David Hildenbrand wrote: > We really don't want anything during memory hotunplug to fail. > We always pass a valid memory block device, that check can go. Avoid > allocating memory and eventually failing. As we are always called under > lock, we can use a

Re: [PATCH v3 01/11] mm/memory_hotplug: Simplify and fix check_hotplug_memory_range()

2019-06-10 Thread Oscar Salvador
On Mon, May 27, 2019 at 01:11:42PM +0200, David Hildenbrand wrote: > By converting start and size to page granularity, we actually ignore > unaligned parts within a page instead of properly bailing out with an > error. > > Cc: Andrew Morton > Cc: Oscar Salvador > Cc: Michal Hocko > Cc: David

Re: [PATCH v3 14/33] docs: kbuild: convert docs to ReST and rename to *.rst

2019-06-10 Thread Federico Vaga
In data Sunday, June 9, 2019 4:27:04 AM CEST, Mauro Carvalho Chehab ha scritto: > The kbuild documentation clearly shows that the documents > there are written at different times: some use markdown, > some use their own peculiar logic to split sections. > > Convert everything to ReST without

Re: [PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-10 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 10, 2019 at 12:15:17PM +0530, Anju T Sudhakar escreveu: > 'perf kvm record' uses 'cycles'(if the user did not specify any event) as > the default event to profile the guest. > This will not provide any proper samples from the guest incase of > powerpc architecture, since in powerpc the

Re: [PATCH v2] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.

2019-06-10 Thread Leonardo Bras
On Mon, 2019-06-10 at 12:02 +0530, Anju T Sudhakar wrote: > Nest and core imc(In-memory Collection counters) assigns a particular > cpu as the designated target for counter data collection. > During system boot, the first online cpu in a chip gets assigned as > the designated cpu for that chip(for

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-10 Thread Larry Finger
On 6/7/19 11:21 PM, Benjamin Herrenschmidt wrote: Please try the attached patch. I'm not really pleased with it and I will continue to determine why the fallback to a 30-bit mask fails, but at least this one works for me. Your patch only makes sense if the device is indeed capable of

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-10 Thread Larry Finger
On 6/10/19 3:18 AM, Christoph Hellwig wrote: On Sat, Jun 08, 2019 at 04:52:24PM -0500, Larry Finger wrote: On 6/7/19 12:29 PM, Christoph Hellwig wrote: I don't think we should work around this in the driver, we need to fix it in the core. I'm curious why my previous patch didn't work. Can

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-10 Thread Leonardo Bras
On Mon, 2019-06-10 at 08:09 +0530, Anshuman Khandual wrote: > > > +/* > > > + * To be potentially processing a kprobe fault and to be allowed > > > + * to call kprobe_running(), we have to be non-preemptible. > > > + */ > > > +if (kprobes_built_in() && !preemptible() &&

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Nicholas Piggin
Mark Rutland's on June 11, 2019 12:10 am: > Hi, > > On Mon, Jun 10, 2019 at 02:38:38PM +1000, Nicholas Piggin wrote: >> For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to >> allocate huge pages and map them >> >> This brings dTLB misses for linux kernel tree `git diff`

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Mark Rutland
Hi, On Mon, Jun 10, 2019 at 02:38:38PM +1000, Nicholas Piggin wrote: > For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to > allocate huge pages and map them > > This brings dTLB misses for linux kernel tree `git diff` from 45,000 to > 8,000 on a Kaby Lake KVM guest with

Re: [PATCH v3 1/9] KVM: PPC: Ultravisor: Add PPC_UV config option

2019-06-10 Thread Claudio Carvalho
On 6/7/19 5:11 PM, Leonardo Bras wrote: > > On Thu, 2019-06-06 at 14:36 -0300, Claudio Carvalho wrote: >> From: Anshuman Khandual >> >> CONFIG_PPC_UV adds support for ultravisor. >> >> Signed-off-by: Anshuman Khandual >> Signed-off-by: Bharata B Rao >> Signed-off-by: Ram Pai >> [Update

Re: Latest Git kernel: Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup()

2019-06-10 Thread Christian Zigotzky
Hello Christophe, Could you please add this patch to the GIT kernel because the issue still exists. Thanks, Christian On 15. May 2019, at 12:15, Christophe Leroy wrote: Hi, Le 15/05/2019 à 12:09, Christian Zigotzky a écrit : Hi All, I got the following error messages with the latest Git

[RESEND PATCH] Documentation/stackprotector: powerpc supports stack protector

2019-06-10 Thread Bhupesh Sharma
powerpc architecture (both 64-bit and 32-bit) supports stack protector mechanism since some time now [see commit 06ec27aea9fc ("powerpc/64: add stack protector support")]. Update stackprotector arch support documentation to reflect the same. Cc: Jonathan Corbet Cc: Michael Ellerman Cc:

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Anshuman Khandual
On 06/10/2019 10:08 AM, Nicholas Piggin wrote: > For platforms that define HAVE_ARCH_HUGE_VMAP, have vmap allow vmalloc to > allocate huge pages and map them. IIUC that extends HAVE_ARCH_HUGE_VMAP from iormap to vmalloc. > > This brings dTLB misses for linux kernel tree `git diff` from 45,000

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-10 Thread Christoph Hellwig
On Sat, Jun 08, 2019 at 04:52:24PM -0500, Larry Finger wrote: > On 6/7/19 12:29 PM, Christoph Hellwig wrote: >> I don't think we should work around this in the driver, we need to fix >> it in the core. I'm curious why my previous patch didn't work. Can >> you throw in a few printks what failed?

Re: [PATCH 4/4] mm/vmalloc: Hugepage vmalloc mappings

2019-06-10 Thread Satheesh Rajendran
On Mon, Jun 10, 2019 at 03:49:48PM +1000, Nicholas Piggin wrote: > Nicholas Piggin's on June 10, 2019 2:38 pm: > > +static int vmap_hpages_range(unsigned long start, unsigned long end, > > + pgprot_t prot, struct page **pages, > > + unsigned int

[PATCH RESEND 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-06-10 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c

[PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-10 Thread Anju T Sudhakar
'perf kvm record' uses 'cycles'(if the user did not specify any event) as the default event to profile the guest. This will not provide any proper samples from the guest incase of powerpc architecture, since in powerpc the PMUs are controlled by the guest rather than the host. Patch adds a

[PATCH v2] powerpc/perf: Use cpumask_last() to determine the designated cpu for nest/core units.

2019-06-10 Thread Anju T Sudhakar
Nest and core imc(In-memory Collection counters) assigns a particular cpu as the designated target for counter data collection. During system boot, the first online cpu in a chip gets assigned as the designated cpu for that chip(for nest-imc) and the first online cpu in a core gets assigned as the

[Bug 203837] Booting kernel under KVM immediately freezes host

2019-06-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203837 --- Comment #3 from npig...@gmail.com --- bugzilla-dae...@bugzilla.kernel.org's on June 7, 2019 4:29 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=203837 > > --- Comment #2 from Paul Mackerras (pau...@ozlabs.org) --- > Just tried 5.1.7 in

Re: [Bug 203837] Booting kernel under KVM immediately freezes host

2019-06-10 Thread Nicholas Piggin
bugzilla-dae...@bugzilla.kernel.org's on June 7, 2019 4:29 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=203837 > > --- Comment #2 from Paul Mackerras (pau...@ozlabs.org) --- > Just tried 5.1.7 in the host and got the guest locking up during boot. In xmon > I see one cpu in pmdp_invalidate

Re: [PATCH 1/4] mm: Move ioremap page table mapping function to mm/

2019-06-10 Thread Nicholas Piggin
Anshuman Khandual's on June 10, 2019 3:42 pm: > > > On 06/10/2019 10:08 AM, Nicholas Piggin wrote: >> ioremap_page_range is a generic function to create a kernel virtual >> mapping, move it to mm/vmalloc.c and rename it vmap_range. > > Absolutely. It belongs in mm/vmalloc.c as its a kernel

Re: [PATCH 2/4] arm64: support huge vmap vmalloc

2019-06-10 Thread Nicholas Piggin
Anshuman Khandual's on June 10, 2019 3:47 pm: > > > On 06/10/2019 10:08 AM, Nicholas Piggin wrote: >> Applying huge vmap to vmalloc requires vmalloc_to_page to walk huge >> pages. Define pud_large and pmd_large to support this. >> >> Signed-off-by: Nicholas Piggin >> --- >>