Re: [PATCH 3/4] powerpc/eeh: Remove workaround from eeh_add_device_late()

2020-04-14 Thread Sam Bobroff
On Wed, Apr 08, 2020 at 04:53:36PM +1000, Oliver O'Halloran wrote: > On Wed, Apr 8, 2020 at 4:22 PM Sam Bobroff wrote: > > > > On Fri, Apr 03, 2020 at 05:08:32PM +1100, Oliver O'Halloran wrote: > > > On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote: > > > > When EEH device state was released a

Re: [PATCH 4/8] binfmt_elf: open code copy_siginfo_to_user to kernelspace buffer

2020-04-14 Thread Christoph Hellwig
On Wed, Apr 15, 2020 at 01:01:59PM +1000, Michael Ellerman wrote: > > + to_compat_siginfo(csigdata, siginfo, compat_siginfo_flags()); \ > > + fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata); \ > > +} while (0) > > This doesn't build on ppc (cell_defconfig): > > ../fs/binf

Re: [PATCH 1/4] dma-mapping: move the remaining DMA API calls out of line

2020-04-14 Thread Christoph Hellwig
On Wed, Apr 15, 2020 at 12:26:04PM +1000, Alexey Kardashevskiy wrote: > May be this is correct and allowed (no idea) but removing exported > symbols at least deserves a mention in the commit log, does not it? > > The rest of the series is fine and works. Thanks, Maybe I can throw in a line, but t

Re: [RFC PATCH] powerpc/lib: Fixing use a temporary mm for code patching

2020-04-14 Thread Christopher M Riedl
> On March 26, 2020 9:42 AM Christophe Leroy wrote: > > > This patch fixes the RFC series identified below. > It fixes three points: > - Failure with CONFIG_PPC_KUAP > - Failure to write do to lack of DIRTY bit set on the 8xx > - Inadequaly complex WARN post verification > > However, it has an

Re: [RFC PATCH 3/3] powerpc/lib: Use a temporary mm for code patching

2020-04-14 Thread Christopher M Riedl
> On March 24, 2020 11:25 AM Christophe Leroy wrote: > > > Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : > > Currently, code patching a STRICT_KERNEL_RWX exposes the temporary > > mappings to other CPUs. These mappings should be kept local to the CPU > > doing the patching. Use the pre-

Re: [PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-04-14 Thread Johannes Weiner
On Mon, Apr 13, 2020 at 05:15:49PM -0400, Waiman Long wrote: > As said by Linus: > > A symmetric naming is only helpful if it implies symmetries in use. > Otherwise it's actively misleading. As the btrfs example proves - people can be tempted by this false symmetry to pair kzalloc with kzfree

[PATCH] ASoC: fsl_micfil: Omit superfluous error message in fsl_micfil_probe()

2020-04-14 Thread Tang Bin
In the function fsl_micfil_probe(), when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Tang Bin Signed-off-by: Shengju Zhang --- sound/soc/fsl/fsl_micfil.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -

Re: [PATCH v5 18/21] powerpc64: Add prefixed instructions to instruction data type

2020-04-14 Thread Jordan Niethe
On Mon, Apr 13, 2020 at 10:04 PM Balamuruhan S wrote: > > On Mon, 2020-04-06 at 18:09 +1000, Jordan Niethe wrote: > > 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 as

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-14 Thread Christopher M Riedl
> On April 8, 2020 6:01 AM Christophe Leroy wrote: > > > Le 31/03/2020 à 05:19, Christopher M Riedl a écrit : > >> On March 24, 2020 11:10 AM Christophe Leroy > >> wrote: > >> > >> > >> Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : > >>> When code patching a STRICT_KERNEL_RWX kerne

Re: [PATCH 4/8] binfmt_elf: open code copy_siginfo_to_user to kernelspace buffer

2020-04-14 Thread Michael Ellerman
Christoph Hellwig writes: > Instead of messing with the address limit just open code the trivial > memcpy + memset logic for the native version, and a call to > to_compat_siginfo for the compat version. > > Signed-off-by: Christoph Hellwig > --- > fs/binfmt_elf.c| 9 + > fs/comp

[PATCH kernel] powerpc/dma: Call indirect dma_ops when persistent memory present

2020-04-14 Thread Alexey Kardashevskiy
Unlike normal memory ("memory" compatible type in the FDT), the persistent memory ("ibm,pmemory" in the FDT) can be mapped anywhere in the guest physical space and it can be used for DMA. In order to maintain 1:1 mapping via the huge DMA window, we need to know the maximum physical address at the

Re: [PATCH v6 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-04-14 Thread Shengjiu Wang
Hi Rob On Tue, Apr 14, 2020 at 11:49 PM Rob Herring wrote: > > On Wed, Apr 01, 2020 at 04:45:39PM +0800, Shengjiu Wang wrote: > > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > > IP module found on i.MX8MN. > > > > Signed-off-by: Shengjiu Wang > > --- > > .../devicetree/bindings

[PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Jason Wang
We try to keep the defconfig untouched after decoupling CONFIG_VHOST out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a ("vhost: refine vhost and vringh kconfig") by enabling VHOST_MENU by default. Then the defconfigs can keep enabling CONFIG_VHOST_NET without the caring of CONFIG_VHOST. But this

Re: [PATCH] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Jason Wang
On 2020/4/15 上午5:15, kbuild test robot wrote: Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on vhost/linux-next] [also build test ERROR on next-20200414] [cannot apply to powerpc/next s390/features v5.7-rc1] [if your patch is applied to the wrong git tree

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-14 Thread Baoquan He
On 04/14/20 at 04:49pm, David Hildenbrand wrote: > > The root cause is kexec-ed kernel is targeted at hotpluggable memory > > region. Just avoiding the movable area can fix it. In kexec_file_load(), > > just checking or picking those unmovable region to put kernel/initrd in > > func

Re: [PATCH 1/4] dma-mapping: move the remaining DMA API calls out of line

2020-04-14 Thread Alexey Kardashevskiy
On 14/04/2020 22:25, Christoph Hellwig wrote: > For a long time the DMA API has been implemented inline in dma-mapping.h, > but the function bodies can be quite large. Move them all out of line. > > Signed-off-by: Christoph Hellwig > --- > include/linux/dma-direct.h | 58 + > inclu

[PATCH 1/2] ocxl: Remove unnecessary externs

2020-04-14 Thread Alastair D'Silva
Function declarations don't need externs, remove the existing ones so they are consistent with newer code Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat --- arch/powerpc/include/asm/pnv-ocxl.h | 40 ++--- include/misc/ocxl.h

[PATCH 2/2] ocxl: Address kernel doc errors & warnings

2020-04-14 Thread Alastair D'Silva
This patch addresses warnings and errors from the kernel doc scripts for the OpenCAPI driver. It also makes minor tweaks to make the docs more consistent. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- drivers/misc/ocxl/config.c| 24 drivers/misc/ocxl/ocxl_inte

[PATCH 0/2] powerpc: OpenCAPI Cleanup

2020-04-14 Thread Alastair D'Silva
These patches address checkpatch & kernel doc warnings in the OpenCAPI infrastructure. Alastair D'Silva (2): ocxl: Remove unnecessary externs ocxl: Address kernel doc errors & warnings arch/powerpc/include/asm/pnv-ocxl.h | 40 ++- drivers/misc/ocxl/config.c | 24 +++ d

Re: [PATCH v2 25/33] docs: powerpc: cxl.rst: mark two section titles as such

2020-04-14 Thread Andrew Donnellan
On 15/4/20 2:48 am, Mauro Carvalho Chehab wrote: The User API chapter contains two sub-chapters. Mark them as such. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] target/ppc: Fix mtmsr(d) L=1 variant that loses interrupts

2020-04-14 Thread Nathan Chancellor
On Tue, Apr 14, 2020 at 09:11:31PM +1000, Nicholas Piggin wrote: > If mtmsr L=1 sets MSR[EE] while there is a maskable exception pending, > it does not cause an interrupt. This causes the test case to hang: > > https://lists.gnu.org/archive/html/qemu-ppc/2019-10/msg00826.html > > More recently, L

[PATCH] powerpc/powernv/pci: Add an explaination for PNV_IODA_PE_BUS_ALL

2020-04-14 Thread Oliver O'Halloran
It's pretty obsecure and confused me for a long time so I figured it's worth documenting properly. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/pci.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerp

Re: [PATCH 3/8] fs: wrap simple_pin_fs/simple_release_fs arguments in a struct

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 02:42:57PM +0200, Emanuele Giuseppe Esposito wrote: > @@ -676,9 +674,9 @@ static void __debugfs_file_removed(struct dentry *dentry) > > static void remove_one(struct dentry *victim) > { > -if (d_is_reg(victim)) > +if (d_is_reg(victim)) > __debug

Re: [PATCH 4/8] fs: introduce simple_new_inode

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 02:42:58PM +0200, Emanuele Giuseppe Esposito wrote: > It is a common special case for new_inode to initialize the > time to the current time and the inode to get_next_ino(). > Introduce a core function that does it and use it throughout > Linux. Shouldn't this just be calle

Re: [PATCH 6/8] simplefs: add file creation functions

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 02:43:00PM +0200, Emanuele Giuseppe Esposito wrote: > A bunch of code is duplicated between debugfs and tracefs, unify it to the > simplefs library. > > The code is very similar, except that dentry and inode creation are unified > into a single function (unlike start_creati

Re: [PATCH 5/8] simplefs: add alloc_anon_inode wrapper

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 02:42:59PM +0200, Emanuele Giuseppe Esposito wrote: > Start adding file creation wrappers, the simplest returns an anonymous > inode. This changelog text does not make much sense on its own. Please say why you are doing something, not just what you are doing. thanks, gre

Re: [PATCH 2/8] fs: extract simple_pin/release_fs to separate files

2020-04-14 Thread Greg Kroah-Hartman
On Tue, Apr 14, 2020 at 02:42:56PM +0200, Emanuele Giuseppe Esposito wrote: > We will augment this family of functions with inode management. To avoid > littering include/linux/fs.h and fs/libfs.c, move them to a separate header, > with a Kconfig symbol to enable them. > > Signed-off-by: Emanuele

Re: [PATCH] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread kbuild test robot
Hi Jason, I love your patch! Yet something to improve: [auto build test ERROR on vhost/linux-next] [also build test ERROR on next-20200414] [cannot apply to powerpc/next s390/features v5.7-rc1] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW

Re: [PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-14 Thread Joe Perches
On Tue, 2020-04-14 at 15:37 -0400, Waiman Long wrote: > OK, I can change it to clear the key length when the allocation failed > which isn't likely. Perhaps: kfree_sensitive(op->key); op->key = NULL; op->keylen = 0; but I don't know that it impacts any possible state.

Re: [PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-14 Thread Waiman Long
On 4/14/20 3:16 PM, Michal Suchánek wrote: > On Tue, Apr 14, 2020 at 12:24:36PM -0400, Waiman Long wrote: >> On 4/14/20 2:08 AM, Christophe Leroy wrote: >>> >>> Le 14/04/2020 à 00:28, Waiman Long a écrit : Since kfree_sensitive() will do an implicit memzero_explicit(), there is no need to

Re: [PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-14 Thread Michal Suchánek
On Tue, Apr 14, 2020 at 12:24:36PM -0400, Waiman Long wrote: > On 4/14/20 2:08 AM, Christophe Leroy wrote: > > > > > > Le 14/04/2020 à 00:28, Waiman Long a écrit : > >> Since kfree_sensitive() will do an implicit memzero_explicit(), there > >> is no need to call memzero_explicit() before it. Elimin

[PATCH v2] Fix: buffer overflow during hvc_alloc().

2020-04-14 Thread andrew
From: Andrew Melnychenko If there is a lot(more then 16) of virtio-console devices or virtio_console module is reloaded - buffers 'vtermnos' and 'cons_ops' are overflowed. In older kernels it overruns spinlock which leads to kernel freezing: https://bugzilla.redhat.com/show_bug.cgi?id=1786239 To

Re: [PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-04-14 Thread Waiman Long
On 4/14/20 8:48 AM, David Sterba wrote: > On Mon, Apr 13, 2020 at 05:15:49PM -0400, Waiman Long wrote: >> fs/btrfs/ioctl.c | 2 +- > >> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c >> index 40b729dce91c..eab3f8510426 100644 >> --- a/fs/btrfs/ioctl.c >> +++ b/fs/btr

Re: -Wincompatible-pointer-types in arch/powerpc/platforms/embedded6xx/mvme5100.c

2020-04-14 Thread Scott Wood
On Tue, 2020-04-14 at 17:33 +1000, Michael Ellerman wrote: > I'm not sure TBH. This is all ancient history as far as I can tell, none > of it's been touched for ~7 years. > > Your config has: > > CONFIG_EMBEDDED6xx=y > CONFIG_PPC_BOOK3S_32=y > CONFIG_PPC_BOOK3S_6xx=y > CONFIG_PPC_MPC52xx=y > CONF

[PATCH] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-04-14 Thread Christophe Leroy
unsafe_put_user() is designed to take benefit of 'asm goto'. Instead of using the standard __put_user() approach and branch based on the returned error, use 'asm goto' to branch directly to the error label from the .fixup code. This change significantly simplifies functions using unsafe_put_user(

[PATCH v2 11/33] docs: filesystems: fix renamed references

2020-04-14 Thread Mauro Carvalho Chehab
Some filesystem references got broken by a previous patch series I submitted. Address those. Signed-off-by: Mauro Carvalho Chehab Acked-by: David Sterba # fs/affs/Kconfig --- Documentation/ABI/stable/sysfs-devices-node | 2 +- Documentation/ABI/testing/procfs-smaps_rollup

[PATCH v2 25/33] docs: powerpc: cxl.rst: mark two section titles as such

2020-04-14 Thread Mauro Carvalho Chehab
The User API chapter contains two sub-chapters. Mark them as such. Signed-off-by: Mauro Carvalho Chehab --- Documentation/powerpc/cxl.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/powerpc/cxl.rst b/Documentation/powerpc/cxl.rst index 920546d81326..d2d77057610e 100644 --

[PATCH v2 00/33] Documentation fixes for Kernel 5.8

2020-04-14 Thread Mauro Carvalho Chehab
Patches 1 to 5 contain changes to the documentation toolset: - The first 3 patches help to reduce a lot the number of reported kernel-doc issues, by making the tool more smart. - Patches 4 and 5 are meant to partially address the PDF build, with now requires Sphinx version 2.4 or upper. The

[PATCH v2 09/33] docs: fix broken references to text files

2020-04-14 Thread Mauro Carvalho Chehab
Several references got broken due to txt to ReST conversion. Several of them can be automatically fixed with: scripts/documentation-file-ref-check --fix Reviewed-by: Mathieu Poirier # hwtracing/coresight/Kconfig Reviewed-by: Paul E. McKenney # memory-barrier.txt Acked-by: Alex Shi #

Re: [PATCH v2 2/2] crypto: Remove unnecessary memzero_explicit()

2020-04-14 Thread Waiman Long
On 4/14/20 2:08 AM, Christophe Leroy wrote: > > > Le 14/04/2020 à 00:28, Waiman Long a écrit : >> Since kfree_sensitive() will do an implicit memzero_explicit(), there >> is no need to call memzero_explicit() before it. Eliminate those >> memzero_explicit() and simplify the call sites. For better c

Re: [PATCH] kvm_host: unify VM_STAT and VCPU_STAT definitions in a single place

2020-04-14 Thread Emanuele Giuseppe Esposito
On 4/14/20 10:18 AM, Paolo Bonzini wrote: On 13/04/20 23:34, Philippe Mathieu-Daudé wrote: +#define VM_STAT(x, ...) offsetof(struct kvm, stat.x), KVM_STAT_VM, ## __VA_ARGS__ +#define VCPU_STAT(x, ...) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU, ## __VA_ARGS__ I find this macro expand

Re: [PATCH v6 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-04-14 Thread Rob Herring
On Wed, Apr 01, 2020 at 04:45:39PM +0800, Shengjiu Wang wrote: > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > IP module found on i.MX8MN. > > Signed-off-by: Shengjiu Wang > --- > .../devicetree/bindings/sound/fsl,easrc.yaml | 101 ++ > 1 file changed, 101 inser

[PATCH v4 14/14] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58 -- inc

[PATCH v4 13/14] asm-generic: remove pgtable-nop4d-hack.h

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h |

[PATCH v4 12/14] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapopor

[PATCH v4 11/14] sh: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh/

[PATCH v4 10/14] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh/

[PATCH v4 09/14] sh: fault: Modernize printing of kernel messages

2020-04-14 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fault.c | 39

[PATCH v4 08/14] powerpc: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h |

[PATCH v4 07/14] openrisc: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10 -- a

[PATCH v4 06/14] nios2: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch/nio

[PATCH v4 05/14] ia64: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64/i

[PATCH v4 04/14] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --

[PATCH v4 03/14] arm64: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/arm64/include/asm/kvm_mmu.h| 10 +- arch/arm64/i

[PATCH v4 02/14] arm: add support for folded p4d page tables

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/arm/include/asm/pgtable.h | 1 - arch/arm/lib/uaccess_with_memcpy.c | 7 +- arch/arm/mach-s

[PATCH v4 01/14] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport ---

[PATCH v4 00/14] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-04-14 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table

Re: [PATCH v2 4/4] hugetlbfs: clean up command line processing

2020-04-14 Thread Peter Xu
On Mon, Apr 13, 2020 at 10:59:26AM -0700, Mike Kravetz wrote: > On 4/10/20 1:37 PM, Peter Xu wrote: > > On Wed, Apr 01, 2020 at 11:38:19AM -0700, Mike Kravetz wrote: > >> With all hugetlb page processing done in a single file clean up code. > >> - Make code match desired semantics > >> - Update d

Re: [PATCH v6 2/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format

2020-04-14 Thread Rob Herring
On Wed, 1 Apr 2020 16:45:35 +0800, Shengjiu Wang wrote: > In order to support new EASRC and simplify the code structure, > We decide to share the common structure between them. This bring > a problem that EASRC accept format directly from devicetree, but > ASRC accept width from devicetree. > > I

Re: [PATCH 21/29] mm: remove the pgprot argument to __vmalloc

2020-04-14 Thread Wei Liu
On Tue, Apr 14, 2020 at 03:13:40PM +0200, Christoph Hellwig wrote: > The pgprot argument to __vmalloc is always PROT_KERNEL now, so remove > it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Michael Kelley [hyperv] > Acked-by: Gao Xiang [erofs] > Acked-by: Peter Zijlstra (Intel) > --- >

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-14 Thread David Hildenbrand
On 14.04.20 16:39, Baoquan He wrote: > On 04/14/20 at 11:37am, David Hildenbrand wrote: >> On 14.04.20 11:22, Baoquan He wrote: >>> On 04/14/20 at 10:00am, David Hildenbrand wrote: On 14.04.20 08:40, Baoquan He wrote: > On 04/13/20 at 08:15am, Eric W. Biederman wrote: >> Baoquan He wr

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

2020-04-14 Thread Nicholas Piggin
Excerpts from Christoph Hellwig's message of April 14, 2020 11:02 pm: > On Tue, Apr 14, 2020 at 10:13:44PM +1000, Nicholas Piggin wrote: >> Which case? Usually the answer would be because you don't want to use >> contiguous physical memory and/or you don't want to use the linear >> mapping. > > B

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-14 Thread Baoquan He
On 04/14/20 at 11:37am, David Hildenbrand wrote: > On 14.04.20 11:22, Baoquan He wrote: > > On 04/14/20 at 10:00am, David Hildenbrand wrote: > >> On 14.04.20 08:40, Baoquan He wrote: > >>> On 04/13/20 at 08:15am, Eric W. Biederman wrote: > Baoquan He writes: > > > On 04/12/20 at 02:5

[PATCH] iommu: spapr_tce: Disable compile testing to fix build on book3s_32 config

2020-04-14 Thread Krzysztof Kozlowski
Although SPAPR_TCE_IOMMU itself can be compile tested on certain PowerPC configurations, its presence makes arch/powerpc/kvm/Makefile to select modules which do not build in such configuration. The arch/powerpc/kvm/ modules use kvm_arch.spapr_tce_tables which exists only with CONFIG_PPC_BOOK3S_64.

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

2020-04-14 Thread Matthew Wilcox
On Tue, Apr 14, 2020 at 02:28:35PM +0200, Christophe Leroy wrote: > Le 13/04/2020 à 15:41, Matthew Wilcox a écrit : > > On Mon, Apr 13, 2020 at 10:53:03PM +1000, Nicholas Piggin wrote: > > > +static int vmap_pages_range_noflush(unsigned long start, unsigned long > > > end, > > > +

Re: [PATCH 3/8] signal: replace __copy_siginfo_to_user32 with to_compat_siginfo

2020-04-14 Thread Arnd Bergmann
On Tue, Apr 14, 2020 at 9:01 AM Christoph Hellwig wrote: > > Move copying the siginfo to userspace into the callers, so that the > compat_siginfo conversion can be reused by the ELF coredump code without > set_fs magic. > > Signed-off-by: Christoph Hellwig Looks all good to me, but I noticed tha

[PATCH 29/29] s390: use __vmalloc_node in stack_alloc

2020-04-14 Thread Christoph Hellwig
stack_alloc can use a slightly higher level vmalloc function. Signed-off-by: Christoph Hellwig Acked-by: Christian Borntraeger Acked-by: Peter Zijlstra (Intel) --- arch/s390/kernel/setup.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/s390/kernel/setup.c b/a

[PATCH 28/29] powerpc: use __vmalloc_node in alloc_vm_stack

2020-04-14 Thread Christoph Hellwig
alloc_vm_stack can use a slightly higher level vmalloc function. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- arch/powerpc/kernel/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 1

[PATCH 27/29] arm64: use __vmalloc_node in arch_alloc_vmap_stack

2020-04-14 Thread Christoph Hellwig
arch_alloc_vmap_stack can use a slightly higher level vmalloc function. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- arch/arm64/include/asm/vmap_stack.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/vmap_stack.h b/arch

[PATCH 26/29] mm: remove vmalloc_user_node_flags

2020-04-14 Thread Christoph Hellwig
Open code it in __bpf_map_area_alloc, which is the only caller. Also clean up __bpf_map_area_alloc to have a single vmalloc call with slightly different flags instead of the current two different calls. For this to compile for the nommu case add a __vmalloc_node_range stub to nommu.c. Signed-off

[PATCH 25/29] mm: switch the test_vmalloc module to use __vmalloc_node

2020-04-14 Thread Christoph Hellwig
No need to export the very low-level __vmalloc_node_range when the test module can use a slightly higher level variant. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- lib/test_vmalloc.c | 26 +++--- mm/vmalloc.c | 17 - 2 files ch

Re: [PATCH 4/8] binfmt_elf: open code copy_siginfo_to_user to kernelspace buffer

2020-04-14 Thread Arnd Bergmann
On Tue, Apr 14, 2020 at 9:02 AM Christoph Hellwig wrote: > > Instead of messing with the address limit just open code the trivial > memcpy + memset logic for the native version, and a call to > to_compat_siginfo for the compat version. > > Signed-off-by: Christoph Hellwig Nice! > */ > #defin

[PATCH 22/29] mm: remove the prot argument to __vmalloc_node

2020-04-14 Thread Christoph Hellwig
This is always PAGE_KERNEL now. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 35 ++- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 466a449b3a15..de7952959e82 100644 --- a/

[PATCH 24/29] mm: remove __vmalloc_node_flags_caller

2020-04-14 Thread Christoph Hellwig
Just use __vmalloc_node instead which gets and extra argument. To be able to to use __vmalloc_node in all caller make it available outside of vmalloc and implement it in nommu.c. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- include/linux/vmalloc.h | 4 ++-- kernel/bpf

[PATCH 23/29] mm: remove both instances of __vmalloc_node_flags

2020-04-14 Thread Christoph Hellwig
The real version just had a few callers that can open code it and remove one layer of indirection. The nommu stub was public but only had a single caller, so remove it and avoid a CONFIG_MMU ifdef in vmalloc.h. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- include/linux

[PATCH 21/29] mm: remove the pgprot argument to __vmalloc

2020-04-14 Thread Christoph Hellwig
The pgprot argument to __vmalloc is always PROT_KERNEL now, so remove it. Signed-off-by: Christoph Hellwig Reviewed-by: Michael Kelley [hyperv] Acked-by: Gao Xiang [erofs] Acked-by: Peter Zijlstra (Intel) --- arch/x86/hyperv/hv_init.c | 3 +-- arch/x86/include/asm/kvm_host.h

[PATCH 20/29] gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc

2020-04-14 Thread Christoph Hellwig
The non-cached vmalloc mapping was initially added as a hack for the first-gen amigaone platform (6xx/book32s), isn't fully supported upstream, and which used the legacy radeon driver together with non-coherent DMA. However this only ever worked reliably for DRI . Remove the hack as it is the last

[PATCH 19/29] mm: enforce that vmap can't map pages executable

2020-04-14 Thread Christoph Hellwig
To help enforcing the W^X protection don't allow remapping existing pages as executable. x86 bits from Peter Zijlstra , arm64 bits from Mark Rutland . Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- arch/arm64/include/asm/pgtable.h | 3 +++ arch/x86/include/asm/pgtabl

[PATCH 18/29] mm: remove the prot argument from vm_map_ram

2020-04-14 Thread Christoph Hellwig
This is always PAGE_KERNEL - for long term mappings with other properties vmap should be used. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c | 2 +- drivers/media/common/videobuf2/videobuf2-dma-sg.c | 3 +-- drivers/med

[PATCH 17/29] mm: remove unmap_vmap_area

2020-04-14 Thread Christoph Hellwig
This function just has a single caller, open code it there. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b0c7cdc8701a..258220b203f1 100644 --- a/

[PATCH 16/29] mm: remove map_vm_range

2020-04-14 Thread Christoph Hellwig
Switch all callers to map_kernel_range, which symmetric to the unmap side (as well as the _noflush versions). Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- Documentation/core-api/cachetlb.rst | 2 +- include/linux/vmalloc.h | 10 -- mm/vmalloc.c

[PATCH 15/29] mm: don't return the number of pages from map_kernel_range{, _noflush}

2020-04-14 Thread Christoph Hellwig
None of the callers needs the number of pages, and a 0 / -errno return value is a lot more intuitive. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a3d8

[PATCH 13/29] mm: remove vmap_page_range_noflush and vunmap_page_range

2020-04-14 Thread Christoph Hellwig
These have non-static aliases called map_kernel_range_noflush and unmap_kernel_range_noflush that just differ slightly in the calling conventions that pass addr + size instead of an end. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 98

[PATCH 14/29] mm: rename vmap_page_range to map_kernel_range

2020-04-14 Thread Christoph Hellwig
This matches the map_kernel_range_noflush API. Also change to pass a size instead of the end, similar to the noflush version. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mm/vm

[PATCH 12/29] mm: pass addr as unsigned long to vb_free

2020-04-14 Thread Christoph Hellwig
Ever use of addr in vb_free casts to unsigned long first, and the caller has an unsigned long version of the address available anyway. Just pass that and avoid all the casts. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 16 +++- 1 file change

[PATCH 11/29] mm: only allow page table mappings for built-in zsmalloc

2020-04-14 Thread Christoph Hellwig
This allows to unexport map_vm_area and unmap_kernel_range, which are rather deep internal and should not be available to modules, as they for example allow fine grained control of mapping permissions, and also allow splitting the setup of a vmalloc area and the actual mapping and thus expose vmall

[PATCH 09/29] mm: unexport unmap_kernel_range_noflush

2020-04-14 Thread Christoph Hellwig
There are no modular users of this function. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d1534d610b48..3375f9508ef6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2029,7

[PATCH 10/29] mm: rename CONFIG_PGTABLE_MAPPING to CONFIG_ZSMALLOC_PGTABLE_MAPPING

2020-04-14 Thread Christoph Hellwig
Rename the Kconfig variable to clarify the scope. Signed-off-by: Christoph Hellwig Acked-by: Minchan Kim Acked-by: Peter Zijlstra (Intel) --- arch/arm/configs/omap2plus_defconfig | 2 +- include/linux/zsmalloc.h | 2 +- mm/Kconfig | 2 +- mm/zsmalloc.c

[PATCH 08/29] mm: remove __get_vm_area

2020-04-14 Thread Christoph Hellwig
Switch the two remaining callers to use __get_vm_area_caller instead. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- arch/powerpc/kernel/pci_64.c | 3 ++- arch/sh/kernel/cpu/sh4/sq.c | 3 ++- include/linux/vmalloc.h | 2 -- mm/vmalloc.c | 8

[PATCH 07/29] powerpc: remove __ioremap_at and __iounmap_at

2020-04-14 Thread Christoph Hellwig
These helpers are only used for remapping the ISA I/O base. Replace the mapping side with a remap_isa_range helper in isa-bridge.c that hard codes all the known arguments, and just remove __iounmap_at in favour of open coding it in the only caller. Signed-off-by: Christoph Hellwig Acked-by: Pete

[PATCH 06/29] powerpc: add an ioremap_phb helper

2020-04-14 Thread Christoph Hellwig
Factor code shared between pci_64 and electra_cf into a ioremap_pbh helper that follows the normal ioremap semantics, and returns a useful __iomem pointer. Note that it opencodes __ioremap_at as we know from the callers the slab is available. Switch pci_64 to also store the result as __iomem poin

[PATCH 05/29] dma-mapping: use vmap insted of reimplementing it

2020-04-14 Thread Christoph Hellwig
Replace the open coded instance of vmap with the actual function. In the non-contiguous (IOMMU) case this requires an extra find_vm_area, but given that this isn't a fast path function that is a small price to pay. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- kernel/dm

[PATCH 04/29] staging: media: ipu3: use vmap instead of reimplementing it

2020-04-14 Thread Christoph Hellwig
Just use vmap instead of messing with vmalloc internals. Signed-off-by: Christoph Hellwig Acked-by: Peter Zijlstra (Intel) --- drivers/staging/media/ipu3/ipu3-css-pool.h | 4 +-- drivers/staging/media/ipu3/ipu3-dmamap.c | 30 ++ 2 files changed, 9 insertions(+), 25 deleti

[PATCH 03/29] staging: android: ion: use vmap instead of vm_map_ram

2020-04-14 Thread Christoph Hellwig
vm_map_ram can keep mappings around after the vm_unmap_ram. Using that with non-PAGE_KERNEL mappings can lead to all kinds of aliasing issues. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman Acked-by: Peter Zijlstra (Intel) --- drivers/staging/android/ion/ion_heap.c | 4 ++-- 1

[PATCH 02/29] x86: fix vmap arguments in map_irq_stack

2020-04-14 Thread Christoph Hellwig
vmap does not take a gfp_t, the flags argument is for VM_* flags. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/irq_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 12df3a4abfdd..6b32ab009c19 100644 --- a/ar

[PATCH 01/29] x86/hyperv: use vmalloc_exec for the hypercall page

2020-04-14 Thread Christoph Hellwig
Use the designated helper for allocating executable kernel memory, and remove the now unused PAGE_KERNEL_RX define. Signed-off-by: Christoph Hellwig Reviewed-by: Michael Kelley Acked-by: Wei Liu Acked-by: Peter Zijlstra (Intel) --- arch/x86/hyperv/hv_init.c| 2 +- arch/x86/include

decruft the vmalloc API v2

2020-04-14 Thread Christoph Hellwig
Hi all, Peter noticed that with some dumb luck you can toast the kernel address space with exported vmalloc symbols. I used this as an opportunity to decruft the vmalloc.c API and make it much more systematic. This also removes any chance to create vmalloc mappings outside the designated areas o

Re: [PATCH 1/2] mm, treewide: Rename kzfree() to kfree_sensitive()

2020-04-14 Thread David Howells
Waiman Long wrote: > As said by Linus: > > A symmetric naming is only helpful if it implies symmetries in use. > Otherwise it's actively misleading. > > In "kzalloc()", the z is meaningful and an important part of what the > caller wants. > > In "kzfree()", the z is actively detrimen

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

2020-04-14 Thread Christoph Hellwig
On Tue, Apr 14, 2020 at 10:13:44PM +1000, Nicholas Piggin wrote: > Which case? Usually the answer would be because you don't want to use > contiguous physical memory and/or you don't want to use the linear > mapping. But with huge pages you do by definition already use large contiguous areas. So

[PATCH 8/8] tracefs: switch to simplefs inode creation API

2020-04-14 Thread Emanuele Giuseppe Esposito
There is no semantic change intended; the code in the simplefs.c functions in fact was derived from debugfs and tracefs code. Signed-off-by: Emanuele Giuseppe Esposito --- fs/tracefs/inode.c | 86 -- 1 file changed, 7 insertions(+), 79 deletions(-) di

  1   2   >