[PATCH 5/5] symbol lookup: use new kernel and module dereference functions

2017-09-15 Thread Sergey Senozhatsky
Call appropriate function descriptor dereference ARCH callbacks: - dereference_kernel_function_descriptor() if the pointer is a kernel symbol; - dereference_module_function_descriptor() if the pointer is a module symbol. This patch also removes dereference_function_descriptor() from

[PATCH 4/5] parisc64: Add .opd based function descriptor dereference

2017-09-15 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for parisc64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

[PATCH 3/5] powerpc64: Add .opd based function descriptor dereference

2017-09-15 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for powerpc64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

[PATCH 2/5] ia64: Add .opd based function descriptor dereference

2017-09-15 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for IA64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

[PATCH 1/5] sections: split dereference_function_descriptor()

2017-09-15 Thread Sergey Senozhatsky
There are two format specifiers to print out a pointer in symbolic format: '%pS/%ps' and '%pF/%pf'. On most architectures, the two mean exactly the same thing, but some architectures (ia64, ppc64, parisc64) use an indirect pointer for C function pointers, where the function pointer points to a

[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-15 Thread Sergey Senozhatsky
Hello RFC On some arches C function pointers are indirect and point to a function descriptor, which contains the actual pointer to the code. This mostly doesn't matter, except for cases when people want to print out function pointers in symbolic format, because the usual

[PATCH 6/6] Documentation/vm: PowerPC specific updates to memory protection keys

2017-09-15 Thread Ram Pai
Add documentation updates that capture PowerPC specific changes. Signed-off-by: Thiago Jung Bauermann Signed-off-by: Ram Pai --- Documentation/vm/protection-keys.txt | 125 +++--- 1 files changed, 100 insertions(+),

[PATCH 5/6] Documentation/x86: Move protecton key documentation to arch neutral directory

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

[PATCH 4/6] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-09-15 Thread Ram Pai
From: Thiago Jung Bauermann Expose useful information for programs using memory protection keys. Provide implementation for powerpc and x86. On a powerpc system with pkeys support, here is what is shown: $ head /sys/kernel/mm/protection_keys/* ==>

[PATCH 3/6] mm: display pkey in smaps if arch_pkeys_enabled() is true

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

[PATCH 2/6] mm, x86 : introduce arch_pkeys_enabled()

2017-09-15 Thread Ram Pai
Arch neutral code needs to know if the architecture supports protection keys to display protection key in smaps. Hence introducing arch_pkeys_enabled(). This patch also provides x86 implementation for arch_pkeys_enabled(). Signed-off-by: Ram Pai ---

[PATCH 1/6] mm: introduce an additional vma bit for powerpc pkey

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

[PATCH 0/6] mm, x86, powerpc: Memory Protection Keys enhancement

2017-09-15 Thread Ram Pai
The patch-series enhances memory protection keys feature. The patch(1) introduces an additional vma bit to support 32 pkeys. PowerPC supports 32 pkeys. The patch(2,3) introduces a new interface arch_pkeys_enabled(), this interface can be used by arch-neutral code to display protection

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Mark Rutland
On Fri, Sep 15, 2017 at 05:20:59PM -0400, Pavel Tatashin wrote: > Hi Mark, > > I had this option  back upto version 3, where zero flag was passed into > vmemmap_alloc_block(), but I was asked to remove it, because it required too > many changes in other places. Ok. Sorry for bringing back a

Re: [v4 07/11] soc/fsl/qbman: Rework portal mapping calls for ARM/PPC

2017-09-15 Thread Catalin Marinas
On Thu, Sep 14, 2017 at 07:07:50PM +, Roy Pledge wrote: > On 9/14/2017 10:00 AM, Catalin Marinas wrote: > > On Thu, Aug 24, 2017 at 04:37:51PM -0400, Roy Pledge wrote: > >> @@ -123,23 +122,34 @@ static int bman_portal_probe(struct platform_device > >> *pdev) > >>} > >>pcfg->irq = irq;

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Pavel Tatashin
Hi Mark, I had this option  back upto version 3, where zero flag was passed into vmemmap_alloc_block(), but I was asked to remove it, because it required too many changes in other places. So, the current approach is cleaner, but the idea is that kasan should use its own version of

Re: [PATCH v8 10/11] arm64/kasan: explicitly zero kasan shadow memory

2017-09-15 Thread Mark Rutland
On Thu, Sep 14, 2017 at 09:30:28PM -0400, Pavel Tatashin wrote: > Hi Mark, > > Thank you for looking at this. We can't do this because page table is not > set until cpu_replace_ttbr1() is called. So, we can't do memset() on this > memory until then. I see. Sorry, I had missed that we were on the

Re: [PATCH 6/6] Documentation/admin-guide: single quotes in kernel arguments.

2017-09-15 Thread Randy Dunlap
On 09/15/17 10:02, Michal Suchanek wrote: > Signed-off-by: Michal Suchanek > --- > Documentation/admin-guide/kernel-parameters.rst | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.rst >

Re: [PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Michal Suchánek
On Fri, 15 Sep 2017 18:14:09 +0100 Al Viro wrote: > On Fri, Sep 15, 2017 at 07:02:46PM +0200, Michal Suchanek wrote: > > > for (i = 0; args[i]; i++) { > > - if (isspace(args[i]) && !in_quote) > > + if (isspace(args[i]) && !in_quote && !backslash)

Re: [PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Al Viro
On Fri, Sep 15, 2017 at 07:02:46PM +0200, Michal Suchanek wrote: > for (i = 0; args[i]; i++) { > - if (isspace(args[i]) && !in_quote) > + if (isspace(args[i]) && !in_quote && !backslash) > break; > - if (equals == 0) { > -

[PATCH 6/6] Documentation/admin-guide: single quotes in kernel arguments.

2017-09-15 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- Documentation/admin-guide/kernel-parameters.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst index

[PATCH 5/6] lib/cmdline.c: Implement single quotes in commandline argument parsing

2017-09-15 Thread Michal Suchanek
This brings the kernel parser about on par with bourne shell, grub, and other tools that chew the arguments before kernel does. This should make it easier to deal with multiple levels of nesting/quoting. With same quoting grammar on each level there is less room for confusion. Signed-off-by:

[PATCH 4/6] powerpc/fadump: Update fadump ducumentation on quoting arguments.

2017-09-15 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- Documentation/powerpc/firmware-assisted-dump.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt index

[PATCH 3/6] powerpc/fadump: stop removing quotes in argument parsing.

2017-09-15 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- arch/powerpc/kernel/fadump.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 1678d99ea835..275ea42a27d5 100644 --- a/arch/powerpc/kernel/fadump.c +++

[PATCH 1/6] lib/cmdline.c: Add backslash support to kernel commandline parsing.

2017-09-15 Thread Michal Suchanek
This allows passing quotes in kernel arguments. It is useful for passing fadump nested arguemnts in fadump_extra_args and might be useful if somebody wanted to pass a double quote directly as part of an argument. It is also useful to have quoting grammar more similar to shells and bootloaders.

[PATCH 2/6] Documentation/admin-guide: backslash support in commandline.

2017-09-15 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- Documentation/admin-guide/kernel-parameters.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.rst b/Documentation/admin-guide/kernel-parameters.rst index

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Brijesh Singh
On 09/15/2017 11:22 AM, Borislav Petkov wrote: mem_encrypt_init() where everything should be set up already. Yep, its safe to derefs the static key in mem_encrypt_init(). I've tried the approach and it seems to be work fine. I will include the required changes in next rev. thanks

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Borislav Petkov
On Fri, Sep 15, 2017 at 09:48:53AM -0500, Brijesh Singh wrote: > I see the similar issue with non SEV guest with my simple patch below. > Guest will reboot as soon as it tries to enable the key. Can't do it there as the pagetable is not setup yet and you're probably getting a #PF on any of the

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Brijesh Singh
On 09/15/2017 09:40 AM, Borislav Petkov wrote: I need to figure out the include hell first. I am working with slightly newer patch sets -- in that patch Tom has moved the sev_active() definition in arch/x86/mm/mem_encrypt.c and I have no issue using your recommended (since I no longer need

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Borislav Petkov
On Fri, Sep 15, 2017 at 09:13:00AM -0500, Brijesh Singh wrote: > thanks for the suggestion Boris, it will make patch much simpler. > I will try this out. It won't build - this was supposed to show the general idea. I need to figure out the include hell first. -- Regards/Gruss, Boris. SUSE

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Brijesh Singh
On 09/15/2017 07:24 AM, Borislav Petkov wrote: On Tue, Aug 22, 2017 at 06:52:48PM +0200, Borislav Petkov wrote: As always, the devil is in the detail. Ok, actually we can make this much simpler by using a static key. A conceptual patch below - I only need to fix that crazy include hell I'm

Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus

2017-09-15 Thread Rob Herring
On Fri, Sep 15, 2017 at 6:04 AM, abdul wrote: > Hi, > > Mainline kernel panics during DLPAR CPU add/remove operation. > > Machine Type: Power8 PowerVM LPAR > kernel 4.13.0 Did 4.12 work or when was it last working? I'm not seeing anything recent in the DT code that

Re: [PATCH v3 04/20] mm: VMA sequence count

2017-09-15 Thread Laurent Dufour
Hi, On 14/09/2017 11:40, Sergey Senozhatsky wrote: > On (09/14/17 11:15), Laurent Dufour wrote: >> On 14/09/2017 11:11, Sergey Senozhatsky wrote: >>> On (09/14/17 10:58), Laurent Dufour wrote: >>> [..] That's right, but here this is the sequence counter mm->mm_seq, not the vm_seq one.

Re: [RFC Part1 PATCH v3 13/17] x86/io: Unroll string I/O when SEV is active

2017-09-15 Thread Borislav Petkov
On Tue, Aug 22, 2017 at 06:52:48PM +0200, Borislav Petkov wrote: > As always, the devil is in the detail. Ok, actually we can make this much simpler by using a static key. A conceptual patch below - I only need to fix that crazy include hell I'm stepping into with this. In any case, we were

[mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus

2017-09-15 Thread abdul
Hi, Mainline kernel panics during DLPAR CPU add/remove operation. Machine Type: Power8 PowerVM LPAR kernel 4.13.0 gcc 6.3.1 config: attached trace messaged: - drmgr: -c cpu -d 5 -w 30 -r cpu 8 (hwid 8) Ready to die... cpu 9 (hwid 9) Ready to die... cpu 10 (hwid 10) Ready to die...

[PATCH] powerpc/kprobes: Update optprobes to use emulate_update_regs()

2017-09-15 Thread Naveen N. Rao
Optprobes depended on an updated regs->nip from analyse_instr() to identify the location to branch back from the optprobes trampoline. However, since commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs"), analyse_instr() doesn't update the registers anymore. Due to

Re: [PATCH 2/3] ARM: dts: at91: usb_a9g20: fix rtc node

2017-09-15 Thread Nicolas Ferre
On 15/09/2017 at 04:00, Alexandre Belloni wrote: > The rv3029 compatible is missing its vendor string, add it. > Also fix the node name to be a proper generic name. > > Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre

[GIT PULL] Please pull powerpc/linux.git powerpc-4.14-2 tag

2017-09-15 Thread Michael Ellerman
Hi Linus, Please pull one powerpc fix for 4.14: The following changes since commit bac65d9d87b383471d8d29128319508d71b74180: Merge tag 'powerpc-4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux (2017-09-07 10:15:40 -0700) are available in the git repository at:

Re: Possible bug in commit f3b3f28493d9

2017-09-15 Thread Gautham R Shenoy
Hi Paul, On Thu, Sep 14, 2017 at 02:57:07PM +1000, Paul Mackerras wrote: > Commit f3b3f28493d9 ("powerpc/powernv/idle: Don't override > default/deepest directly in kernel", 2017-03-22) made the following > change in pnv_cpu_offline() in arch/powerpc/platforms/powernv/idle.c: > > - if

Re: [PATCH 3/3] powerpc/5200: dts: digsy_mtc.dts: fix rv3029 compatible

2017-09-15 Thread Anatolij Gustschin
On Fri, 15 Sep 2017 04:00:04 +0200 Alexandre Belloni alexandre.bell...@free-electrons.com wrote: >The proper compatible for rv3029 is microcrystal,rv3029. > >Signed-off-by: Alexandre Belloni Acked-by: Anatolij Gustschin

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-09-15 Thread Greg Kurz
On Fri, 15 Sep 2017 07:52:49 +0200 Greg Kurz wrote: > Dang! The mail relay at OVH has blacklisted Paul's address :-\ > > : host smtp.samba.org[144.76.82.148] said: 550-blacklisted > at > zen.spamhaus.org 550 https://www.spamhaus.org/sbl/query/SBL370982 (in