[PATCH v2 06/17] irqchip/gic-v3: Configure SGIs as standard interrupts

2020-06-24 Thread Marc Zyngier
Change the way we deal with GICv3 SGIs by turning them into proper IRQs, and calling into the arch code to register the interrupt range instead of a callback. Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 81 +++- 1 file changed, 43 insertions(+),

[PATCH v2 04/17] ARM: Allow IPIs to be handled as normal interrupts

2020-06-24 Thread Marc Zyngier
In order to deal with IPIs as normal interrupts, let's add a new way to register them with the architecture code. set_smp_ipi_range() takes a range of interrupts, and allows the arch code to request them as if the were normal interrupts. A standard handler is then called by the core IRQ code to de

[PATCH v2 03/17] arm64: Allow IPIs to be handled as normal interrupts

2020-06-24 Thread Marc Zyngier
In order to deal with IPIs as normal interrupts, let's add a new way to register them with the architecture code. set_smp_ipi_range() takes a range of interrupts, and allows the arch code to request them as if the were normal interrupts. A standard handler is then called by the core IRQ code to de

Re: [PATCH v8 4/4] mm/madvise: check fatal signal pending of target process

2020-06-24 Thread David Rientjes
On Mon, 22 Jun 2020, Minchan Kim wrote: > Bail out to prevent unnecessary CPU overhead if target process has pending > fatal signal during (MADV_COLD|MADV_PAGEOUT) operation. > > Link: http://lkml.kernel.org/r/20200302193630.68771-4-minc...@kernel.org > Signed-off-by: Minchan Kim > Reviewed-by:

Re: [PATCH v8 2/4] pid: move pidfd_get_pid() to pid.c

2020-06-24 Thread David Rientjes
On Mon, 22 Jun 2020, Minchan Kim wrote: > process_madvise syscall needs pidfd_get_pid function to translate pidfd to > pid so this patch move the function to kernel/pid.c. > > Link: http://lkml.kernel.org/r/20200302193630.68771-5-minc...@kernel.org > Signed-off-by: Minchan Kim > Reviewed-by: Sur

Re: [PATCH v8 3/4] mm/madvise: introduce process_madvise() syscall: an external memory hinting API

2020-06-24 Thread David Rientjes
On Mon, 22 Jun 2020, Minchan Kim wrote: > diff --git a/mm/madvise.c b/mm/madvise.c > index 551ed816eefe..23abca3f93fa 100644 > --- a/mm/madvise.c > +++ b/mm/madvise.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -995,6 +996,18

Re: [PATCH v8 1/4] mm/madvise: pass task and mm to do_madvise

2020-06-24 Thread David Rientjes
On Mon, 22 Jun 2020, Minchan Kim wrote: > Patch series "introduce memory hinting API for external process", v8. > > Now, we have MADV_PAGEOUT and MADV_COLD as madvise hinting API. With > that, application could give hints to kernel what memory range are > preferred to be reclaimed. However, in

[PATCH v2 17/17] ARM: Remove custom IRQ stat accounting

2020-06-24 Thread Marc Zyngier
Let's switch the arm code to the core accounting, which already does everything we need. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/hardirq.h | 17 - arch/arm/kernel/smp.c | 20 2 files changed, 4 insertions(+), 33 deletions(-) diff --git

[PATCH v2 14/17] arm64: Kill __smp_cross_call and co

2020-06-24 Thread Marc Zyngier
The old IPI registration interface is now unused on arm64, so let's get rid of it. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/irq_work.h | 4 +--- arch/arm64/include/asm/smp.h | 7 --- arch/arm64/kernel/smp.c | 34 +-- 3 files changed,

[PATCH v2 16/17] ARM: Kill __smp_cross_call and co

2020-06-24 Thread Marc Zyngier
The old IPI registration interface is now unused on arm, so let's get rid of it. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/smp.h | 6 -- arch/arm/kernel/smp.c | 22 +- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/arch/arm/include/asm/sm

[PATCH v2 15/17] arm64: Remove custom IRQ stat accounting

2020-06-24 Thread Marc Zyngier
Let's switch the arm64 code to the core accounting, which already does everything we need. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/hardirq.h | 9 - arch/arm64/kernel/smp.c | 24 ++-- 2 files changed, 6 insertions(+), 27 deletions(-) diff --gi

[PATCH v2 13/17] irqchip/armada-370-xp: Configure IPIs as standard interrupts

2020-06-24 Thread Marc Zyngier
To introduce IPIs as standard interrupts to the Armada 370-XP driver, let's allocate a completely separate irqdomain and irqchip combo that lives parallel to the "standard" one. This effectively should be modelled as a chained interrupt controller, but the code is in such a state that it is pretty

[PATCH v2 11/17] irqchip/bcm2836: Configure mailbox interrupts as standard interrupts

2020-06-24 Thread Marc Zyngier
In order to switch the bcm2836 driver to privide standard interrupts for IPIs, it first needs to stop lying about the way things work. The mailbox interrupt is actually a multiplexer, with enough bits to store 32 pending interrupts per CPU. So let's turn it into a chained irqchip. Once this is do

[PATCH v2 10/17] irqchip/gic-common: Don't enable SGIs by default

2020-06-24 Thread Marc Zyngier
The architecture code now enables the IPIs as required, so no need to enable SGIs by default in the GIC code. Signed-off-by: Marc Zyngier --- drivers/irqchip/irq-gic-common.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c

[PATCH v2 12/17] irqchip/hip04: Configure IPIs as standard interrupts

2020-06-24 Thread Marc Zyngier
In order to switch the hip04 driver to provide standard interrupts for IPIs, rework the way interrupts are allocated, making sure the irqdomain covers the SGIs as well as the rest of the interrupt range. The driver is otherwise so old-school that it creates all interrupts upfront (duh!), so there

Re: [PATCH kcsan 0/10] KCSAN updates for v5.9

2020-06-24 Thread Paul E. McKenney
On Wed, Jun 24, 2020 at 12:02:36PM -0700, Paul E. McKenney wrote: > On Mon, Jun 22, 2020 at 05:43:10PM -0700, Paul E. McKenney wrote: > > Hello! > > > > This series provides KCSAN updates: > > And three more, so that GCC can join Clang in the KCSAN fun. > > > 1. Annotate a data race in vm_area_

Re: power-off delay/hang due to commit 6d25be57 (mainline)

2020-06-24 Thread Sebastian Andrzej Siewior
On 2020-06-17 23:09:44 [+0200], Stephen Berman wrote: > > Attached. I did not forget about this but had recently little time to look into this. > Steve Berman Sebastian

[PATCH tip/core/rcu 0/17] kfree_rcu updates for v5.9

2020-06-24 Thread Paul E. McKenney
Hello! This series contains kfree_rcu() updates. Unless otherwise noted, these are all courtesy of Uladzislau Rezki. 1. Fix a kernel-doc warnings for "count", courtesy of Mauro Carvalho Chehab. 2. rcu/tree: Keep kfree_rcu() awake during lock contention, courtesy of Joe

[PATCH tip/core/rcu 09/17] rcu/tree: cache specified number of objects

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" In order to reduce the dynamic need for pages in kfree_rcu(), pre-allocate a configurable number of pages per CPU and link them in a list. When kfree_rcu() reclaims objects, the object's container page is cached into a list instead of being released to the low-leve

[PATCH tip/core/rcu 13/17] mm/list_lru.c: Rename kvfree_rcu() to local variant

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Rename kvfree_rcu() function to the kvfree_rcu_local() one. The purpose is to prevent a conflict of two same function declarations. The kvfree_rcu() will be globally visible what would lead to a build error. No functional change. Cc: linux...@kvack.org Cc: r...@vg

[PATCH tip/core/rcu 02/17] rcu/tree: Keep kfree_rcu() awake during lock contention

2020-06-24 Thread paulmck
From: "Joel Fernandes (Google)" On PREEMPT_RT kernels, the krcp spinlock gets converted to an rt-mutex and causes kfree_rcu() callers to sleep. This makes it unusable for callers in purely atomic sections such as non-threaded IRQ handlers and raw spinlock sections. Fix it by converting the spinlo

[PATCH tip/core/rcu 10/17] rcu/tree: Maintain separate array for vmalloc ptrs

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" To do so, we use an array of kvfree_rcu_bulk_data structures. It consists of two elements: - index number 0 corresponds to slab pointers. - index number 1 corresponds to vmalloc pointers. Keeping vmalloc pointers separated from slab pointers makes it possible to

[PATCH tip/core/rcu 07/17] rcu/tree: Move kfree_rcu_cpu locking/unlocking to separate functions

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Introduce helpers to lock and unlock per-cpu "kfree_rcu_cpu" structures. That will make kfree_call_rcu() more readable and prevent programming errors. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney --

[PATCH tip/core/rcu 16/17] rcu: Introduce single argument kvfree_rcu() interface

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Make kvfree_rcu() capable of freeing objects that will not embed an rcu_head within it. This saves storage overhead in such objects. Reclaiming headless objects this way requires only a single argument (pointer to the object). After this patch, there are two ways

[PATCH tip/core/rcu 01/17] rcu: Fix a kernel-doc warnings for "count"

2020-06-24 Thread paulmck
From: Mauro Carvalho Chehab There are some kernel-doc warnings: ./kernel/rcu/tree.c:2915: warning: Function parameter or member 'count' not described in 'kfree_rcu_cpu' This commit therefore moves the comment for "count" to the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab

[PATCH tip/core/rcu 08/17] rcu/tree: Use static initializer for krc.lock

2020-06-24 Thread paulmck
From: Sebastian Andrzej Siewior The per-CPU variable is initialized at runtime in kfree_rcu_batch_init(). This function is invoked before 'rcu_scheduler_active' is set to 'RCU_SCHEDULER_RUNNING'. After the initialisation, '->initialized' is to true. The raw_spin_lock is only acquired if '->initi

Re: [PATCH 1/2] selftests/lkdtm: Don't clear dmesg when running tests

2020-06-24 Thread Joe Lawrence
On Wed, Jun 24, 2020 at 10:39:55AM +0200, Petr Mladek wrote: > On Tue 2020-06-23 23:48:36, Joe Lawrence wrote: > > On 6/22/20 4:51 AM, Naresh Kamboju wrote: > > > On Fri, 8 May 2020 at 12:23, Michael Ellerman wrote: > > > > > > > > It is Very Rude to clear dmesg in test scripts. That's because th

[PATCH tip/core/rcu 15/17] rcu: Support reclaim for head-less object

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Update the kvfree_call_rcu() function with head-less support. This allows RCU to reclaim objects without an embedded rcu_head. tree-RCU: We introduce two chains of arrays to store SLAB-backed and vmalloc pointers, each. Storage in either of these arrays does not

[PATCH tip/core/rcu 03/17] rcu/tree: Skip entry into the page allocator for PREEMPT_RT

2020-06-24 Thread paulmck
From: "Joel Fernandes (Google)" To keep the kfree_rcu() code working in purely atomic sections on RT, such as non-threaded IRQ handlers and raw spinlock sections, avoid calling into the page allocator which uses sleeping locks on RT. In fact, even if the caller is preemptible, the kfree_rcu() c

[PATCH tip/core/rcu 17/17] lib/test_vmalloc.c: Add test cases for kvfree_rcu()

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Introduce four new test cases for testing the kvfree_rcu() interface. Two of them belong to single argument functionality and another two for 2-argument functionality. The aim is to stress and check how kvfree_rcu() behaves under different load and memory conditio

[PATCH tip/core/rcu 11/17] rcu/tiny: support vmalloc in tiny-RCU

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" Replace kfree() with kvfree() in rcu_reclaim_tiny(). This makes it possible to release either SLAB or vmalloc objects after a GP. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney --- kernel/rcu/tiny.c

[PATCH tip/core/rcu 14/17] rcu: Introduce 2 arg kvfree_rcu() interface

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" kvmalloc() can allocate two types of objects: SLAB backed and vmalloc backed. How it behaves depends on requested object's size and memory pressure. Add a kvfree_rcu() interface that can free memory allocated via kvmalloc(). It is a simple alias to kfree_rcu() whi

[PATCH tip/core/rcu 12/17] rcu: Rename *_kfree_callback/*_kfree_rcu_offset/kfree_call_*

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" The following changes are introduced: 1. Rename rcu_invoke_kfree_callback() to rcu_invoke_kvfree_callback(), as well as the associated trace events, so the rcu_kfree_callback(), becomes rcu_kvfree_callback(). The reason is to be aligned with kvfree() notation. 2.

[PATCH tip/core/rcu 04/17] rcu/tree: Repeat the monitor if any free channel is busy

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" It is possible that one of the channels cannot be detached because its free channel is busy and previously queued data has not been processed yet. On the other hand, another channel can be successfully detached causing the monitor work to stop. Prevent that by res

[PATCH tip/core/rcu 05/17] rcu/tree: Make debug_objects logic independent of rcu_head

2020-06-24 Thread paulmck
From: "Joel Fernandes (Google)" kfree_rcu()'s debug_objects logic uses the address of the object's embedded rcu_head to queue/unqueue. Instead of this, make use of the object's address itself as preparation for future headless kfree_rcu() support. Reviewed-by: Uladzislau Rezki Signed-off-by: Ul

[PATCH tip/core/rcu 06/17] rcu/tree: Simplify KFREE_BULK_MAX_ENTR macro

2020-06-24 Thread paulmck
From: "Uladzislau Rezki (Sony)" We can simplify KFREE_BULK_MAX_ENTR macro and get rid of magic numbers which were used to make the structure to be exactly one page. Suggested-by: Boqun Feng Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernand

Re: [PATCH v3 4/7] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
On Mon, Mar 2, 2020 at 11:13 AM Frank Rowand wrote: Sorry it took so long to respond. I am reviving this patchset now, about to send out a new revision and I just saw this comment. > On 2/27/20 7:20 PM, Brendan Higgins wrote: > > Remove KUnit from init calls entirely, instead call directly from

Re: [PATCH] crypto: ccp - Fix use of merged scatterlists

2020-06-24 Thread Tom Lendacky
On 6/22/20 3:24 PM, John Allen wrote: Running the crypto manager self tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS may result in several types of errors when using the ccp-crypto driver: alg: skcipher: cbc-des3-ccp encryption failed on test vector 0; expected_error=0, actual_error=-5 ... alg:

Re: [PATCH v3 4/7] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
On Mon, Mar 2, 2020 at 2:45 PM Kees Cook wrote: Sorry it took so long to respond. I am reviving this patchset now, about to send out a new revision and I just saw this comment. > On 2/27/20 7:20 PM, Brendan Higgins wrote: > > Remove KUnit from init calls entirely, instead call directly from > >

Re: [PATCH] mm: Skip opportunistic reclaim for dma pinned pages

2020-06-24 Thread Yang Shi
On Wed, Jun 24, 2020 at 12:21 PM Jason Gunthorpe wrote: > > On Wed, Jun 24, 2020 at 08:14:17PM +0100, Chris Wilson wrote: > > A general rule of thumb is that shrinkers should be fast and effective. > > They are called from direct reclaim at the most incovenient of times when > > the caller is wait

Re: [PATCH] mm: filemap: clear idle flag for writes

2020-06-24 Thread Yang Shi
On 6/24/20 12:50 PM, Shakeel Butt wrote: On Wed, Jun 24, 2020 at 12:18 PM Yang Shi wrote: On 6/24/20 11:53 AM, Andrew Morton wrote: On Thu, 25 Jun 2020 01:43:32 +0800 Yang Shi wrote: Since commit bbddabe2e436aa7869b3ac5248df5c14ddde0cbf ("mm: filemap: only do access activations on read

Re: [PATCH] drm/msm/dpu: add support for dither block in display

2020-06-24 Thread Rob Clark
On Wed, Jun 24, 2020 at 4:57 AM Kalyan Thota wrote: > > This change enables dither block for primary interface > in display. > > Enabled for 6bpc in the current version. > > Signed-off-by: Kalyan Thota > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 45 + > drivers/gpu/

drivers/spi/spi-fsl-lib.h:84:9: sparse: sparse: incorrect type in argument 1 (different base types)

2020-06-24 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3e08a95294a4fb3702bb3d35ed08028433c37fe6 commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH date: 7 months ago config: alpha-randconfig-s031-20200624 (attached as .config

Re: [rcu:rcu/next 35/35] kernel/rcu/tree.c:251:8: error: implicit declaration of function 'arch_atomic_add_return'; did you mean

2020-06-24 Thread Paul E. McKenney
On Thu, Jun 25, 2020 at 03:38:03AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git > rcu/next > head: 347acb93a34a6e4f312f8b9ec1afdb86d27858d2 > commit: 347acb93a34a6e4f312f8b9ec1afdb86d27858d2 [35/35] rcu: Fixup noinstr > warnings

Re: [PATCH] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

2020-06-24 Thread Marcelo Ricardo Leitner
On Tue, Jun 23, 2020 at 11:04:17AM -0500, miny...@acm.org wrote: > From: Corey Minyard > > If a socket was set ipv6only, it would still send IPv4 addresses in the > init and init ack packets. So don't add IPv4 addresses to ipv6only > sockets. > > Based on a patch by Xin Long > > Signed-off-by

[PATCH 03/22] kbuild: lto: fix module versioning

2020-06-24 Thread Sami Tolvanen
With CONFIG_MODVERSIONS, version information is linked into each compilation unit that exports symbols. With LTO, we cannot use this method as all C code is compiled into LLVM bitcode instead. This change collects symbol versions into .symversions files and merges them in link-vmlinux.sh where they

[PATCH 01/22] objtool: use sh_info to find the base for .rela sections

2020-06-24 Thread Sami Tolvanen
ELF doesn't require .rela section names to match the base section. Use the section index in sh_info to find the section instead of looking it up by name. LLD, for example, generates a .rela section that doesn't match the base section name when we merge sections in a linker script for a binary comp

[PATCH 00/22] add support for Clang LTO

2020-06-24 Thread Sami Tolvanen
This patch series adds support for building x86_64 and arm64 kernels with Clang's Link Time Optimization (LTO). In addition to performance, the primary motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) to be used in the kernel. Google's Pixel devices have shipped with LTO+CFI ker

[PATCH 02/22] kbuild: add support for Clang LTO

2020-06-24 Thread Sami Tolvanen
This change adds build system support for Clang's Link Time Optimization (LTO). With -flto, instead of ELF object files, Clang produces LLVM bitcode, which is compiled into native code at link time, allowing the final binary to be optimized globally. For more details, see: https://llvm.org/docs/

[PATCH 06/22] kbuild: lto: limit inlining

2020-06-24 Thread Sami Tolvanen
This change limits function inlining across translation unit boundaries in order to reduce the binary size with LTO. The -import-instr-limit flag defines a size limit, as the number of LLVM IR instructions, for importing functions from other TUs. The default value is 100, and decreasing it to 5 re

[PATCH 21/22] x86, relocs: Ignore L4_PAGE_OFFSET relocations

2020-06-24 Thread Sami Tolvanen
L4_PAGE_OFFSET is a constant value, so don't warn about absolute relocations. Signed-off-by: Sami Tolvanen --- arch/x86/tools/relocs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index ce7188cbdae5..8f3bf34840ce 100644 --- a/arch/x86/tool

[PATCH 20/22] x86, ftrace: disable recordmcount for ftrace_make_nop

2020-06-24 Thread Sami Tolvanen
Ignore mcount relocations in ftrace_make_nop. Signed-off-by: Sami Tolvanen --- arch/x86/kernel/ftrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 51504566b3a6..c3b28b81277b 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/ke

[PATCH 22/22] x86, build: allow LTO_CLANG and THINLTO to be selected

2020-06-24 Thread Sami Tolvanen
Allow CONFIG_LTO_CLANG and CONFIG_THINLTO to be enabled. Signed-off-by: Sami Tolvanen --- arch/x86/Kconfig | 2 ++ arch/x86/Makefile | 5 + 2 files changed, 7 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6a0cc524882d..df335b1f9c31 100644 --- a/arch/x86/Kconfig +++ b

[PATCH 04/22] kbuild: lto: fix recordmcount

2020-06-24 Thread Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until modpost_link. This change postpones calls to recordmcount until after this step. In order to exclude specific functions from inspection, we add a new code section .text..nomcount, which we tell recordmcount to ignore, and a __nomcount

[PATCH 18/22] arm64: allow LTO_CLANG and THINLTO to be selected

2020-06-24 Thread Sami Tolvanen
Allow CONFIG_LTO_CLANG and CONFIG_THINLTO to be enabled. Signed-off-by: Sami Tolvanen --- arch/arm64/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a4a094bedcb2..e1961653964d 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@

[PATCH 13/22] scripts/mod: disable LTO for empty.c

2020-06-24 Thread Sami Tolvanen
With CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object files. As empty.o is used for probing target properties, disable LTO for it to produce an object file instead. Signed-off-by: Sami Tolvanen --- scripts/mod/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/mo

[PATCH 14/22] efi/libstub: disable LTO

2020-06-24 Thread Sami Tolvanen
With CONFIG_LTO_CLANG, we produce LLVM bitcode instead of ELF object files. Since LTO is not really needed here and the Makefile assumes we produce an object file, disable LTO for libstub. Signed-off-by: Sami Tolvanen --- drivers/firmware/efi/libstub/Makefile | 2 ++ 1 file changed, 2 insertions

[PATCH 17/22] arm64: vdso: disable LTO

2020-06-24 Thread Sami Tolvanen
Filter out CC_FLAGS_LTO for the vDSO. Signed-off-by: Sami Tolvanen --- arch/arm64/kernel/vdso/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index 556d424c6f52..cfad4c296ca1 100644 --- a/arch/arm6

[PATCH 16/22] arm64: export CC_USING_PATCHABLE_FUNCTION_ENTRY

2020-06-24 Thread Sami Tolvanen
Since arm64 does not use -pg in CC_FLAGS_FTRACE with DYNAMIC_FTRACE_WITH_REGS, skip running recordmcount by exporting CC_USING_PATCHABLE_FUNCTION_ENTRY. Signed-off-by: Sami Tolvanen --- arch/arm64/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makef

[PATCH 19/22] x86, vdso: disable LTO only for vDSO

2020-06-24 Thread Sami Tolvanen
Remove the undefined DISABLE_LTO flag from the vDSO, and filter out CC_FLAGS_LTO flags instead where needed. Signed-off-by: Sami Tolvanen --- arch/x86/entry/vdso/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/M

[PATCH 10/22] init: lto: fix PREL32 relocations

2020-06-24 Thread Sami Tolvanen
With LTO, the compiler can rename static functions to avoid global naming collisions. As initcall functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub with a stable name for each initcall to fix the issue when PREL32 relocations ar

[PATCH 08/22] kbuild: lto: remove duplicate dependencies from .mod files

2020-06-24 Thread Sami Tolvanen
With LTO, llvm-nm prints out symbols for each archive member separately, which results in a lot of duplicate dependencies in the .mod file when CONFIG_TRIM_UNUSED_SYMS is enabled. When a module consists of several compilation units, the output can exceed the default xargs command size limit and spl

[PATCH 15/22] drivers/misc/lkdtm: disable LTO for rodata.o

2020-06-24 Thread Sami Tolvanen
Disable LTO for rodata.o to allow objcopy to be used to manipulate sections. Signed-off-by: Sami Tolvanen Acked-by: Kees Cook --- drivers/misc/lkdtm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile index c70b3822013f..dd4c936

[PATCH 07/22] kbuild: lto: merge module sections

2020-06-24 Thread Sami Tolvanen
LLD always splits sections with LTO, which increases module sizes. This change adds a linker script that merges the split sections in the final module and discards the .eh_frame section that LLD may generate. Suggested-by: Nick Desaulniers Signed-off-by: Sami Tolvanen --- Makefile

drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c:368:15: sparse: sparse: incorrect type in assignment (different address spaces)

2020-06-24 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 26e122e97a3d0390ebec389347f64f3730fdf48f commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces date: 6 days ago config: alpha-randconfig-s031-20200624 (attached

[PATCH 09/22] init: lto: ensure initcall ordering

2020-06-24 Thread Sami Tolvanen
With LTO, the compiler doesn't necessarily obey the link order for initcalls, and initcall variables need globally unique names to avoid collisions at link time. This change exports __KBUILD_MODNAME and adds the initcall_id() macro, which uses it together with __COUNTER__ and __LINE__ to help ensu

[PATCH 11/22] pci: lto: fix PREL32 relocations

2020-06-24 Thread Sami Tolvanen
With LTO, the compiler can rename static functions to avoid global naming collisions. As PCI fixup functions are typically static, renaming can break references to them in inline assembly. This change adds a global stub to DECLARE_PCI_FIXUP_SECTION to fix the issue when PREL32 relocations are used.

[PATCH net] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

2020-06-24 Thread Marcelo Ricardo Leitner
If a socket is set ipv6only, it will still send IPv4 addresses in the INIT and INIT_ACK packets. This potentially misleads the peer into using them, which then would cause association termination. The fix is to not add IPv4 addresses to ipv6only sockets. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") R

[PATCH 12/22] modpost: lto: strip .lto from module names

2020-06-24 Thread Sami Tolvanen
With LTO, everything is compiled into LLVM bitcode, so we have to link each module into native code before modpost. Kbuild uses the .lto.o suffix for these files, which also ends up in module information. This change strips the unnecessary .lto suffix from the module name. Suggested-by: Bill Wendl

Re: [PATCH 01/26] mm: Do page fault accounting in handle_mm_fault

2020-06-24 Thread Peter Xu
On Wed, Jun 24, 2020 at 08:49:03PM +0200, Gerald Schaefer wrote: > On Fri, 19 Jun 2020 12:05:13 -0400 > Peter Xu wrote: > > [...] > > > @@ -4393,6 +4425,38 @@ vm_fault_t handle_mm_fault(struct vm_area_struct > > *vma, unsigned long address, > > mem_cgroup_oom_synchronize(fal

[PATCH 05/22] kbuild: lto: postpone objtool

2020-06-24 Thread Sami Tolvanen
With LTO, LLVM bitcode won't be compiled into native code until modpost_link, or modfinal for modules. This change postpones calls to objtool until after these steps. Signed-off-by: Sami Tolvanen --- include/linux/compiler.h | 2 +- lib/Kconfig.debug | 2 +- scripts/Makefile.build

Re: [PATCH drivers/misc 0/4] lkdtm: Various clean ups

2020-06-24 Thread Kees Cook
On Wed, Jun 24, 2020 at 09:23:25AM +0200, Richard Weinberger wrote: > - Ursprüngliche Mail - > >>> Regardless, it seems arch/x86/um/asm/desc.h is not needed any more? > > > >> True that, we can rip the file. > > > > Has anyone fixed the uml build errors? > > I didn't realize that this is

Re: [Patch v3 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-24 Thread Nitesh Narayan Lal
On 6/24/20 8:13 AM, Frederic Weisbecker wrote: > On Tue, Jun 23, 2020 at 03:23:29PM -0400, Nitesh Narayan Lal wrote: >> From: Alex Belits >> >> The current implementation of cpumask_local_spread() does not respect the >> isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, >>

Re: [Patch v3 1/3] lib: Restrict cpumask_local_spread to houskeeping CPUs

2020-06-24 Thread Nitesh Narayan Lal
On 6/24/20 3:26 PM, Andrew Morton wrote: > On Tue, 23 Jun 2020 15:23:29 -0400 Nitesh Narayan Lal > wrote: > >> From: Alex Belits >> >> The current implementation of cpumask_local_spread() does not respect the >> isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, >> it will

Re: [PATCH 18/26] mm/s390: Use general page fault accounting

2020-06-24 Thread Peter Xu
On Wed, Jun 24, 2020 at 08:49:30PM +0200, Gerald Schaefer wrote: > On Fri, 19 Jun 2020 12:13:35 -0400 > Peter Xu wrote: > > > Use the general page fault accounting by passing regs into > > handle_mm_fault(). > > It naturally solve the issue of multiple page fault accounting when page > > fault

Re: [PATCH v5 3/3] media: vimc: Add a control to display info on test image

2020-06-24 Thread kernel test robot
Hi Kaaira, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v5.8-rc2 next-20200624] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in

Re: [PATCH] mm: Skip opportunistic reclaim for dma pinned pages

2020-06-24 Thread John Hubbard
On 2020-06-24 12:21, Jason Gunthorpe wrote: On Wed, Jun 24, 2020 at 08:14:17PM +0100, Chris Wilson wrote: A general rule of thumb is that shrinkers should be fast and effective. They are called from direct reclaim at the most incovenient of times when the caller is waiting for a page. If we atte

Re: [PATCH v3 4/7] init: main: add KUnit to kernel init

2020-06-24 Thread Kees Cook
On Wed, Jun 24, 2020 at 01:20:35PM -0700, Brendan Higgins wrote: > On Mon, Mar 2, 2020 at 2:45 PM Kees Cook wrote: > > Now, I realize kunit tests _should_ be self-contained, but this seems > > like a possible robustness problem. Is there any reason this can't be > > moved after rcu_end_inkernel_bo

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2020 at 10:59:47AM -0700, Stefano Stabellini wrote: > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > On Wed, Jun 24, 2020 at 05:17:32PM +0800, Peng Fan wrote: > > > Export xen_swiotlb for all platforms using xen swiotlb > > > > > > Use xen_swiotlb to determine when vring should

[PATCH] mm: filemap: add missing FGP_ flags in kerneldoc comment for pagecache_get_page

2020-06-24 Thread Yang Shi
FGP_{WRITE|NOFS|NOWAIT} were missed in pagecache_get_page's kerneldoc comment. Signed-off-by: Yang Shi --- mm/filemap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/filemap.c b/mm/filemap.c index 0589aef..9b47ffe 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1590,6 +1590,9 @@ str

Re: [PATCH net] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

2020-06-24 Thread Corey Minyard
On Wed, Jun 24, 2020 at 05:34:18PM -0300, Marcelo Ricardo Leitner wrote: > If a socket is set ipv6only, it will still send IPv4 addresses in the > INIT and INIT_ACK packets. This potentially misleads the peer into using > them, which then would cause association termination. > > The fix is to not

Re: [PATCH 02/22] kbuild: add support for Clang LTO

2020-06-24 Thread Nick Desaulniers
On Wed, Jun 24, 2020 at 1:32 PM Sami Tolvanen wrote: > > This change adds build system support for Clang's Link Time > Optimization (LTO). With -flto, instead of ELF object files, Clang > produces LLVM bitcode, which is compiled into native code at link > time, allowing the final binary to be opti

Re: [PATCH 13/22] scripts/mod: disable LTO for empty.c

2020-06-24 Thread Nick Desaulniers
On Wed, Jun 24, 2020 at 1:33 PM Sami Tolvanen wrote: > > With CONFIG_LTO_CLANG, clang generates LLVM IR instead of ELF object > files. As empty.o is used for probing target properties, disable LTO > for it to produce an object file instead. > > Signed-off-by: Sami Tolvanen Reviewed-by: Nick Desa

[PATCH v4 04/11] arch: powerpc: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to powerpc where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/powerpc/ke

[PATCH v4 08/11] init: main: add KUnit to kernel init

2020-06-24 Thread Brendan Higgins
Remove KUnit from init calls entirely, instead call directly from kernel_init(). Co-developed-by: Alan Maguire Signed-off-by: Alan Maguire Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- include/kunit/test.h | 9 + init/main.c | 4 lib/kunit/executor.c | 4 +

[PATCH v4 05/11] arch: um: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to UML where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boy

[PATCH v4 02/11] arch: arm64: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to arm64 where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/arm64/kernel

[PATCH v4 00/11] kunit: create a centralized executor to dispatch all KUnit tests

2020-06-24 Thread Brendan Higgins
## TL;DR This patchset adds a centralized executor to dispatch tests rather than relying on late_initcall to schedule each test suite separately along with a couple of new features that depend on it. Also, sorry for the extreme delay in getting this out. Part of the delay came from finding that t

[PATCH v4 07/11] kunit: test: create a single centralized executor for all tests

2020-06-24 Thread Brendan Higgins
From: Alan Maguire Add a centralized executor to dispatch tests rather than relying on late_initcall to schedule each test suite separately. Centralized execution is for built-in tests only; modules will execute tests when loaded. Signed-off-by: Alan Maguire Co-developed-by: Iurii Zaikin Sign

[PATCH v4 06/11] arch: xtensa: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to xtensa where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/xtensa/kern

[PATCH v4 03/11] arch: microblaze: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section to microblaze where KUnit can put references to its test suites. This patch is an early step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Signed-off-by: Brendan Higgins --- arch/microbl

Re: [PATCH 17/22] arm64: vdso: disable LTO

2020-06-24 Thread Nick Desaulniers
On Wed, Jun 24, 2020 at 1:33 PM Sami Tolvanen wrote: > > Filter out CC_FLAGS_LTO for the vDSO. Just curious about this patch (and the following one for x86's vdso), do you happen to recall specifically what the issues with the vdso's are? > > Signed-off-by: Sami Tolvanen > --- > arch/arm64/ker

[PATCH v4 09/11] kunit: test: add test plan to KUnit TAP format

2020-06-24 Thread Brendan Higgins
TAP 14 allows an optional test plan to be emitted before the start of the start of testing[1]; this is valuable because it makes it possible for a test harness to detect whether the number of tests run matches the number of tests expected to be run, ensuring that no tests silently failed. Link[1]:

[PATCH v4 11/11] Documentation: kunit: add a brief blurb about kunit_test_suite

2020-06-24 Thread Brendan Higgins
Add a brief blurb saying how and when the kunit_test_suite() macro works to the usage documentation. Signed-off-by: Brendan Higgins --- Documentation/dev-tools/kunit/usage.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-to

[PATCH v4 10/11] Documentation: Add kunit_shutdown to kernel-parameters.txt

2020-06-24 Thread Brendan Higgins
Add kunit_shutdown, an option to specify that the kernel shutsdown after running KUnit tests, to the kernel-parameters.txt documentation. Signed-off-by: Brendan Higgins Reviewed-by: Stephen Boyd --- Documentation/admin-guide/kernel-parameters.txt | 8 1 file changed, 8 insertions(+) d

[PATCH v4 01/11] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-24 Thread Brendan Higgins
Add a linker section where KUnit can put references to its test suites. This patch is the first step in transitioning to dispatching all KUnit tests from a centralized executor rather than having each as its own separate late_initcall. Co-developed-by: Iurii Zaikin Signed-off-by: Iurii Zaikin Si

Re: [RFC] MFD's relationship with Device Tree (OF)

2020-06-24 Thread Frank Rowand
+Frank (me) On 2020-06-22 16:03, Michael Walle wrote: > Am 2020-06-14 12:26, schrieb Michael Walle: >> Hi Rob, >> >> Am 2020-06-10 00:03, schrieb Rob Herring: >> [..] >>> Yes, we should use 'reg' whenever possible. If we don't have 'reg', >>> then you shouldn't have a unit-address either and you c

Re: [PATCH] mm: Skip opportunistic reclaim for dma pinned pages

2020-06-24 Thread Yang Shi
On Wed, Jun 24, 2020 at 1:23 PM Yang Shi wrote: > > On Wed, Jun 24, 2020 at 12:21 PM Jason Gunthorpe wrote: > > > > On Wed, Jun 24, 2020 at 08:14:17PM +0100, Chris Wilson wrote: > > > A general rule of thumb is that shrinkers should be fast and effective. > > > They are called from direct reclaim

Re: [PATCH 07/22] kbuild: lto: merge module sections

2020-06-24 Thread Nick Desaulniers
On Wed, Jun 24, 2020 at 1:33 PM Sami Tolvanen wrote: > > LLD always splits sections with LTO, which increases module sizes. This > change adds a linker script that merges the split sections in the final > module and discards the .eh_frame section that LLD may generate. For discarding .eh_frame, K

Re: [PATCH v2 net-next] net: core: use listified Rx for GRO_NORMAL in napi_gro_receive()

2020-06-24 Thread Jason A. Donenfeld
Hi Alexander, This patch introduced a behavior change around GRO_DROP: napi_skb_finish used to sometimes return GRO_DROP: > -static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb) > +static gro_result_t napi_skb_finish(struct napi_struct *napi, > +

<    1   2   3   4   5   6   7   8   9   10   >