Re: [PATCH] Revert "net: linkwatch: add check for netdevice being present to linkwatch_do_dev"

2020-09-23 Thread Saeed Mahameed
On Wed, 2020-09-23 at 17:23 -0700, David Miller wrote: > From: David Miller > Date: Wed, 23 Sep 2020 17:21:25 -0700 (PDT) > > > If an async code path tests 'present', gets true, and then the RTNL > > holding synchronous code path puts the device into D3hot > immediately > > afterwards, the async

Re: [PATCH] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2

2020-09-23 Thread Trent Piepho
On Wed, Sep 23, 2020 at 10:43 PM Tony Lindgren wrote: > > * Trent Piepho [200924 01:34]: > > On Tue, Sep 22, 2020 at 11:57 PM Tony Lindgren wrote: > > > > > > Also FYI, folks have also complained for a long time that the > > > pinctrl-single > > > binding mixes mux and conf values while they

Re: [Linux-stm32] [PATCH 3/3] ARM: dts: stm32: update stm32mp151 for remote proc synchronisation support

2020-09-23 Thread Ahmad Fatoum
Hello Arnaud, On 8/27/20 9:21 AM, Arnaud Pouliquen wrote: > Two backup registers are used to store the Cortex-M4 state and the resource > table address. > Declare the tamp node and add associated properties in m4_rproc node > to allow Linux to attach to a firmware loaded by the first boot stages.

Re: [PATCH] ARM: dts: document pinctrl-single,pins when #pinctrl-cells = 2

2020-09-23 Thread Tony Lindgren
* Trent Piepho [200924 01:34]: > On Tue, Sep 22, 2020 at 11:57 PM Tony Lindgren wrote: > > > > Also FYI, folks have also complained for a long time that the pinctrl-single > > binding mixes mux and conf values while they should be handled separately. > > > > Instead of combining two fields when

Re: [PATCH v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-23 Thread Alexandru Ardelean
On Thu, Sep 24, 2020 at 7:53 AM Moritz Fischer wrote: > > Hi Stephen, > > On Wed, Sep 23, 2020 at 04:58:33PM -0700, Stephen Boyd wrote: > > Quoting Alexandru Ardelean (2020-09-22 23:22:33) > > > On Tue, Sep 22, 2020 at 10:42 PM Stephen Boyd wrote: > > > > > > > > Quoting Moritz Fischer

Re: [PATCH printk 3/5] printk: use buffer pool for sprint buffers

2020-09-23 Thread Sergey Senozhatsky
On (20/09/23 17:11), Petr Mladek wrote: > > AFAIK, there is one catch. We need to use va_copy() around > the 1st call because va_format can be proceed only once. > Current printk() should be good enough for reporting, say, "Kernel stack overflow" errors. Is extra pressure that va_copy() adds

[PATCH] Input: trackpoint - enable Synaptics trackpoints

2020-09-23 Thread Vincent Huang
Add Synaptics IDs in trackpoint_start_protocol() to mark them as valid. Signed-off-by: Vincent Huang --- drivers/input/mouse/trackpoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index 854d5e758724..ef2fa0905208

Re: [PATCH] KVM: Enable hardware before doing arch VM initialization

2020-09-23 Thread Christian Borntraeger
On 23.09.20 20:57, Sean Christopherson wrote: > Swap the order of hardware_enable_all() and kvm_arch_init_vm() to > accommodate Intel's Trust Domain Extension (TDX), which needs VMX to be > fully enabled during VM init in order to make SEAMCALLs. > > This also provides consistent ordering

Re: [PATCH] doc: zh_CN: add translatation for btrfs

2020-09-23 Thread Alex Shi
Hi Qing, It looks like all vivo guys patch has 'charset=y' problem and mess code which fails on a success 'git am'. I have to repeat the same reminder again and again... Could you guys double your patches before send out? and make sure docs looks good on webpage, like

[PATCH v3] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-23 Thread Chris Goldsworthy
V1: Introduces a retry loop that attempts a CMA allocation a finite number of times before giving up: https://lkml.org/lkml/2020/8/5/1097 https://lkml.org/lkml/2020/8/11/893 V2: Introduces an indefinite retry for CMA allocations. David Hildenbrand raised a page pinning example which precludes

[PATCH v3] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-23 Thread Chris Goldsworthy
CMA allocations will fail if 'pinned' pages are in a CMA area, since we cannot migrate pinned pages. The _refcount of a struct page being greater than _mapcount for that page can cause pinning for anonymous pages. This is because try_to_unmap(), which (1) is called in the CMA allocation path, and

[PATCH] rpadlpar_io:Add MODULE_DESCRIPTION entries to kernel modules

2020-09-23 Thread Mamatha Inamdar
This patch adds a brief MODULE_DESCRIPTION to rpadlpar_io kernel modules (descriptions taken from Kconfig file) Signed-off-by: Mamatha Inamdar --- drivers/pci/hotplug/rpadlpar_core.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/hotplug/rpadlpar_core.c

Re: [PATCH v2] mm: cma: indefinitely retry allocations in cma_alloc

2020-09-23 Thread Chris Goldsworthy
On 2020-09-17 10:54, Chris Goldsworthy wrote: On 2020-09-15 00:53, David Hildenbrand wrote: On 14.09.20 20:33, Chris Goldsworthy wrote: On 2020-09-14 02:31, David Hildenbrand wrote: On 11.09.20 21:17, Chris Goldsworthy wrote: So, inside of cma_alloc(), instead of giving up when

Re: [PATCH v2] powerpc/pci: unmap legacy INTx interrupts when a PHB is removed

2020-09-23 Thread Alexey Kardashevskiy
On 23/09/2020 17:06, Cédric Le Goater wrote: > On 9/23/20 2:33 AM, Qian Cai wrote: >> On Fri, 2020-08-07 at 12:18 +0200, Cédric Le Goater wrote: >>> When a passthrough IO adapter is removed from a pseries machine using >>> hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the

Re: [PATCH v3 2/3] misc: bcm-vk: add Broadcom VK driver

2020-09-23 Thread Greg Kroah-Hartman
On Wed, Sep 23, 2020 at 09:43:55PM -0700, Scott Branden wrote: > >> +struct bcm_vk_tty { > >> + struct tty_port port; > >> + uint32_t to_offset; /* bar offset to use */ > >> + uint32_t to_size; /* to VK buffer size */ > >> + uint32_t wr;/* write offset shadow */ > >> +

Re: [PATCH -next] crypto: qat - remove unnecessary mutex_init()

2020-09-23 Thread Giovanni Cabiddu
On Wed, Sep 16, 2020 at 07:21:21AM +0100, Qinglang Miao wrote: > The mutex adf_ctl_lock is initialized statically. It is > unnecessary to initialize by mutex_init(). > > Signed-off-by: Qinglang Miao Acked-by: Giovanni Cabiddu > --- > drivers/crypto/qat/qat_common/adf_ctl_drv.c | 2 -- > 1

Re: [PATCH -next] crypto: qat - convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-23 Thread Giovanni Cabiddu
On Wed, Sep 16, 2020 at 03:50:17AM +0100, Liu Shixin wrote: > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin Acked-by: Giovanni Cabiddu > --- > drivers/crypto/qat/qat_common/adf_cfg.c | 19 + > .../qat/qat_common/adf_transport_debug.c |

Re: [PATCH V2] rcu/tree: Correctly handle single cpu check in rcu_blocking_is_gp

2020-09-23 Thread Neeraj Upadhyay
Hi Paul, On 9/24/2020 2:33 AM, Paul E. McKenney wrote: On Wed, Sep 23, 2020 at 12:59:33PM +0530, Neeraj Upadhyay wrote: Currently, for non-preempt kernels (with CONFIG_PREEMPTION=n), rcu_blocking_is_gp() checks (with preemption disabled), whether there is only one cpu online. It uses

[PATCH v2 1/2] dt-bindings: arm: fsl: add Protonic WD3 board

2020-09-23 Thread Oleksij Rempel
Add Protonic Holland WD3 iMX6qp based board Signed-off-by: Oleksij Rempel --- Documentation/devicetree/bindings/arm/fsl.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index

[PATCH v2 0/2] mainline Protonic WD3 board

2020-09-23 Thread Oleksij Rempel
changes v2: - fix comment: WD2 -> WD3 Oleksij Rempel (2): dt-bindings: arm: fsl: add Protonic WD3 board ARM: dts: add Protonic WD3 board .../devicetree/bindings/arm/fsl.yaml | 1 + arch/arm/boot/dts/Makefile| 1 + arch/arm/boot/dts/imx6qp-prtwd3.dts

[PATCH v2 2/2] ARM: dts: add Protonic WD3 board

2020-09-23 Thread Oleksij Rempel
Protonic WD3 is a proof of concept platform for tractor e-cockpit applications Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/imx6qp-prtwd3.dts | 553 2 files changed, 554 insertions(+) create mode 100644

[PATCH 2/2] Register IPI_CPU_CRASH_STOP IPI as pseudo-NMI

2020-09-23 Thread Yuichi Ito
Register IPI_CPU_CRASH_STOP IPI as pseudo-NMI. For systems that do not support pseudo-NMI, register as a normal IRQ. Signed-off-by: Yuichi Ito --- arch/arm64/kernel/smp.c | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git

[PATCH 0/2] Enable support IPI_CPU_CRASH_STOP to be pseudo-NMI

2020-09-23 Thread Yuichi Ito
Enable support IPI_CPU_CRASH_STOP to be pseudo-NMI This patchset enables IPI_CPU_CRASH_STOP IPI to be pseudo-NMI. This allows kdump to collect system information even when the CPU is in a HARDLOCKUP state. Only IPI_CPU_CRASH_STOP uses NMI and the other IPIs remain normal IRQs. The patch has

[PATCH 1/2] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-09-23 Thread Yuichi Ito
From: Sumit Garg Add support to handle SGIs as regular NMIs. As SGIs or IPIs defaults to a special flow handler: handle_percpu_devid_fasteoi_ipi(), so skip NMI handler update in case of SGIs. Also, enable NMI support prior to gic_smp_init() as allocation of SGIs as IRQs/NMIs happen as part of

Re: [PATCH v2 0/6] clk: axi-clk-gen: misc updates to the driver

2020-09-23 Thread Moritz Fischer
Hi Stephen, On Wed, Sep 23, 2020 at 04:58:33PM -0700, Stephen Boyd wrote: > Quoting Alexandru Ardelean (2020-09-22 23:22:33) > > On Tue, Sep 22, 2020 at 10:42 PM Stephen Boyd wrote: > > > > > > Quoting Moritz Fischer (2020-09-14 19:41:38) > > > > On Mon, Sep 14, 2020 at 11:11:05AM +0300,

Re: [PATCH] iommu: of: skip iommu_device_list traversal in of_iommu_xlate()

2020-09-23 Thread Charan Teja Kalla
On 9/23/2020 9:54 PM, Robin Murphy wrote: > On 2020-09-23 15:53, Charan Teja Reddy wrote: >> In of_iommu_xlate(), check if iommu device is enabled before traversing >> the iommu_device_list through iommu_ops_from_fwnode(). It is of no use >> in traversing the iommu_device_list only to return

drivers/gpu/drm/ingenic/ingenic-drm-drv.c:(.text.ingenic_drm_bind+0x790): undefined reference to `clk_get_parent'

2020-09-23 Thread kernel test robot
Hi Paul, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c9c9e6a49f8998e9334507378c08cc16cb3ec0e5 commit: fc1acf317b01083d47228c0d21cfc0764f37a04e drm/ingenic: Add support for the IPU date: 10 weeks ago config:

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
On Thu, Sep 24, 2020 at 06:44:12AM +0200, Dmitry Vyukov wrote: > > FWIW one of the dups of this issue was bisected to: > > commit 1909760f5fc3f123e47b4e24e0ccdc0fc8f3f106 > Author: Ahmed S. Darwish > Date: Fri Sep 4 15:32:31 2020 + > > seqlock: PREEMPT_RT: Do not starve seqlock_t

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Dmitry Vyukov
On Thu, Sep 24, 2020 at 6:36 AM Herbert Xu wrote: > > On Sun, Sep 20, 2020 at 01:22:14PM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:5fa35f24 Add linux-next specific files for 20200916 > > git tree: linux-next > > console output:

Re: inconsistent lock state in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
On Wed, Sep 16, 2020 at 01:51:14AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:6b02addb Add linux-next specific files for 20200915 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=15888efd90 > kernel

Re: possible deadlock in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

IRREVOCABLE COMPENSATION PAYMENT OF $750,000.00 DOLLARS VIA ATM VISA CARD

2020-09-23 Thread UNITED NATIONS
IRREVOCABLE COMPENSATION PAYMENT OF $750,000.00 DOLLARS VIA ATM VISA CARD We sincerely apologize for the unnecessary delay of your compensation payment. This delay was cursed due to the current EPIDEMIC outbreak that frustrated all effort made to contact you. We have actually been authorized by

Re: possible deadlock in xfrm_policy_delete

2020-09-23 Thread Herbert Xu
On Sun, Sep 20, 2020 at 01:22:14PM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:5fa35f24 Add linux-next specific files for 20200916 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1122e2d990 > kernel

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-23 Thread Yafang Shao
On Thu, Sep 24, 2020 at 12:09 AM Steven Rostedt wrote: > > On Wed, 23 Sep 2020 18:04:17 +0800 > Yafang Shao wrote: > > > > What you can do, and what we have done is the following: > > > > > > (see include/linux/page_ref.h) > > > > > > > > > #ifdef CONFIG_TRACING > > > extern struct tracepoint

Re: [GIT PULL rcu-tasks-trace] 50x speedup for synchronize_rcu_tasks_trace()

2020-09-23 Thread Paul E. McKenney
On Wed, Sep 23, 2020 at 07:46:15PM -0700, Alexei Starovoitov wrote: > On Tue, Sep 22, 2020 at 9:25 AM Paul E. McKenney wrote: > > > > Hello, Alexei, > > > > This pull request contains eight commits that speed up RCU Tasks Trace > > grace periods by a factor of 50, fix a few race conditions

Re: [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx skbs

2020-09-23 Thread Florian Fainelli
On 9/23/2020 4:08 PM, Vladimir Oltean wrote: On Wed, Sep 23, 2020 at 03:59:46PM -0700, Florian Fainelli wrote: On 9/23/20 3:58 PM, Vladimir Oltean wrote: On Wed, Sep 23, 2020 at 03:54:59PM -0700, Florian Fainelli wrote: Not having much luck with using __vlan_find_dev_deep_rcu() for a

linux-next: manual merge of the vfio tree with the s390 tree

2020-09-23 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the vfio tree got a conflict in: arch/s390/pci/pci_bus.c between commit: abb95b7550f8 ("s390/pci: consolidate SR-IOV specific code") from the s390 tree and commit: 08b6e22b850c ("s390/pci: Mark all VFs as not implementing PCI_COMMAND_MEMORY") from

Re: possible deadlock in xfrm_policy_lookup_bytype

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

RE: [PATCH] PCI: dwc: Added link up check in map_bus of dw_child_pcie_ops

2020-09-23 Thread Z.q. Hou
Hi Rob, Thanks a lot for your comments! > -Original Message- > From: Rob Herring > Sent: 2020年9月18日 23:28 > To: Z.q. Hou > Cc: linux-kernel@vger.kernel.org; PCI ; Lorenzo > Pieralisi ; Bjorn Helgaas > ; Gustavo Pimentel > ; Michael Walle ; > Ard Biesheuvel > Subject: Re: [PATCH] PCI:

Re: [RFC 2/2] printk: Add more information about the printk caller

2020-09-23 Thread Ahmed S. Darwish
On Wed, Sep 23, 2020 at 03:56:17PM +0200, Petr Mladek wrote: ... > > -static inline u32 printk_caller_id(void) > +static enum printk_caller_ctx get_printk_caller_ctx(void) > +{ > + if (in_nmi()) > + return printk_ctx_nmi; > + > + if (in_irq()) > + return

ARC: allmodconfig: Error: inappropriate arguments for opcode 'mpyd'

2020-09-23 Thread Naresh Kamboju
arc:allmodconfig build failed with gcc-8, gcc-9 and gcc-10 on Linus's mainline tree. Build log: make -sk KBUILD_BUILD_USER=TuxBuild -C/linux ARCH=arc CROSS_COMPILE=arc-elf32- HOSTCC=gcc CC="sccache arc-elf32-gcc" O=build allmodconfig make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16

[PATCH] alpha: switch defconfig from the legacy ide driver to libata

2020-09-23 Thread Christoph Hellwig
Switch from the soon to be removed legacy ide driver to libata. Signed-off-by: Christoph Hellwig --- arch/alpha/configs/defconfig | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/alpha/configs/defconfig b/arch/alpha/configs/defconfig index

Re: [PATCH v5 5/6] dt-bindings: dw-apb-ictl: convert to json-schema

2020-09-23 Thread Leizhen (ThunderTown)
On 2020/9/24 11:26, Leizhen (ThunderTown) wrote: > > > On 2020/9/24 4:49, Rob Herring wrote: >> On Fri, Sep 18, 2020 at 07:22:01PM +0800, Zhen Lei wrote: >>> Convert the Synopsys DesignWare APB interrupt controller (dw_apb_ictl) >>> binding to DT schema format using json-schema. >>> >>>

Re: WARNING: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] PCI: Cadence: Add quirk for Gen2 controller to do autonomous speed change.

2020-09-23 Thread Kishon Vijay Abraham I
Hi Nadeem, On 24/09/20 12:04 am, Nadeem Athani wrote: > Cadence controller will not initiate autonomous speed change if > strapped as Gen2. The Retrain bit is set as a quirk to trigger > this speed change. > > Signed-off-by: Nadeem Athani > --- >

Re: inconsistent lock state in xfrm_user_rcv_msg

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: possible deadlock in xfrm_policy_lookup_inexact_addr

2020-09-23 Thread Herbert Xu
#syz dup: inconsistent lock state in xfrm_policy_lookup_inexact_addr -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[PATCH v4 6/6] kasan: update documentation for generic kasan

2020-09-23 Thread Walter Wu
Generic KASAN also supports to record the last two timer and workqueue stacks and print them in KASAN report. So that need to update documentation. Signed-off-by: Walter Wu Suggested-by: Marco Elver Acked-by: Marco Elver Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey

[PATCH v4 3/6] kasan: print timer and workqueue stack

2020-09-23 Thread Walter Wu
The aux_stack[2] is reused to record the call_rcu() call stack, timer init call stack, and enqueuing work call stacks. So that we need to change the auxiliary stack title for common title, print them in KASAN report. Signed-off-by: Walter Wu Suggested-by: Marco Elver Acked-by: Marco Elver

[PATCH v4 2/6] workqueue: kasan: record workqueue stack

2020-09-23 Thread Walter Wu
Records the last two enqueuing work call stacks in order to print them in KASAN report. It is useful for programmers to solve use-after-free or double-free memory workqueue issue. For workqueue it has turned out to be useful to record the enqueuing work call stacks. Because user can see KASAN

[PATCH v4 1/6] timer: kasan: record timer stack

2020-09-23 Thread Walter Wu
When analyze use-after-free or double-free issue, recording the timer stacks is helpful to preserve usage history which potentially gives a hint about the affected code. Record the most recent two timer init calls in KASAN which are printed on failure in the KASAN report. For timers it has

PATCH v4 5/6] kasan: add tests for workqueue stack recording

2020-09-23 Thread Walter Wu
Adds a test to verify workqueue stack recording and print it in KASAN report. The KASAN report was as follows(cleaned up slightly): BUG: KASAN: use-after-free in kasan_workqueue_uaf Freed by task 54: kasan_save_stack+0x24/0x50 kasan_set_track+0x24/0x38 kasan_set_free_info+0x20/0x40

Re: [PATCH v3 1/1] PCI/ERR: Fix reset logic in pcie_do_recovery() call

2020-09-23 Thread Kuppuswamy, Sathyanarayanan
On 9/23/20 8:13 PM, Sinan Kaya wrote: On 9/23/2020 10:51 PM, Kuppuswamy, Sathyanarayanan wrote: I see. Can I assume that your system supports DPC? DPC is supposed to recover the link via dpc_reset_link(). Yes. But the affected device/drivers cleanup during error recovery is handled by

[PATCH v4 4/6] kasan: add tests for timer stack recording

2020-09-23 Thread Walter Wu
Adds a test to verify timer stack recording and print it in KASAN report. The KASAN report was as follows(cleaned up slightly): BUG: KASAN: use-after-free in kasan_timer_uaf Freed by task 0: kasan_save_stack+0x24/0x50 kasan_set_track+0x24/0x38 kasan_set_free_info+0x20/0x40

[PATCH v4 0/6] kasan: add workqueue and timer stack for generic KASAN

2020-09-23 Thread Walter Wu
Syzbot reports many UAF issues for workqueue or timer, see [1] and [2]. In some of these access/allocation happened in process_one_work(), we see the free stack is useless in KASAN report, it doesn't help programmers to solve UAF on workqueue. The same may stand for times. This patchset improves

Re: [PATCH] mm: swapfile: avoid split_swap_cluster() NULL pointer dereference

2020-09-23 Thread Huang, Ying
Rafael Aquini writes: > The bug here is quite simple: split_swap_cluster() misses checking for > lock_cluster() returning NULL before committing to change cluster_info->flags. I don't think so. We shouldn't run into this situation firstly. So the "fix" hides the real bug instead of fixing it.

Re: [PATCH 7/7] perf inject: Remove stale build-id processing

2020-09-23 Thread Namhyung Kim
Hi Adrian, Thanks for your review! On Wed, Sep 23, 2020 at 11:36 PM Adrian Hunter wrote: > > On 23/09/20 11:05 am, Namhyung Kim wrote: > > I think we don't need to call build_id__mark_dso_hit() in the > > perf_event__repipe_sample() as it's not used by -b option. In case of > > the -b option

Re: [PATCH V3 2/3] arm64/mm/hotplug: Enable MEM_OFFLINE event handling

2020-09-23 Thread Anshuman Khandual
On 09/23/2020 12:01 PM, Gavin Shan wrote: > Hi Anshuman, > > On 9/21/20 10:05 PM, Anshuman Khandual wrote: >> This enables MEM_OFFLINE memory event handling. It will help intercept any >> possible error condition such as if boot memory some how still got offlined >> even after an explicit

[PATCH v19 08/20] mm: page_idle_get_page() does not need lru_lock

2020-09-23 Thread Alex Shi
From: Hugh Dickins It is necessary for page_idle_get_page() to recheck PageLRU() after get_page_unless_zero(), but holding lru_lock around that serves no useful purpose, and adds to lru_lock contention: delete it. See https://lore.kernel.org/lkml/20150504031722.GA2768@blaptop for the discussion

[PATCH v19 14/20] mm/mlock: remove __munlock_isolate_lru_page

2020-09-23 Thread Alex Shi
The func only has one caller, remove it to clean up code and simplify code. Signed-off-by: Alex Shi Acked-by: Hugh Dickins Cc: Hugh Dickins Cc: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/mlock.c | 31

[PATCH v19 04/20] mm/thp: use head for head page in lru_add_page_tail

2020-09-23 Thread Alex Shi
Since the first parameter is only used by head page, it's better to make it explicit. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Andrew Morton Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Hugh Dickins Cc: linux...@kvack.org Cc:

[PATCH v19 02/20] mm/memcg: bail early from swap accounting if memcg disabled

2020-09-23 Thread Alex Shi
If we disabled memcg by cgroup_disable=memory, page->memcg will be NULL and so the charge is skipped and that will trigger a warning like below. Let's return from the funcs earlier. anon flags:0x5005b48008000d(locked|uptodate|dirty|swapbacked) raw: 005005b48008000d dead0100

[PATCH v19 13/20] mm/mlock: remove lru_lock on TestClearPageMlocked

2020-09-23 Thread Alex Shi
In the func munlock_vma_page, comments mentained lru_lock needed for serialization with split_huge_pages. But the page must be PageLocked as well as pages in split_huge_page series funcs. Thus the PageLocked is enough to serialize both funcs. Further more, Hugh Dickins pointed: before splitting

[PATCH v19 11/20] mm/lru: move lock into lru_note_cost

2020-09-23 Thread Alex Shi
We have to move lru_lock into lru_note_cost, since it cycle up on memcg tree, for future per lruvec lru_lock replace. It's a bit ugly and may cost a bit more locking, but benefit from multiple memcg locking could cover the lost. Signed-off-by: Alex Shi Acked-by: Hugh Dickins Cc: Johannes Weiner

[PATCH] crypto: x86/poly1305 - Remove assignments with no effect

2020-09-23 Thread Herbert Xu
On Mon, Sep 21, 2020 at 04:56:52PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: eb5f95f1593f7c22dac681b19e815828e2af3efd > commit: d7d7b853566254648df59f7ea27ea05952a6cfa8 crypto: x86/poly1305 - wire > up faster

[PATCH v19 19/20] mm/lru: introduce the relock_page_lruvec function

2020-09-23 Thread Alex Shi
From: Alexander Duyck Use this new function to replace repeated same code, no func change. When testing for relock we can avoid the need for RCU locking if we simply compare the page pgdat and memcg pointers versus those that the lruvec is holding. By doing this we can avoid the extra pointer

[PATCH v19 12/20] mm/vmscan: remove lruvec reget in move_pages_to_lru

2020-09-23 Thread Alex Shi
A isolated page shouldn't be recharged by memcg since the memcg migration isn't possible at the time. So remove unnecessary regetting. Thanks to Alexander Duyck for pointing this out. Signed-off-by: Alex Shi Acked-by: Hugh Dickins Cc: Alexander Duyck Cc: Andrew Morton Cc: Konstantin

[PATCH v19 15/20] mm/lru: introduce TestClearPageLRU

2020-09-23 Thread Alex Shi
Currently lru_lock still guards both lru list and page's lru bit, that's ok. but if we want to use specific lruvec lock on the page, we need to pin down the page's lruvec/memcg during locking. Just taking lruvec lock first may be undermined by the page's memcg charge/migration. To fix this

[PATCH v19 17/20] mm/swap.c: serialize memcg changes in pagevec_lru_move_fn

2020-09-23 Thread Alex Shi
Hugh Dickins' found a memcg change bug on original version: If we want to change the pgdat->lru_lock to memcg's lruvec lock, we have to serialize mem_cgroup_move_account during pagevec_lru_move_fn. The possible bad scenario would like: cpu 0 cpu 1 lruvec

[PATCH v19 10/20] mm/swap.c: fold vm event PGROTATED into pagevec_move_tail_fn

2020-09-23 Thread Alex Shi
Fold the PGROTATED event collection into pagevec_move_tail_fn call back func like other funcs does in pagevec_lru_move_fn. Thus we could save func call pagevec_move_tail(). Now all usage of pagevec_lru_move_fn are same and no needs of its 3rd parameter. It's just simply the calling. No functional

[PATCH v19 06/20] mm/thp: narrow lru locking

2020-09-23 Thread Alex Shi
lru_lock and page cache xa_lock have no obvious reason to be taken one way round or the other: until now, lru_lock has been taken before page cache xa_lock, when splitting a THP; but nothing else takes them together. Reverse that ordering: let's narrow the lru locking - but leave

[PATCH v19 16/20] mm/compaction: do page isolation first in compaction

2020-09-23 Thread Alex Shi
Currently, compaction would get the lru_lock and then do page isolation which works fine with pgdat->lru_lock, since any page isoltion would compete for the lru_lock. If we want to change to memcg lru_lock, we have to isolate the page before getting lru_lock, thus isoltion would block page's memcg

[PATCH v19 07/20] mm/vmscan: remove unnecessary lruvec adding

2020-09-23 Thread Alex Shi
We don't have to add a freeable page into lru and then remove from it. This change saves a couple of actions and makes the moving more clear. The SetPageLRU needs to be kept before put_page_testzero for list integrity, otherwise: #0 move_pages_to_lru #1 release_pages if

[PATCH v19 18/20] mm/lru: replace pgdat lru_lock with lruvec lock

2020-09-23 Thread Alex Shi
This patch moves per node lru_lock into lruvec, thus bring a lru_lock for each of memcg per node. So on a large machine, each of memcg don't have to suffer from per node pgdat->lru_lock competition. They could go fast with their self lru_lock. After move memcg charge before lru inserting, page

[PATCH v19 03/20] mm/thp: move lru_add_page_tail func to huge_memory.c

2020-09-23 Thread Alex Shi
The func is only used in huge_memory.c, defining it in other file with a CONFIG_TRANSPARENT_HUGEPAGE macro restrict just looks weird. Let's move it THP. And make it static as Hugh Dickin suggested. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Andrew

[PATCH v19 05/20] mm/thp: Simplify lru_add_page_tail()

2020-09-23 Thread Alex Shi
Simplify lru_add_page_tail(), there are actually only two cases possible: split_huge_page_to_list(), with list supplied and head isolated from lru by its caller; or split_huge_page(), with NULL list and head on lru - because when head is racily isolated from lru, the isolator's reference will stop

[PATCH v19 20/20] mm/lru: revise the comments of lru_lock

2020-09-23 Thread Alex Shi
From: Hugh Dickins Since we changed the pgdat->lru_lock to lruvec->lru_lock, it's time to fix the incorrect comments in code. Also fixed some zone->lru_lock comment error from ancient time. etc. I struggled to understand the comment above move_pages_to_lru() (surely it never calls

[PATCH v19 09/20] mm/memcg: add debug checking in lock_page_memcg

2020-09-23 Thread Alex Shi
Add a debug checking in lock_page_memcg, then we could get alarm if anything wrong here. Suggested-by: Johannes Weiner Signed-off-by: Alex Shi Acked-by: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Andrew Morton Cc: cgro...@vger.kernel.org Cc:

[PATCH v19 00/20] per memcg lru_lock

2020-09-23 Thread Alex Shi
The new version rebased on v5.9-rc6 with line by line review by Hugh Dickins. Millions thanks! And removed the 4th part from last version which do post optimization, that we can repost after the main part get merged. About one year coding and review, now I believe it's ready. So now this patchset

[PATCH v19 01/20] mm/memcg: warning on !memcg after readahead page charged

2020-09-23 Thread Alex Shi
Add VM_WARN_ON_ONCE_PAGE() macro. Since readahead page is charged on memcg too, in theory we don't have to check this exception now. Before safely remove them all, add a warning for the unexpected !memcg. Signed-off-by: Alex Shi Acked-by: Michal Hocko Acked-by: Hugh Dickins Cc: Johannes

[RFC PATCH 23/24] vdpa_sim: filter destination mac address

2020-09-23 Thread Jason Wang
Add a simple unicast filter to filter out the dest MAC doesn't match to the one stored in the config. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 49 1 file changed, 31 insertions(+), 18 deletions(-) diff --git

Re: [PATCH v2 1/4] dt-bindings: arm: hisilicon: add binding for SD5203 SoC

2020-09-23 Thread Leizhen (ThunderTown)
On 2020/9/24 4:59, Rob Herring wrote: > On Sat, Sep 19, 2020 at 02:45:52PM +0800, Zhen Lei wrote: >> Add devicetree binding for Hisilicon SD5203 SoC. >> >> Signed-off-by: Zhen Lei >> --- >> Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt | 5 + >> 1 file changed, 5

Re: [PATCH v5 5/6] dt-bindings: dw-apb-ictl: convert to json-schema

2020-09-23 Thread Leizhen (ThunderTown)
On 2020/9/24 4:49, Rob Herring wrote: > On Fri, Sep 18, 2020 at 07:22:01PM +0800, Zhen Lei wrote: >> Convert the Synopsys DesignWare APB interrupt controller (dw_apb_ictl) >> binding to DT schema format using json-schema. >> >> Signed-off-by: Zhen Lei >> --- >>

[RFC PATCH 24/24] vdpasim: control virtqueue support

2020-09-23 Thread Jason Wang
This patch introduces the control virtqueue support for vDPA simulator. This is a requirement for supporting advanced features like multiqueue. A requirement for control virtqueue is to isolate its memory access from the rx/tx virtqueues. This is because when using vDPA device for VM, the control

[RFC PATCH 22/24] vdpa_sim: factor out buffer completion logic

2020-09-23 Thread Jason Wang
This patch factors out the buffer completion logic in order to support future features. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 33 +--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c

[RFC PATCH 21/24] vdpa_sim: advertise VIRTIO_NET_F_MAC

2020-09-23 Thread Jason Wang
We advertise mac address via config space, so let's advertise VIRTIO_NET_F_MAC. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index

[RFC PATCH 20/24] vdpa_sim: advertise VIRTIO_NET_F_MTU

2020-09-23 Thread Jason Wang
We've already reported maximum mtu via config space, so let's advertise the feature. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c index

[RFC PATCH 16/24] vhost-vdpa: uAPI to get virtqueue group id

2020-09-23 Thread Jason Wang
Follows the support for virtqueue group in vDPA. This patches introduces uAPI to get the virtqueue group ID for a specific virtqueue in vhost-vdpa. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 4 2 files changed, 12 insertions(+) diff

[RFC PATCH 19/24] vdpa_sim: use separated iov for reading and writing

2020-09-23 Thread Jason Wang
In order to support control virtqueue whose commands have both in and out descriptors, we need to use separated iov for reading and writing in vdpa_sim. Signed-off-by: Jason Wang --- drivers/vdpa/vdpa_sim/vdpa_sim.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[RFC PATCH 18/24] vhost-vdpa: support ASID based IOTLB API

2020-09-23 Thread Jason Wang
This patch extends the vhost-vdpa to support ASID based IOTLB API. The vhost-vdpa device will allocated multple IOTLBs for vDPA device that supports multiple address spaces. The IOTLBs and vDPA device memory mappings is determined and maintained through ASID. Note that we still don't support vDPA

[RFC PATCH 17/24] vhost-vdpa: introduce uAPI to set group ASID

2020-09-23 Thread Jason Wang
Follows the vDPA support for associating ASID to a specific virtqueue group. This patch adds a uAPI to support setting them from userspace. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 8 include/uapi/linux/vhost.h | 4 2 files changed, 12 insertions(+) diff --git

Re: [PATCH V3 1/3] arm64/mm/hotplug: Register boot memory hot remove notifier earlier

2020-09-23 Thread Anshuman Khandual
On 09/23/2020 11:34 AM, Gavin Shan wrote: > Hi Anshuman, > > On 9/21/20 10:05 PM, Anshuman Khandual wrote: >> This moves memory notifier registration earlier in the boot process from >> device_initcall() to early_initcall() which will help in guarding against >> potential early boot memory

[RFC PATCH 15/24] vhost-vdpa: introduce uAPI to get the number of address spaces

2020-09-23 Thread Jason Wang
A new uAPI is introduced for the userspace to know the address spaces that is supported by a specific device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 3 +++ include/uapi/linux/vhost.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/vhost/vdpa.c

[RFC PATCH 10/24] vdpa: introduce config operations for associating ASID to a virtqueue group

2020-09-23 Thread Jason Wang
This patch introduces a new bus operation to allow the vDPA bus driver to associate an ASID to a virtqueue group. Signed-off-by: Jason Wang --- include/linux/vdpa.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index

Re: [PATCH v9 10/20] gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL

2020-09-23 Thread Kent Gibson
On Wed, Sep 23, 2020 at 07:15:46PM +0300, Andy Shevchenko wrote: > On Wed, Sep 23, 2020 at 7:14 PM Andy Shevchenko > wrote: > > > > On Tue, Sep 22, 2020 at 5:35 AM Kent Gibson wrote: > > > > > > Add support for GPIO_V2_LINE_SET_CONFIG_IOCTL, the uAPI v2 > > > line set config ioctl. > > > >

[RFC PATCH 14/24] vhost-vdpa: introduce uAPI to get the number of virtqueue groups

2020-09-23 Thread Jason Wang
Follows the vDPA support for multiple address spaces, this patch introduce uAPI for the userspace to know the number of virtqueue groups supported by the vDPA device. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 4 include/uapi/linux/vhost.h | 4 2 files changed, 8

[RFC PATCH 13/24] vhost-vdpa: introduce ASID based IOTLB

2020-09-23 Thread Jason Wang
This patch introduces the support of ASID based IOTLB by tagging IOTLB with a unique ASID. This is a must for supporting ASID based vhost IOTLB API by the following patches. IOTLB were stored in a hlist and new IOTLB will be allocated when a new ASID is seen via IOTLB API and destoryed when

[RFC PATCH 11/24] vhost_iotlb: split out IOTLB initialization

2020-09-23 Thread Jason Wang
This patch split out IOTLB initialization logic into a new helper. This allows vhost to implement device specific IOTLB allocation logic. Signed-off-by: Jason Wang --- drivers/vhost/iotlb.c | 23 ++- include/linux/vhost_iotlb.h | 2 ++ 2 files changed, 20

[RFC PATCH 12/24] vhost: support ASID in IOTLB API

2020-09-23 Thread Jason Wang
This patches allows userspace to send ASID based IOTLB message to vhost. This idea is to use the reserved u32 field in the existing V2 IOTLB message. Vhost device should advertise this capability via VHOST_BACKEND_F_IOTLB_ASID backend feature. Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c

[RFC PATCH 09/24] vdpa: multiple address spaces support

2020-09-23 Thread Jason Wang
This patches introduces the multiple address spaces support for vDPA device. This idea is to identify a specific address space via an dedicated identifier - ASID. During vDPA device allocation, vDPA device driver needs to report the number of address spaces supported by the device then the DMA

  1   2   3   4   5   6   7   8   9   10   >