Re: [patch V2 06/15] rcuwait: Add @state argument to rcuwait_wait_event()

2020-03-19 Thread Davidlohr Bueso
On Wed, 18 Mar 2020, Thomas Gleixner wrote: --- a/include/linux/rcuwait.h +++ b/include/linux/rcuwait.h @@ -3,6 +3,7 @@ #define _LINUX_RCUWAIT_H_ #include +#include So this is causing build to fail for me: CC arch/x86/boot/compressed/cmdline.o

Re: [PATCH] powerpc/pseries: Handle UE event for memcpy_mcsafe

2020-03-19 Thread Mahesh J Salgaonkar
On 2020-03-13 19:36:12 Fri, Ganesh Goudar wrote: > If we hit UE at an instruction with a fixup entry, flag to > ignore the event and set nip to continue execution at the > fixup entry. > For powernv this changes are already made by commit > 895e3dceeb97 ("powerpc/mce: Handle UE event for

[PATCH v4 16/16] powerpc sstep: Add support for prefixed fixed-point arithmetic

2020-03-19 Thread Jordan Niethe
This adds emulation support for the following prefixed Fixed-Point Arithmetic instructions: * Prefixed Add Immediate (paddi) Signed-off-by: Jordan Niethe --- v3: Since we moved the prefixed loads/stores into the load/store switch statement it no longer makes sense to have paddi in there, so

[PATCH v4 15/16] powerpc sstep: Add support for prefixed load/stores

2020-03-19 Thread Jordan Niethe
This adds emulation support for the following prefixed integer load/stores: * Prefixed Load Byte and Zero (plbz) * Prefixed Load Halfword and Zero (plhz) * Prefixed Load Halfword Algebraic (plha) * Prefixed Load Word and Zero (plwz) * Prefixed Load Word Algebraic (plwa) * Prefixed Load

[PATCH v4 14/16] powerpc64: Add prefixed instructions to instruction data type

2020-03-19 Thread Jordan Niethe
For powerpc64, redefine the ppc_inst type so both word and prefixed instructions can be represented. On powerpc32 the type will remain the same. Update places which had assumed instructions to be 4 bytes long. Signed-off-by: Jordan Niethe --- v4: New to series ---

[PATCH v4 13/16] powerpc: Support prefixed instructions in alignment handler

2020-03-19 Thread Jordan Niethe
Alignment interrupts can be caused by prefixed instructions accessing memory. Prefixed instructions are not permitted to cross 64-byte boundaries. If they do the alignment interrupt is invoked with SRR1 BOUNDARY bit set. If this occurs send a SIGBUS to the offending process if in user mode. If

[PATCH v4 12/16] powerpc: Define new SRR1 bits for a future ISA version

2020-03-19 Thread Jordan Niethe
Add the BOUNDARY SRR1 bit definition for when the cause of an alignment exception is a prefixed instruction that crosses a 64-byte boundary. Add the PREFIXED SRR1 bit definition for exceptions caused by prefixed instructions. Bit 35 of SRR1 is called SRR1_ISI_N_OR_G. This name comes from it being

[PATCH v4 11/16] powerpc: Enable Prefixed Instructions

2020-03-19 Thread Jordan Niethe
From: Alistair Popple Prefix instructions have their own FSCR bit which needs to enabled via a CPU feature. The kernel will save the FSCR for problem state but it needs to be enabled initially. If prefixed instructions are made unavailable by the [H]FSCR, attempting to use them will cause a

[PATCH v4 10/16] powerpc: Make test_translate_branch() independent of instruction length

2020-03-19 Thread Jordan Niethe
test_translate_branch() uses two pointers to instructions within a buffer, p and q, to test patch_branch(). The pointer arithmetic done on them assumes a size of 4. This will not work if the instruction length changes. Instead do the arithmetic relative to the void * to the buffer. Signed-off-by:

[PATCH v4 09/16] powerpc: Use a function for reading instructions

2020-03-19 Thread Jordan Niethe
Prefixed instructions will mean there are instructions of different length. As a result dereferencing a pointer to an instruction will not necessarily give the desired result. Introduce a function for reading instructions from memory into the instruction data type. Signed-off-by: Jordan Niethe

[PATCH v4 08/16] powerpc: Use an accessor for word instructions

2020-03-19 Thread Jordan Niethe
In preparation for prefixed instructions where all instructions are no longer words, use an accessor for getting a word instruction as a u32 from the instruction data type. Signed-off-by: Jordan Niethe --- v4: New to series --- arch/powerpc/kernel/align.c | 2 +-

[PATCH v4 07/16] powerpc: Introduce functions for instruction nullity and equality

2020-03-19 Thread Jordan Niethe
In preparation for an instruction data type that can not be directly used with the '==' operator use functions for checking equality and nullity. Signed-off-by: Jordan Niethe --- arch/powerpc/kernel/optprobes.c | 2 +- arch/powerpc/kernel/trace/ftrace.c | 33 +++-

[PATCH v4 06/16] powerpc: Use a function for getting the instruction op code

2020-03-19 Thread Jordan Niethe
In preparation for using a data type for instructions that can not be directly used with the '>>' operator use a function for getting the op code of an instruction. Signed-off-by: Jordan Niethe --- v4: New to series --- arch/powerpc/kernel/align.c | 4 ++-- arch/powerpc/lib/code-patching.c

[PATCH v4 05/16] powerpc: Use a function for masking instructions

2020-03-19 Thread Jordan Niethe
In preparation for using an instruction data type that can not be used directly with the '&' operator, use a function to mask instructions. Signed-off-by: Jordan Niethe --- v4: New to series --- arch/powerpc/include/asm/sstep.h | 6 +++--- arch/powerpc/kernel/align.c| 2 +-

[PATCH v4 04/16] powerpc: Use a macro for creating instructions from u32s

2020-03-19 Thread Jordan Niethe
In preparation for instructions having a more complex data type start using a macro, PPC_INST(), for making an instruction out of a u32. Currently this does nothing, but it will allow for creating a data type that can represent prefixed instructions. Signed-off-by: Jordan Niethe --- v4: New to

[PATCH v4 03/16] powerpc: Use a datatype for instructions

2020-03-19 Thread Jordan Niethe
Currently unsigned ints are used to represent instructions on powerpc. This has worked well as instructions have always been 4 byte words. However, a future ISA version will introduce some changes to instructions that mean this scheme will no longer work as well. This change is Prefixed

[PATCH v4 01/16] powerpc/xmon: Remove store_inst() for patch_instruction()

2020-03-19 Thread Jordan Niethe
For modifying instructions in xmon, patch_instruction() can serve the same role that store_inst() is performing with the advantage of not being specific to xmon. In some places patch_instruction() is already being using followed by store_inst(). In these cases just remove the store_inst().

[PATCH v4 02/16] xmon: Move out-of-line instructions to text section

2020-03-19 Thread Jordan Niethe
To execute an instruction out of line after a breakpoint, the NIP is set to the address of struct bpt::instr. Here a copy of the instruction that was replaced with a breakpoint is kept, along with a trap so normal flow can be resumed after XOLing. The struct bpt's are located within the data

[PATCH v4 00/16] Initial Prefixed Instruction support

2020-03-19 Thread Jordan Niethe
A future revision of the ISA will introduce prefixed instructions. A prefixed instruction is composed of a 4-byte prefix followed by a 4-byte suffix. All prefixes have the major opcode 1. A prefix will never be a valid word instruction. A suffix may be an existing word instruction or a new

Re: [PATCH v4 6/6] powerpc/fsl_booke/kaslr: rename kaslr-booke32.rst to kaslr-booke.rst and add 64bit part

2020-03-19 Thread Scott Wood
On Fri, 2020-03-06 at 14:40 +0800, Jason Yan wrote: > @@ -38,5 +41,29 @@ bit of the entropy to decide the index of the 64M zone. > Then we chose a > >kernstart_virt_addr > > + > +KASLR for Freescale BookE64 > +--- > + > +The

[PATCH 1/2] powerpc/mm: Drop platform defined pmd_mknotpresent()

2020-03-19 Thread Anshuman Khandual
Platform needs to define pmd_mknotpresent() for generic pmdp_invalidate() only when __HAVE_ARCH_PMDP_INVALIDATE is not subscribed. Otherwise platform specific pmd_mknotpresent() is not required. Hence just drop it. Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Cc:

[PATCH 0/2] mm/thp: Rename pmd_mknotpresent() as pmd_mknotvalid()

2020-03-19 Thread Anshuman Khandual
This series renames pmd_mknotpresent() as pmd_mknotvalid(). Before that it drops an existing pmd_mknotpresent() definition from powerpc platform which was never required as it defines it's pmdp_invalidate() through subscribing __HAVE_ARCH_PMDP_INVALIDATE. This does not create any functional

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Bharata B Rao
On Thu, Mar 19, 2020 at 02:47:58PM +0100, Vlastimil Babka wrote: > diff --git a/mm/slub.c b/mm/slub.c > index 17dc00e33115..7113b1f9cd77 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -1973,8 +1973,6 @@ static void *get_partial(struct kmem_cache *s, gfp_t > flags, int node, > > if (node

Re: [PATCH v3 25/32] powerpc/64: system call implement entry/exit logic in C

2020-03-19 Thread Nicholas Piggin
Christophe Leroy's on March 19, 2020 7:18 pm: > > > Le 25/02/2020 à 18:35, Nicholas Piggin a écrit : >> System call entry and particularly exit code is beyond the limit of what >> is reasonable to implement in asm. >> >> This conversion moves all conditional branches out of the asm code, >>

[PATCH v6 1/2] powerpc/64: Setup a paca before parsing device tree etc.

2020-03-19 Thread Michael Ellerman
From: Daniel Axtens Currently we set up the paca after parsing the device tree for CPU features. Prior to that, r13 contains random data, which means there is random data in r13 while we're running the generic dt parsing code. This random data varies depending on whether we boot through a

[PATCH v6 2/2] powerpc/64: Prevent stack protection in early boot

2020-03-19 Thread Michael Ellerman
The previous commit reduced the amount of code that is run before we setup a paca. However there are still a few remaining functions that run with no paca, or worse, with an arbitrary value in r13 that will be used as a paca pointer. In particular the stack protector canary is stored in the paca,

Re: [PATCH v4 0/6] implement KASLR for powerpc/fsl_booke/64

2020-03-19 Thread Daniel Axtens
Hi Jason, I tried to compile this series and got the following error: /home/dja/dev/linux/linux/arch/powerpc/mm/nohash/kaslr_booke.c: In function ‘kaslr_early_init’: /home/dja/dev/linux/linux/arch/powerpc/mm/nohash/kaslr_booke.c:357:33: error: ‘linear_sz’ may be used uninitialized in this

Re: [PATCH] powerpc/pseries: Fix MCE handling on pseries

2020-03-19 Thread Nicholas Piggin
Ganesh's on March 18, 2020 12:35 am: > > > On 3/17/20 3:31 PM, Nicholas Piggin wrote: >> Ganesh's on March 16, 2020 9:47 pm: >>> >>> On 3/14/20 9:18 AM, Nicholas Piggin wrote: Ganesh Goudar's on March 14, 2020 12:04 am: > MCE handling on pSeries platform fails as recent rework to use

Re: [PATCH v5 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.

2020-03-19 Thread Michael Ellerman
Christophe Leroy writes: > Move ADV_DEBUG_REGS functions out of ptrace.c, into > ptrace-adv.c and ptrace-noadv.c > > Signed-off-by: Christophe Leroy > --- > v4: Leave hw_breakpoint.h for ptrace.c > --- > arch/powerpc/kernel/ptrace/Makefile | 4 + >

Re: [RFC PATCH] powerpc/64s: CONFIG_PPC_HASH_MMU

2020-03-19 Thread Nicholas Piggin
Michael Ellerman's on March 19, 2020 2:15 pm: > Nicholas Piggin writes: >> This allows the 64s hash MMU code to be compiled out if radix is >> selected. This saves about 128kB kernel image size (90kB text) on >> powernv_defconfig minus KVM, 40kB on a tiny config. > > TBH my feelings are: > -

Re: [patch V2 07/15] powerpc/ps3: Convert half completion to rcuwait

2020-03-19 Thread Michael Ellerman
Sebastian Andrzej Siewior writes: > On 2020-03-19 03:04:59 [-0700], Christoph Hellwig wrote: >> But I wonder how alive the whole PS3 support is to start with.. > > OtherOS can only be used on "old" PS3 which do not have have their > firmware upgraded past version 3.21, released April 1, 2010 [0].

Re: [PATCH] KVM: PPC: Book3S HV: Skip kvmppc_uvmem_free if Ultravisor is not supported

2020-03-19 Thread Paul Mackerras
On Thu, Mar 19, 2020 at 07:55:10PM -0300, Fabiano Rosas wrote: > kvmppc_uvmem_init checks for Ultravisor support and returns early if > it is not present. Calling kvmppc_uvmem_free at module exit will cause > an Oops: > > $ modprobe -r kvm-hv > > Oops: Kernel access of bad area, sig: 11 [#1] >

Re: [patch V2 07/15] powerpc/ps3: Convert half completion to rcuwait

2020-03-19 Thread Geoff Levand
Hi, On 3/19/20 3:26 AM, Sebastian Andrzej Siewior wrote: > On 2020-03-19 03:04:59 [-0700], Christoph Hellwig wrote: >> But I wonder how alive the whole PS3 support is to start with.. > > OtherOS can only be used on "old" PS3 which do not have have their > firmware upgraded past version 3.21,

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Thomas Gleixner
Borislav Petkov writes: > On Thu, Mar 19, 2020 at 06:25:49PM +0100, Thomas Gleixner wrote: >> TBH, I don't see how >> >> if (force_dma_decrypted(dev)) >> set_memory_encrypted((unsigned long)cpu_addr, 1 << page_order); >> >> makes more sense than the above. It's both

Re: [PATCH 0/3] KVM: PPC: Fix host kernel crash with PR KVM

2020-03-19 Thread Paul Mackerras
On Wed, Mar 18, 2020 at 06:43:24PM +0100, Greg Kurz wrote: > Recent cleanup from Sean Christopherson introduced a use-after-free > condition that crashes the kernel when shutting down the VM with > PR KVM. It went unnoticed so far because PR isn't tested/used much > these days (mostly used for

Re: [PATCH] KVM: PPC: Book3S HV: Use RADIX_PTE_INDEX_SIZE in Radix MMU code

2020-03-19 Thread Paul Mackerras
On Tue, Feb 18, 2020 at 03:36:50PM +1100, Michael Ellerman wrote: > In kvmppc_unmap_free_pte() in book3s_64_mmu_radix.c, we use the > non-constant value PTE_INDEX_SIZE to clear a PTE page. > > We can instead use the constant RADIX_PTE_INDEX_SIZE, because we know > this code will only be running

Re: [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;

2020-03-19 Thread Paul Mackerras
On Wed, Mar 18, 2020 at 06:22:29PM -0700, Joe Perches wrote: > On Thu, 2020-03-19 at 12:18 +1100, Paul Mackerras wrote: > > On Tue, Mar 10, 2020 at 09:51:30PM -0700, Joe Perches wrote: > > > Convert the various uses of fallthrough comments to fallthrough; > > > > > > Done via script > > > Link:

Re: [PATCH] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests

2020-03-19 Thread Paul Mackerras
On Tue, Mar 10, 2020 at 04:11:28PM -0500, Michael Roth wrote: > The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest > via the guest/nested hypervisor. > > ./run-tests.sh -v > ... > TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp > 2,threads=2

Re: [PATCH v3] KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones

2020-03-19 Thread Paul Mackerras
On Fri, Feb 21, 2020 at 11:29:50AM -0500, Gustavo Romero wrote: > On P9 DD2.2 due to a CPU defect some TM instructions need to be emulated by > KVM. This is handled at first by the hardware raising a softpatch interrupt > when certain TM instructions that need KVM assistance are executed in the >

Re: [patch V2 11/15] completion: Use simple wait queues

2020-03-19 Thread Julian Calaby
Hi Thomas, On Thu, Mar 19, 2020 at 7:48 AM Thomas Gleixner wrote: > > From: Thomas Gleixner > > completion uses a wait_queue_head_t to enqueue waiters. > > wait_queue_head_t contains a spinlock_t to protect the list of waiters > which excludes it from being used in truly atomic context on a

[PATCH] KVM: PPC: Book3S HV: Skip kvmppc_uvmem_free if Ultravisor is not supported

2020-03-19 Thread Fabiano Rosas
kvmppc_uvmem_init checks for Ultravisor support and returns early if it is not present. Calling kvmppc_uvmem_free at module exit will cause an Oops: $ modprobe -r kvm-hv Oops: Kernel access of bad area, sig: 11 [#1] NIP: c0789e90 LR: c0789e8c CTR: c0401030 REGS:

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Michal Suchánek
On Thu, Mar 19, 2020 at 06:25:49PM +0100, Thomas Gleixner wrote: > Borislav Petkov writes: > > > On Thu, Mar 19, 2020 at 11:06:15AM +, Robin Murphy wrote: > >> Let me add another vote from a native English speaker that "unencrypted" is > >> the appropriate term to imply the *absence* of

Re: [PATCH] tpm2: Export tpm2_get_cc_attrs_tbl for ibmvtpm driver as module

2020-03-19 Thread Jarkko Sakkinen
On Thu, Mar 19, 2020 at 11:56:11AM -0400, Stefan Berger wrote: > On 3/19/20 10:27 AM, Jarkko Sakkinen wrote: > > On Wed, Mar 18, 2020 at 03:53:54PM -0400, Stefan Berger wrote: > > > On 3/18/20 3:42 PM, Jarkko Sakkinen wrote: > > > > On Tue, Mar 17, 2020 at 09:08:19AM -0400, Stefan Berger wrote: >

Re: [PATCH v3 8/8] mm/memory_hotplug: allow to specify a default online_type

2020-03-19 Thread Pankaj Gupta
> For now, distributions implement advanced udev rules to essentially > - Don't online any hotplugged memory (s390x) > - Online all memory to ZONE_NORMAL (e.g., most virt environments like > hyperv) > - Online all memory to ZONE_MOVABLE in case the zone imbalance is taken > care of (e.g., bare

Re: [PATCH v3 7/8] mm/memory_hotplug: convert memhp_auto_online to store an online_type

2020-03-19 Thread Pankaj Gupta
> ... and rename it to memhp_default_online_type. This is a preparation > for more detailed default online behavior. > > Reviewed-by: Wei Yang > Acked-by: Michal Hocko > Cc: Greg Kroah-Hartman > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: "Rafael J. Wysocki" > Cc:

Re: [PATCH v3 6/8] mm/memory_hotplug: unexport memhp_auto_online

2020-03-19 Thread Pankaj Gupta
> All in-tree users except the mm-core are gone. Let's drop the export. > > Reviewed-by: Wei Yang > Acked-by: Michal Hocko > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: "Rafael J. Wysocki" > Cc: Baoquan He > Cc: Wei Yang > Signed-off-by: David Hildenbrand > --- >

Re: [PATCH v3 3/8] drivers/base/memory: store mapping between MMOP_* and string in an array

2020-03-19 Thread Pankaj Gupta
> Let's use a simple array which we can reuse soon. While at it, move the > string->mmop conversion out of the device hotplug lock. > > Reviewed-by: Wei Yang > Acked-by: Michal Hocko > Cc: Greg Kroah-Hartman > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: "Rafael J.

Re: [PATCH v3 2/8] drivers/base/memory: map MMOP_OFFLINE to 0

2020-03-19 Thread Pankaj Gupta
> Historically, we used the value -1. Just treat 0 as the special > case now. Clarify a comment (which was wrong, when we come via > device_online() the first time, the online_type would have been 0 / > MEM_ONLINE). The default is now always MMOP_OFFLINE. This removes the > last user of the manual

Re: [PATCH v3 1/8] drivers/base/memory: rename MMOP_ONLINE_KEEP to MMOP_ONLINE

2020-03-19 Thread Pankaj Gupta
> The name is misleading and it's not really clear what is "kept". Let's just > name it like the online_type name we expose to user space ("online"). > > Add some documentation to the types. > > Reviewed-by: Wei Yang > Cc: Greg Kroah-Hartman > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Oscar

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-03-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #13 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) --- watson login: [30887.552539] KVM: CPU 4 seems to be stuck [30900.094713] watchdog: CPU 8 detected hard LOCKUP on other CPUs 0 [30900.094730] watchdog: CPU 8

Re: [PATCH v2] qtpm2: Export tpm2_get_cc_attrs_tbl for ibmvtpm driver as module

2020-03-19 Thread Jarkko Sakkinen
On Wed, Mar 18, 2020 at 09:00:17PM -0400, Stefan Berger wrote: > From: Stefan Berger > > This patch fixes the following problem when the ibmvtpm driver > is built as a module: > > ERROR: modpost: "tpm2_get_cc_attrs_tbl" [drivers/char/tpm/tpm_ibmvtpm.ko] > undefined! > make[1]: ***

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-19 Thread Mike Kravetz
On 3/19/20 12:00 AM, Christophe Leroy wrote: > > Le 18/03/2020 à 23:06, Mike Kravetz a écrit : >> The architecture independent routine hugetlb_default_setup sets up >> the default huge pages size. It has no way to verify if the passed >> value is valid, so it accepts it and attempts to validate

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-19 Thread Thomas Gleixner
Jonathan Corbet writes: > On Wed, 18 Mar 2020 21:43:10 +0100 > Thomas Gleixner wrote: >> Add initial documentation. > > ...time to add a a couple of nits...:) ...time Is that valid RST? >> +++ b/Documentation/locking/locktypes.rst >> @@ -0,0 +1,298 @@ >> +.. _kernel_hacking_locktypes: >> + >

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-19 Thread Thomas Gleixner
Paul, "Paul E. McKenney" writes: > On Wed, Mar 18, 2020 at 09:43:10PM +0100, Thomas Gleixner wrote: > > Mostly native-English-speaker services below, so please feel free to > ignore. The one place I made a substantive change, I marked it "@@@". > I only did about half of this document, but

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Borislav Petkov
On Thu, Mar 19, 2020 at 06:25:49PM +0100, Thomas Gleixner wrote: > TBH, I don't see how > > if (force_dma_decrypted(dev)) > set_memory_encrypted((unsigned long)cpu_addr, 1 << page_order); > > makes more sense than the above. It's both non-sensical unless there is 9087c37584fb

Re: [PATCH -v2] treewide: Rename "unencrypted" to "decrypted"

2020-03-19 Thread Thomas Gleixner
Borislav Petkov writes: > On Thu, Mar 19, 2020 at 11:06:15AM +, Robin Murphy wrote: >> Let me add another vote from a native English speaker that "unencrypted" is >> the appropriate term to imply the *absence* of encryption, whereas >> "decrypted" implies the *reversal* of applied

Re: [patch V2 11/15] completion: Use simple wait queues

2020-03-19 Thread Linus Torvalds
On Wed, Mar 18, 2020 at 1:47 PM Thomas Gleixner wrote: > > There is no semantical or functional change: Ack, with just the explanation, I'm no longer objecting to this. Plus you fixed and cleaned up the odd usb gadget code separately (well, most of it). Linus

Re: [PATCH 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code

2020-03-19 Thread Mike Kravetz
On 3/19/20 12:04 AM, Christophe Leroy wrote: > > > Le 18/03/2020 à 23:06, Mike Kravetz a écrit : >> Now that architectures provide arch_hugetlb_valid_size(), parsing >> of "hugepagesz=" can be done in architecture independent code. >> Create a single routine to handle hugepagesz= parsing and

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Joe Perches
On Thu, 2020-03-19 at 13:19 +0100, Michal Suchanek wrote: > Signed-off-by: Michal Suchanek > --- > v10: new patch > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index bc8dbe4fe4c9..329bf4a31412 100644 > --- a/MAINTAINERS > +++

Re: [PATCH] tpm2: Export tpm2_get_cc_attrs_tbl for ibmvtpm driver as module

2020-03-19 Thread Stefan Berger
On 3/19/20 10:27 AM, Jarkko Sakkinen wrote: On Wed, Mar 18, 2020 at 03:53:54PM -0400, Stefan Berger wrote: On 3/18/20 3:42 PM, Jarkko Sakkinen wrote: On Tue, Mar 17, 2020 at 09:08:19AM -0400, Stefan Berger wrote: From: Stefan Berger This patch fixes the following problem when the ibmvtpm

Re: [patch V2 08/15] Documentation: Add lock ordering and nesting documentation

2020-03-19 Thread Jonathan Corbet
On Wed, 18 Mar 2020 21:43:10 +0100 Thomas Gleixner wrote: > From: Thomas Gleixner > > The kernel provides a variety of locking primitives. The nesting of these > lock types and the implications of them on RT enabled kernels is nowhere > documented. > > Add initial documentation. ...time to

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Sachin Sant
>>> Great, thanks! Can I add your Tested-by: then? >> >> Sure. >> Tested-by: Sachin Sant >> >> Thank you for the fix. > > Thanks! Sorry to bother, but in the end I decided to do further change so I > would appreciate verification if it still works as intended. Works as expected. I am able to

Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Michal Suchánek
On Thu, Mar 19, 2020 at 03:16:03PM +0100, Christophe Leroy wrote: > > > Le 19/03/2020 à 14:35, Andy Shevchenko a écrit : > > On Thu, Mar 19, 2020 at 1:54 PM Michal Suchanek wrote: > > > > > > Merge the 32bit and 64bit version. > > > > > > Halve the check constants on 32bit. > > > > > > Use

Re: [PATCH] tpm2: Export tpm2_get_cc_attrs_tbl for ibmvtpm driver as module

2020-03-19 Thread Jarkko Sakkinen
On Wed, Mar 18, 2020 at 03:53:54PM -0400, Stefan Berger wrote: > On 3/18/20 3:42 PM, Jarkko Sakkinen wrote: > > On Tue, Mar 17, 2020 at 09:08:19AM -0400, Stefan Berger wrote: > > > From: Stefan Berger > > > > > > This patch fixes the following problem when the ibmvtpm driver > > > is built as a

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Andy Shevchenko
On Thu, Mar 19, 2020 at 03:00:08PM +0100, Michal Suchánek wrote: > On Thu, Mar 19, 2020 at 03:37:03PM +0200, Andy Shevchenko wrote: > > On Thu, Mar 19, 2020 at 2:21 PM Michal Suchanek wrote: > > > > > > Signed-off-by: Michal Suchanek > > > --- > > > v10: new patch > > > --- > > > MAINTAINERS |

Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Christophe Leroy
Le 19/03/2020 à 14:35, Andy Shevchenko a écrit : On Thu, Mar 19, 2020 at 1:54 PM Michal Suchanek wrote: Merge the 32bit and 64bit version. Halve the check constants on 32bit. Use STACK_TOP since it is defined. Passing is_64 is now redundant since is_32bit_task() is used to determine

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Vlastimil Babka
On 3/19/20 3:05 PM, Srikar Dronamraju wrote: > * Vlastimil Babka [2020-03-19 14:47:58]: > >> 8< >> diff --git a/mm/slub.c b/mm/slub.c >> index 17dc00e33115..7113b1f9cd77 100644 >> --- a/mm/slub.c >> +++ b/mm/slub.c >> @@ -1973,8 +1973,6 @@ static void *get_partial(struct kmem_cache *s,

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Srikar Dronamraju
* Vlastimil Babka [2020-03-19 14:47:58]: > 8< > diff --git a/mm/slub.c b/mm/slub.c > index 17dc00e33115..7113b1f9cd77 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -1973,8 +1973,6 @@ static void *get_partial(struct kmem_cache *s, gfp_t > flags, int node, > > if (node ==

Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Michal Suchánek
On Thu, Mar 19, 2020 at 03:35:03PM +0200, Andy Shevchenko wrote: > On Thu, Mar 19, 2020 at 1:54 PM Michal Suchanek wrote: > > > > Merge the 32bit and 64bit version. > > > > Halve the check constants on 32bit. > > > > Use STACK_TOP since it is defined. > > > > Passing is_64 is now redundant since

Re: [PATCH v11 0/8] Disable compat cruft on ppc64le v11

2020-03-19 Thread Michal Suchánek
On Thu, Mar 19, 2020 at 01:36:56PM +0100, Christophe Leroy wrote: > You sent it twice ? Any difference between the two dispatch ? Some headers were broken the first time around. Thanks Michal > > Christophe > > Le 19/03/2020 à 13:19, Michal Suchanek a écrit : > > Less code means less bugs so

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Michal Suchánek
On Thu, Mar 19, 2020 at 03:37:03PM +0200, Andy Shevchenko wrote: > On Thu, Mar 19, 2020 at 2:21 PM Michal Suchanek wrote: > > > > Signed-off-by: Michal Suchanek > > --- > > v10: new patch > > --- > > MAINTAINERS | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/MAINTAINERS

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Vlastimil Babka
On 3/19/20 2:26 PM, Sachin Sant wrote: > > >> On 19-Mar-2020, at 6:53 PM, Vlastimil Babka wrote: >> >> On 3/19/20 9:52 AM, Sachin Sant wrote: >>> OK how about this version? It's somewhat ugly, but important is that the fast path case (c->page exists) is unaffected and another

Re: [PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Andy Shevchenko
On Thu, Mar 19, 2020 at 2:21 PM Michal Suchanek wrote: > > Signed-off-by: Michal Suchanek > --- > v10: new patch > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index bc8dbe4fe4c9..329bf4a31412 100644 > --- a/MAINTAINERS > +++

Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Andy Shevchenko
On Thu, Mar 19, 2020 at 1:54 PM Michal Suchanek wrote: > > Merge the 32bit and 64bit version. > > Halve the check constants on 32bit. > > Use STACK_TOP since it is defined. > > Passing is_64 is now redundant since is_32bit_task() is used to > determine which callchain variant should be used. Use

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Sachin Sant
> On 19-Mar-2020, at 6:53 PM, Vlastimil Babka wrote: > > On 3/19/20 9:52 AM, Sachin Sant wrote: >> >>> OK how about this version? It's somewhat ugly, but important is that the >>> fast >>> path case (c->page exists) is unaffected and another common case (c->page is >>> NULL, but node is

Re: [RFC 1/2] mm, slub: prevent kmalloc_node crashes and memory leaks

2020-03-19 Thread Vlastimil Babka
On 3/19/20 9:52 AM, Sachin Sant wrote: > >> OK how about this version? It's somewhat ugly, but important is that the fast >> path case (c->page exists) is unaffected and another common case (c->page is >> NULL, but node is NUMA_NO_NODE) is just one extra check - impossible to >> avoid at >> some

[PATCH v3 8/8] mm/memory_hotplug: allow to specify a default online_type

2020-03-19 Thread David Hildenbrand
For now, distributions implement advanced udev rules to essentially - Don't online any hotplugged memory (s390x) - Online all memory to ZONE_NORMAL (e.g., most virt environments like hyperv) - Online all memory to ZONE_MOVABLE in case the zone imbalance is taken care of (e.g., bare metal,

[PATCH v3 7/8] mm/memory_hotplug: convert memhp_auto_online to store an online_type

2020-03-19 Thread David Hildenbrand
... and rename it to memhp_default_online_type. This is a preparation for more detailed default online behavior. Reviewed-by: Wei Yang Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Michal Hocko Cc: Oscar Salvador Cc: "Rafael J. Wysocki" Cc: Baoquan He Cc: Wei Yang

[PATCH v3 5/8] hv_balloon: don't check for memhp_auto_online manually

2020-03-19 Thread David Hildenbrand
We get the MEM_ONLINE notifier call if memory is added right from the kernel via add_memory() or later from user space. Let's get rid of the "ha_waiting" flag - the wait event has an inbuilt mechanism (->done) for that. Initialize the wait event only once and reinitialize before adding memory.

[PATCH v3 6/8] mm/memory_hotplug: unexport memhp_auto_online

2020-03-19 Thread David Hildenbrand
All in-tree users except the mm-core are gone. Let's drop the export. Reviewed-by: Wei Yang Acked-by: Michal Hocko Cc: Andrew Morton Cc: Michal Hocko Cc: Oscar Salvador Cc: "Rafael J. Wysocki" Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- mm/memory_hotplug.c | 1 - 1

[PATCH v3 4/8] powernv/memtrace: always online added memory blocks

2020-03-19 Thread David Hildenbrand
Let's always try to online the re-added memory blocks. In case add_memory() already onlined the added memory blocks, the first device_online() call will fail and stop processing the remaining memory blocks. This avoids manually having to check memhp_auto_online. Note: PPC always onlines all

[PATCH v3 3/8] drivers/base/memory: store mapping between MMOP_* and string in an array

2020-03-19 Thread David Hildenbrand
Let's use a simple array which we can reuse soon. While at it, move the string->mmop conversion out of the device hotplug lock. Reviewed-by: Wei Yang Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Michal Hocko Cc: Oscar Salvador Cc: "Rafael J. Wysocki" Cc: Baoquan He

[PATCH v3 2/8] drivers/base/memory: map MMOP_OFFLINE to 0

2020-03-19 Thread David Hildenbrand
Historically, we used the value -1. Just treat 0 as the special case now. Clarify a comment (which was wrong, when we come via device_online() the first time, the online_type would have been 0 / MEM_ONLINE). The default is now always MMOP_OFFLINE. This removes the last user of the manual "-1",

[PATCH v3 0/8] mm/memory_hotplug: allow to specify a default online_type

2020-03-19 Thread David Hildenbrand
Distributions nowadays use udev rules ([1] [2]) to specify if and how to online hotplugged memory. The rules seem to get more complex with many special cases. Due to the various special cases, CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE cannot be used. All memory hotplug is handled via udev rules.

[PATCH v3 1/8] drivers/base/memory: rename MMOP_ONLINE_KEEP to MMOP_ONLINE

2020-03-19 Thread David Hildenbrand
The name is misleading and it's not really clear what is "kept". Let's just name it like the online_type name we expose to user space ("online"). Add some documentation to the types. Reviewed-by: Wei Yang Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Michal Hocko Cc: Oscar Salvador Cc:

Re: [PATCH v11 0/8] Disable compat cruft on ppc64le v11

2020-03-19 Thread Christophe Leroy
You sent it twice ? Any difference between the two dispatch ? Christophe Le 19/03/2020 à 13:19, Michal Suchanek a écrit : Less code means less bugs so add a knob to skip the compat stuff. Changes in v2: saner CONFIG_COMPAT ifdefs Changes in v3: - change llseek to 32bit instead of builing it

Re: [PATCH v11 0/8] Disable compat cruft on ppc64le v11

2020-03-19 Thread Michal Suchánek
Lost some headers so will resend. On Thu, Mar 19, 2020 at 12:52:20PM +0100, Michal Suchanek wrote: > Less code means less bugs so add a knob to skip the compat stuff. > > Changes in v2: saner CONFIG_COMPAT ifdefs > Changes in v3: > - change llseek to 32bit instead of builing it unconditionally

[PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- v10: new patch --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bc8dbe4fe4c9..329bf4a31412 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13088,6 +13088,8 @@ F: arch/*/kernel/*/perf_event*.c F:

[PATCH v11 7/8] powerpc/perf: split callchain.c by bitness

2020-03-19 Thread Michal Suchanek
Building callchain.c with !COMPAT proved quite ugly with all the defines. Splitting out the 32bit and 64bit parts looks better. No code change intended. Signed-off-by: Michal Suchanek --- v6: - move current_is_64bit consolidetaion to earlier patch - move defines to the top of callchain_32.c

[PATCH v11 6/8] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2020-03-19 Thread Michal Suchanek
On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v3: make configurable --- arch/powerpc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v11 5/8] powerpc/64: make buildable without CONFIG_COMPAT

2020-03-19 Thread Michal Suchanek
There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef condition in vdso.c - 64bit is redundant - simplify the compat ifdef condition in callchain.c -

[PATCH v11 3/8] powerpc/perf: consolidate read_user_stack_32

2020-03-19 Thread Michal Suchanek
There are two almost identical copies for 32bit and 64bit. The function is used only in 32bit code which will be split out in next patch so consolidate to one function. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v6: new patch v8: move the consolidated function out of

[PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Michal Suchanek
Merge the 32bit and 64bit version. Halve the check constants on 32bit. Use STACK_TOP since it is defined. Passing is_64 is now redundant since is_32bit_task() is used to determine which callchain variant should be used. Use STACK_TOP and is_32bit_task() directly. This removes a page from the

[PATCH v11 2/8] powerpc: move common register copy functions from signal_32.c to signal.c

2020-03-19 Thread Michal Suchanek
These functions are required for 64bit as well. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- arch/powerpc/kernel/signal.c| 141 arch/powerpc/kernel/signal_32.c | 140 --- 2 files changed, 141 insertions(+),

[PATCH v11 1/8] powerpc: Add back __ARCH_WANT_SYS_LLSEEK macro

2020-03-19 Thread Michal Suchanek
This partially reverts commit caf6f9c8a326 ("asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro") When CONFIG_COMPAT is disabled on ppc64 the kernel does not build. There is resistance to both removing the llseek syscall from the 64bit syscall tables and building the llseek interface

[PATCH v11 0/8] Disable compat cruft on ppc64le v11

2020-03-19 Thread Michal Suchanek
Less code means less bugs so add a knob to skip the compat stuff. Changes in v2: saner CONFIG_COMPAT ifdefs Changes in v3: - change llseek to 32bit instead of builing it unconditionally in fs - clanup the makefile conditionals - remove some ifdefs or convert to IS_DEFINED where possible

[PATCH v11 7/8] powerpc/perf: split callchain.c by bitness

2020-03-19 Thread Michal Suchanek
Building callchain.c with !COMPAT proved quite ugly with all the defines. Splitting out the 32bit and 64bit parts looks better. No code change intended. Signed-off-by: Michal Suchanek --- v6: - move current_is_64bit consolidetaion to earlier patch - move defines to the top of callchain_32.c

[PATCH v11 8/8] MAINTAINERS: perf: Add pattern that matches ppc perf to the perf entry.

2020-03-19 Thread Michal Suchanek
Signed-off-by: Michal Suchanek --- v10: new patch --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bc8dbe4fe4c9..329bf4a31412 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13088,6 +13088,8 @@ F: arch/*/kernel/*/perf_event*.c F:

[PATCH v11 6/8] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2020-03-19 Thread Michal Suchanek
On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v3: make configurable --- arch/powerpc/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Michal Suchanek
Merge the 32bit and 64bit version. Halve the check constants on 32bit. Use STACK_TOP since it is defined. Passing is_64 is now redundant since is_32bit_task() is used to determine which callchain variant should be used. Use STACK_TOP and is_32bit_task() directly. This removes a page from the

  1   2   >