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

2020-05-04 Thread Alexey Kardashevskiy
On 17/04/2020 17:58, Christoph Hellwig wrote: > On Wed, Apr 15, 2020 at 09:21:37PM +1000, Alexey Kardashevskiy wrote: >> And the fact they were exported leaves possibility that there is a >> driver somewhere relying on these symbols or distro kernel won't build >> because the symbol disappeared

Re: [PATCH v4 0/7] clean up redundant 'kvm_run' parameters

2020-05-04 Thread Tianjia Zhang
Paolo Bonzini, any opinion on this? Thanks and best, Tianjia On 2020/4/27 12:35, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters

Re: [PATCH 3/3] mm/hugetlb: Introduce HAVE_ARCH_CLEAR_HUGEPAGE_FLAGS

2020-05-04 Thread Anshuman Khandual
generate an compiler error but it doesn't. If it did we could > detect these incorrect inclusion orders. > >>> #endif >>> >>> And the various arch headers do >>> >>> static inline void arch_clear_hugepage_flags(struct page *page) >>>

Re: [PATCH v7 22/28] powerpc: Define new SRR1 bits for a future ISA version

2020-05-04 Thread Alistair Popple
Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:14 PM AEST Jordan Niethe wrote: > 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

Re: [PATCH v7 20/28] powerpc: Make test_translate_branch() independent of instruction length

2020-05-04 Thread Alistair Popple
I guess this could change if there were prefixed branch instructions, but there aren't so: Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:12 PM AEST Jordan Niethe wrote: > test_translate_branch() uses two pointers to instructions within a > buffer, p and q, to test patch_branch(). The

Re: [PATCH v7 19/28] powerpc/xmon: Move insertion of breakpoint for xol'ing

2020-05-04 Thread Alistair Popple
I can't see any side-effects from patching both instructions at the same time. Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:11 PM AEST Jordan Niethe wrote: > When a new breakpoint is created, the second instruction of that > breakpoint is patched with a trap instruction. This assumes

Re: [PATCH v7 18/28] powerpc/xmon: Use a function for reading instructions

2020-05-04 Thread Alistair Popple
Shouldn't change anything and will be correct once prefix instructions are defined. Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:10 PM AEST Jordan Niethe wrote: > Currently in xmon, mread() is used for reading instructions. In > preparation for prefixed instructions, create and use

Re: [PATCH v7 17/28] powerpc: Introduce a function for reporting instruction length

2020-05-04 Thread Alistair Popple
Looks good, Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:09 PM AEST Jordan Niethe wrote: > Currently all instructions have the same length, but in preparation for > prefixed instructions introduce a function for returning instruction > length. > > Signed-off-by: Jordan Niethe > ---

Re: [PATCH v7 16/28] powerpc: Define and use __get_user_instr{, inatomic}()

2020-05-04 Thread Alistair Popple
Doesn't change any behaviour from what I can see. Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:08 PM AEST Jordan Niethe wrote: > Define specific __get_user_instr() and __get_user_instr_inatomic() > macros for reading instructions from user space. > > Signed-off-by: Jordan Niethe >

Re: [PATCH v7 15/28] powerpc/kprobes: Use patch_instruction()

2020-05-04 Thread Alistair Popple
Without CONFIG_STRICT_KERNEL_RWX this boils down to doing the same thing (although with a few more safety checks along the way), and with CONFIG_STRICT_KERNEL_RWX this should make it actually work (although perhaps there was some other mechanism that made it work anyway). Reviewed-by: Alistair

Re: [PATCH V2 00/11] Subject: Remove duplicated kmap code

2020-05-04 Thread Ira Weiny
On Mon, May 04, 2020 at 10:02:25PM +0100, Al Viro wrote: > On Mon, May 04, 2020 at 01:17:41PM -0700, Ira Weiny wrote: > > > > || * arm: much, much worse. We have several files that pull > > > linux/highmem.h: > > > || arch/arm/mm/cache-feroceon-l2.c, arch/arm/mm/cache-xsc3l2.c, > > > ||

Re: [PATCH v2 2/5] stats_fs API: create, add and remove stats_fs sources and values

2020-05-04 Thread Randy Dunlap
On 5/4/20 4:03 AM, Emanuele Giuseppe Esposito wrote: > diff --git a/fs/Kconfig b/fs/Kconfig > index f08fbbfafd9a..1b0de0f19e96 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -328,4 +328,10 @@ source "fs/unicode/Kconfig" > config IO_WQ > bool > > +config STATS_FS > + bool

[powerpc:next] BUILD SUCCESS 140777a3d8dfdb3d3f20ea7707c0f1c0ce1b0aa5

2020-05-04 Thread kbuild test robot
randconfig-a001-20200503 sparc64 randconfig-a001-20200503 s390 randconfig-a001-20200504 xtensa randconfig-a001-20200504 sh randconfig-a001-20200504 openrisc randconfig-a001-20200504 csky randconfig-a001

[RFC][PATCH 2/2] Add support for ima buffer pass using reserved memory arm64

2020-05-04 Thread Prakhar Srivastava
Add support for ima buffer pass using reserved memory for arm64 kexec. Update the arch sepcific code path in kexec file load to store the ima buffer in the reserved memory. The same reserved memory is read on kexec or cold boot. Signed-off-by: Prakhar Srivastava --- arch/arm64/Kconfig

[RFC][PATCH 0/2] Add support for using reserved memory for ima buffer pass

2020-05-04 Thread Prakhar Srivastava
IMA during kexec(kexec file load) verifies the kernel signature and measures the signature of the kernel. The signature in the logs can be used to verfiy the authenticity of the kernel. The logs don not get carried over kexec and thus remote attesation cannot verify the signature of the running

[RFC][PATCH 1/2] Add a layer of abstraction to use the memory reserved by device tree for ima buffer pass.

2020-05-04 Thread Prakhar Srivastava
Introduce a device tree layer for to read and store ima buffer from the reserved memory section of a device tree. Signed-off-by: Prakhar Srivastava --- drivers/of/Kconfig | 6 ++ drivers/of/Makefile | 1 + drivers/of/of_ima.c | 165

Re: [PATCH 1/3] ASoC: fsl_esai: introduce SoC specific data

2020-05-04 Thread Nicolin Chen
On Fri, May 01, 2020 at 04:12:04PM +0800, Shengjiu Wang wrote: > Introduce a SoC specific data structure which contains the > differences between the different SoCs. > This makes it easier to support more differences without having > to introduce a new if/else each time. > > Signed-off-by:

Re: [PATCH V2 00/11] Subject: Remove duplicated kmap code

2020-05-04 Thread Al Viro
On Mon, May 04, 2020 at 01:17:41PM -0700, Ira Weiny wrote: > > || * arm: much, much worse. We have several files that pull > > linux/highmem.h: > > || arch/arm/mm/cache-feroceon-l2.c, arch/arm/mm/cache-xsc3l2.c, > > || arch/arm/mm/copypage-*.c, arch/arm/mm/dma-mapping.c, arch/arm/mm/flush.c, >

Re: [PATCH V2 11/11] drm: Remove drm specific kmap_atomic code

2020-05-04 Thread Ira Weiny
On Mon, May 04, 2020 at 01:18:51PM +0200, Daniel Vetter wrote: > On Mon, May 4, 2020 at 3:09 AM wrote: > > > > From: Ira Weiny > > > > kmap_atomic_prot() is now exported by all architectures. Use this > > function rather than open coding a driver specific kmap_atomic. > > > > Reviewed-by:

Re: [PATCH V2 00/11] Subject: Remove duplicated kmap code

2020-05-04 Thread Ira Weiny
On Mon, May 04, 2020 at 06:33:57AM +0100, Al Viro wrote: > On Sun, May 03, 2020 at 10:04:47PM -0700, Ira Weiny wrote: > > > Grepping for 'asm/highmem.h' and investigations don't reveal any issues... > > But > > you do have me worried. That said 0-day has been crunching on multiple > > versions

Re: [PATCH v2 17/20] mm: free_area_init: allow defining max_zone_pfn in descending order

2020-05-04 Thread Mike Rapoport
On Sun, May 03, 2020 at 11:43:00AM -0700, Guenter Roeck wrote: > On Sun, May 03, 2020 at 10:41:38AM -0700, Guenter Roeck wrote: > > Hi, > > > > On Wed, Apr 29, 2020 at 03:11:23PM +0300, Mike Rapoport wrote: > > > From: Mike Rapoport > > > > > > Some architectures (e.g. ARC) have the

Re: [PATCH v2] misc: new driver sram_uapi for user level SRAM access

2020-05-04 Thread kbuild test robot
Hi Wang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on char-misc/char-misc-testing] [also build test WARNING on arm-soc/for-next linus/master linux/master v5.7-rc3 next-20200501] [if your patch is applied to the wrong git tree, please drop us a note to help

[powerpc:merge] BUILD SUCCESS 1bc92fe3175eb26ff37e580c0383d7a9abe06835

2020-05-04 Thread kbuild test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge branch HEAD: 1bc92fe3175eb26ff37e580c0383d7a9abe06835 Automatic merge of branches 'master', 'next' and 'fixes' into merge elapsed time: 5894m configs tested: 248 configs skipped: 0 The following configs

[PATCH] powerpc/64/signal: balance return predictor stack in signal trampoline

2020-05-04 Thread Nicholas Piggin
Returning from an interrupt or syscall to a signal handler currently begins execution directly at the handler's entry point, with LR set to the address of the sigreturn trampoline. When the signal handler function returns, it runs the trampoline. It looks like this: # interrupt at user

Re: [PATCH 1/2] powerpc/spufs: fix copy_to_user while atomic

2020-05-04 Thread Christoph Hellwig
powerpc mantainers, are you going to pick this up for the next -rc1? I'm waiting for it to hit upstream before resending the coredump series. On Wed, Apr 29, 2020 at 03:03:02PM +0800, Jeremy Kerr wrote: > Currently, we may perform a copy_to_user (through > simple_read_from_buffer()) while

[PATCH] powerpc/64s/radix: Don't prefetch DAR in update_mmu_cache

2020-05-04 Thread Nicholas Piggin
The idea behind this prefetch was to kick off a page table walk before returning from the fault, getting some pipelining advantage. But this never showed up any noticable performance advantage, and in fact with KUAP the prefetches are actually blocked and cause some kind of micro-architectural

Re: [PATCH V2 11/11] drm: Remove drm specific kmap_atomic code

2020-05-04 Thread Daniel Vetter
On Mon, May 4, 2020 at 3:09 AM wrote: > > From: Ira Weiny > > kmap_atomic_prot() is now exported by all architectures. Use this > function rather than open coding a driver specific kmap_atomic. > > Reviewed-by: Christian König > Reviewed-by: Christoph Hellwig > Signed-off-by: Ira Weiny I'm

[PATCH v2 5/5] kvm_main: replace debugfs with stats_fs

2020-05-04 Thread Emanuele Giuseppe Esposito
Use stats_fs API instead of debugfs to create sources and add values. This also requires to change all architecture files to replace the old debugfs_entries with stats_fs_vcpu_entries and statsfs_vm_entries. The files/folders name and organization is kept unchanged, and a symlink in

[PATCH v2 4/5] stats_fs fs: virtual fs to show stats to the end-user

2020-05-04 Thread Emanuele Giuseppe Esposito
Add virtual fs that maps stats_fs sources with directories, and values (simple or aggregates) to files. Every time a file is read/cleared, the fs internally invokes the stats_fs API to get/set the requested value. fs/stats_fs/inode.c is pretty much similar to what is done in fs/debugfs/inode.c,

[PATCH v2 3/5] kunit: tests for stats_fs API

2020-05-04 Thread Emanuele Giuseppe Esposito
Add kunit tests to extensively test the stats_fs API functionality. In order to run them, the kernel .config must set CONFIG_KUNIT=y and a new .kunitconfig file must be created with CONFIG_STATS_FS=y and CONFIG_STATS_FS_TEST=y Tests can be then started by running the following command from the

[PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-04 Thread Emanuele Giuseppe Esposito
There is currently no common way for Linux kernel subsystems to expose statistics to userspace shared throughout the Linux kernel; subsystems have to take care of gathering and displaying statistics by themselves, for example in the form of files in debugfs. For example KVM has its own code

[PATCH v2 2/5] stats_fs API: create, add and remove stats_fs sources and values

2020-05-04 Thread Emanuele Giuseppe Esposito
Introduction to the stats_fs API, that allows to easily create, add and remove stats_fs sources and values. The API allows to easily building the statistics directory tree to automatically gather them for the linux kernel. The main functionalities are: create a source, add child

[PATCH v2 1/5] refcount, kref: add dec-and-test wrappers for rw_semaphores

2020-05-04 Thread Emanuele Giuseppe Esposito
Similar to the existing functions that take a mutex or spinlock if and only if a reference count is decremented to zero, these new function take an rwsem for writing just before the refcount reaches 0 (and call a user-provided function in the case of kref_put_rwsem). These will be used for

Re: [PATCH] powerpc/5200: update contact email

2020-05-04 Thread Michael Ellerman
Wolfram Sang writes: > My 'pengutronix' address is defunct for years. Merge the entries and use > the proper contact address. Is there any point adding the new address? It's just likely to bit-rot one day too. I figure the git history is a better source for more up-to-date emails. cheers >

Re: [PATCH] powerpc/64s: Fix unrecoverable SLB crashes due to preemption check

2020-05-04 Thread Michael Ellerman
Hugh Dickins writes: > On Sun, 3 May 2020, Michael Ellerman wrote: > >> Hugh reported that his trusty G5 crashed after a few hours under load >> with an "Unrecoverable exception 380". >> >> The crash is in interrupt_return() where we check lazy_irq_pending(), >> which calls get_paca() and with

Re: [PATCH 2/7] crypto: powerpc/sha1 - remove unused temporary workspace

2020-05-04 Thread Michael Ellerman
Eric Biggers writes: > From: Eric Biggers > > The PowerPC implementation of SHA-1 doesn't actually use the 16-word > temporary array that's passed to the assembly code. This was probably > meant to correspond to the 'W' array that lib/sha1.c uses. However, in > sha1-powerpc-asm.S these values

Re: [PATCH v2 3/3] mm/page_alloc: Keep memoryless cpuless node 0 offline

2020-05-04 Thread Michal Hocko
On Thu 30-04-20 12:48:20, Srikar Dronamraju wrote: > * Michal Hocko [2020-04-29 14:22:11]: > > > On Wed 29-04-20 07:11:45, Srikar Dronamraju wrote: > > > > > > > > > > By marking, N_ONLINE as NODE_MASK_NONE, lets stop assuming that Node > > > > > 0 is > > > > > always online. > > > > > > > >

Re: [PATCH v7 14/28] powerpc: Add a probe_kernel_read_inst() function

2020-05-04 Thread Alistair Popple
> @@ -524,7 +524,10 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned > long addr) struct module *mod = rec->arch.mod; > > /* read where this goes */ > - if (probe_kernel_read(op, ip, sizeof(op))) > + if (probe_kernel_read_inst(op, ip)) > + return -EFAULT; > + > +

[PATCH v2 2/2] powerpc/64s/hash: add torture_hpt kernel boot option to increase hash faults

2020-05-04 Thread Nicholas Piggin
This option increases the number of hash misses by limiting the number of kernel HPT entries, by accessing the address immediately after installing the PTE, then removing it again (except in the case of CI entries that must not be accessed, these are removed on the next hash fault). This helps

[PATCH v2 1/2] powerpc/64s/hash: add torture_slb kernel boot option to increase SLB faults

2020-05-04 Thread Nicholas Piggin
This option increases the number of SLB misses by limiting the number of kernel SLB entries, and increased flushing of cached lookaside information. This helps stress test difficult to hit paths in the kernel. Signed-off-by: Nicholas Piggin --- v2: - Address some comments from Aneesh about

Re: [PATCH v6 1/4] powerpc: Document details on H_SCM_HEALTH hcall

2020-05-04 Thread Vaibhav Jain
Thanks for looking into this patch Mpe, Michael Ellerman writes: > Vaibhav Jain writes: > >> Add documentation to 'papr_hcalls.rst' describing the bitmap flags >> that are returned from H_SCM_HEALTH hcall as per the PAPR-SCM >> specification. >> >> Cc: Dan Williams >> Cc: Michael Ellerman >>

Re: [PATCH v7 13/28] powerpc: Add a probe_user_read_inst() function

2020-05-04 Thread Alistair Popple
Looks good. Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:05 PM AEST Jordan Niethe wrote: > Introduce a probe_user_read_inst() function to use in cases where > probe_user_read() is used for getting an instruction. This will be more > useful for prefixed instructions. > >

Re: [PATCH v7 12/28] powerpc: Use a function for reading instructions

2020-05-04 Thread Alistair Popple
> diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c > index 31c870287f2b..6893d40a48c5 100644 > --- a/arch/powerpc/kernel/uprobes.c > +++ b/arch/powerpc/kernel/uprobes.c > @@ -174,7 +174,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, > struct pt_regs *regs)

Re: [PATCH 1/2] powerpc/64s/hash: add torture_slb kernel boot option to increase SLB faults

2020-05-04 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of May 4, 2020 5:27 pm: > Nicholas Piggin writes: > >> This option increases the number of SLB misses by limiting the number of >> kernel SLB entries, and increased flushing of cached lookaside information. >> This helps stress test difficult to hit paths

Re: [PATCH 2/2] powerpc/64s/hash: add torture_hpt kernel boot option to increase hash faults

2020-05-04 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of May 4, 2020 5:36 pm: > Nicholas Piggin writes: > >> This option increases the number of hash misses by limiting the number of >> kernel HPT entries. This helps stress test difficult to hit paths in the >> kernel. >> > > It would nice if we can explain

Re: [PATCH v7 08/28] powerpc: Use a function for getting the instruction op code

2020-05-04 Thread Alistair Popple
Looks good to me in that it doesn't look to change the behaviour of any existing code. Reviewed-by: Alistair Popple On Friday, 1 May 2020 1:42:00 PM AEST Jordan Niethe wrote: > In preparation for using a data type for instructions that can not be > directly used with the '>>' operator use a

Re: [PATCH 2/2] powerpc/64s/hash: add torture_hpt kernel boot option to increase hash faults

2020-05-04 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > This option increases the number of hash misses by limiting the number of > kernel HPT entries. This helps stress test difficult to hit paths in the > kernel. > It would nice if we can explain in commit message how we are limiting the number of HPT entries. >

Re: Build regressions/improvements in v5.7-rc4

2020-05-04 Thread Geert Uytterhoeven
On Mon, May 4, 2020 at 9:24 AM Geert Uytterhoeven wrote: > JFYI, when comparing v5.7-rc4[1] to v5.7-rc3[3], the summaries are: > - build errors: +3/-123 > [1] > http://kisskb.ellerman.id.au/kisskb/branch/linus/head/0e698dfa282211e414076f9dc7e83c1c288314fd/ > (all 239 configs) > [3] >

Re: [PATCH 1/2] powerpc/64s/hash: add torture_slb kernel boot option to increase SLB faults

2020-05-04 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > This option increases the number of SLB misses by limiting the number of > kernel SLB entries, and increased flushing of cached lookaside information. > This helps stress test difficult to hit paths in the kernel. > > Signed-off-by: Nicholas Piggin > +{ > +

Re: [PATCH] powerpc/mce: Add MCE notification chain

2020-05-04 Thread Ganesh
On 3/30/20 12:42 PM, Ganesh Goudar wrote: From: Santosh S Introduce notification chain which lets know about uncorrected memory errors(UE). This would help prospective users in pmem or nvdimm subsystem to track bad blocks for better handling of persistent memory allocations. Signed-off-by: