Re: [linux-next:master] BUILD REGRESSION 6cc11d2a1759275b856e464265823d94aabd5eaf

2022-07-01 Thread Roman Gushchin
rge.net, linux1394-de...@lists.sourceforge.net, linux-l...@vger.kernel.org, rds-de...@oss.oracle.com, linux-...@vger.kernel.org, d...@vger.kernel.org, intel-wired-...@lists.osuosl.org, linux-ser...@vger.kernel.org, devicet...@vger.kernel.org, linux-...@lists.01.org,

[PATCH] powerpc: kernel: pci-common: Fix refcount bug for 'phb->dn'

2022-07-01 Thread Liang He
In pcibios_alloc_controller(), 'phb' is allocated and escaped into global 'hose_list'. So we should call of_node_get() when a new reference created into 'phb->dn'. And when phb is freed, we should call of_node_put() on it. NOTE: This function is called in the iteration of for_each_xx in

[PATCH v2] powerpc: kernel: legacy_serial: Fix missing of_node_put() in add_legacy_soc_port()

2022-07-01 Thread Liang He
We should call of_node_put() for the reference 'tsi' returned by of_get_parent() which will increase the refcount. Signed-off-by: Liang He --- changelog: v2: use more conservative way to call of_node_put() v1: mov 'of_node_put()' into the 'if' condition v1 Link:

Re: [PATCH v2] stack: Declare {randomize_,}kstack_offset to fix Sparse warnings

2022-07-01 Thread Kees Cook
On Wed, 29 Jun 2022 14:04:23 +0800, GONG, Ruiqi wrote: > Fix the following Sparse warnings that got noticed when the PPC-dev > patchwork was checking another patch (see the link below): > > init/main.c:862:1: warning: symbol 'randomize_kstack_offset' was not > declared. Should it be static? >

Re: [PATCH v2 2/2] serial: Set probe_no_timeout for all DT based drivers

2022-07-01 Thread Andy Shevchenko
, Kevin Hilman , Pali Rohar , heiner kallweit , ulf hansson , Neil Armstrong , Lorenzo Pieralisi , Al Cooper , linux-tegra , Jiri Slaby , "moderated list:ARM/ASPEED MACHINE SUPPORT" , Rob Herring , Florian Fainelli , Mateusz Holenko , Alexander Shiyan , kevin hilman , Broadcom internal

Re: [PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Tyrel Datwyler
On 7/1/22 12:47, Tyrel Datwyler wrote: > On 7/1/22 06:17, Liang He wrote: >> In pci_add_device_node_info(), we should use of_node_put() for the >> reference 'parent' returned by of_get_parent() to keep refcount >> balance. >> >> Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") >>

Re:Re: [PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Liang He
At 2022-07-02 03:47:22, "Tyrel Datwyler" wrote: >On 7/1/22 06:17, Liang He wrote: >> In pci_add_device_node_info(), we should use of_node_put() for the >> reference 'parent' returned by of_get_parent() to keep refcount >> balance. >> >> Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") >>

Re: [PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Tyrel Datwyler
On 7/1/22 06:17, Liang He wrote: > In pci_add_device_node_info(), we should use of_node_put() for the > reference 'parent' returned by of_get_parent() to keep refcount > balance. > > Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") > Co-authored-by: Miaoqian Lin > Signed-off-by: Liang He >

[PATCH v2 2/2] powerpc: cell: iommu: Hold reference returned by of_find_node_by_name()

2022-07-01 Thread Liang He
In cell_iommu_init_disabled(), we should hold the reference returned by of_find_node_by_name() and use it to call of_node_put() for reference balance. Signed-off-by: Liang He --- changelog: v2: (1) split v1's two files in to two commits (2) using 'check-then-put' coding style v1: hold

[PATCH v2 1/2] powerpc: cell: cbe_regs: Fix refcount bugs

2022-07-01 Thread Liang He
There are several bugs as following: (1) In cbe_get_be_node(), we should hold the reference returned by of_find_xxx and of_get_xxx OF APIs and use it to call of_node_put (2) In cbe_fill_regs_map(), we should same as above (3) In cbe_regs_init(), during the iteration of

[PATCH] powerpc: 85xx: Fix refcount bugs in ge_imp3a_pci_assign_primary()

2022-07-01 Thread Liang He
for_each_node_by_type() will automatically increase and decrease the refcount during the iteration. However, there is a reference escaped into global 'fsl_pci_primary' and we need to handle it. Signed-off-by: Liang He --- arch/powerpc/platforms/85xx/ge_imp3a.c | 6 -- 1 file changed, 4

[PATCH] powerpc: 44x: Add of_node_put() when break out from for_each

2022-07-01 Thread Liang He
In ppc47x_init_irq(), we need to call of_node_put() when there is a break during the iteration of for_each_node_with_property() which will automatically increase and decrease the refcount. Signed-off-by: Liang He --- arch/powerpc/platforms/44x/ppc476.c | 1 + 1 file changed, 1 insertion(+)

[PATCH] powerpc: kernel: pci_dn: Add missing of_node_put() for of_get_xx API

2022-07-01 Thread Liang He
In pci_add_device_node_info(), we should use of_node_put() for the reference 'parent' returned by of_get_parent() to keep refcount balance. Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn") Co-authored-by: Miaoqian Lin Signed-off-by: Liang He --- arch/powerpc/kernel/pci_dn.c | 1 + 1 file

[PATCH] powerpc: kernel: Fix missing of_node_put() in add_legacy_soc_port()

2022-07-01 Thread Liang He
We should call of_node_put() for the reference 'tsi' returned by of_get_parent() which will increase the refcount. Signed-off-by: Liang He --- Inserting of_node_put() in the 'if' condition is learned from Orsan:

Re: WARN at crypto/testmgr.c:5774 (next)

2022-07-01 Thread Sachin Sant
> Thanks for the report. I've already submitted a follow up patch: > https://patchwork.kernel.org/project/linux-crypto/patch/20220630140506.904-1-ig...@cloudflare.com/ Thanks, the fix resolves the issue for me. - Sachin

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON() (gcc issue ?)

2022-07-01 Thread Christophe Leroy
Hi Segher, your help might be welcome, Le 01/07/2022 à 08:56, Sathvika Vasireddy a écrit : > Hi Chen, > > Thanks for pitching in and providing your inputs :-) > > On 01/07/22 07:43, Chen Zhongjin wrote: >> Hi everyone, >> >> Hope I'm not too late for this discussion. >> >> I'm not familiar with

Re: [PATCH v2 08/13] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-07-01 Thread Christophe Leroy
Le 01/07/2022 à 11:41, Marco Elver a écrit : > On Fri, 1 Jul 2022 at 10:54, Christophe Leroy > wrote: >> >> Hi Marco, >> >> Le 28/06/2022 à 11:58, Marco Elver a écrit : >>> Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint >>> implementation have relied on nr_bp_mutex

[PATCH] powerpc: Fix formatting problems to make code look more beautiful

2022-07-01 Thread Deming Wang
Operators should be separated by spaces in tce_buildmulti_pSeriesLP Signed-off-by: Deming Wang --- arch/powerpc/platforms/pseries/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index

[PATCH] powerpc/sgy_cts1000: Fix typo in comments

2022-07-01 Thread Zhang Jiaming
There is a typo ('wont') in comments. Fix it. Signed-off-by: Zhang Jiaming --- arch/powerpc/platforms/85xx/sgy_cts1000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/85xx/sgy_cts1000.c b/arch/powerpc/platforms/85xx/sgy_cts1000.c index

[PATCH] powerpc/pseries: Add a null judgment after iommu_pseries_alloc_group

2022-07-01 Thread Deming Wang
We should avoid use the return value directly after call iommu_pseries_alloc_group. Because it_may return a null. Signed-off-by: Deming Wang --- arch/powerpc/platforms/pseries/iommu.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/platforms/pseries/iommu.c

Re: [PATCH v2 08/13] powerpc/hw_breakpoint: Avoid relying on caller synchronization

2022-07-01 Thread Christophe Leroy
Hi Marco, Le 28/06/2022 à 11:58, Marco Elver a écrit : > Internal data structures (cpu_bps, task_bps) of powerpc's hw_breakpoint > implementation have relied on nr_bp_mutex serializing access to them. > > Before overhauling synchronization of kernel/events/hw_breakpoint.c, > introduce 2

[PATCH v4 2/2] powerpc/kvm: don't crash on missing rng, and use darn

2022-07-01 Thread Jason A. Donenfeld
On POWER8 systems that don't have ibm,power-rng available, a guest that ignores the KVM_CAP_PPC_HWRNG flag and calls H_RANDOM anyway will dereference a NULL pointer. And on machines with darn instead of ibm,power-rng, H_RANDOM won't work at all. This patch kills two birds with one stone, by

[PATCH v4 1/2] powerpc/powernv: rename remaining rng powernv_ functions to pnv_

2022-07-01 Thread Jason A. Donenfeld
The preferred nomenclature is pnv_, not powernv_, but rng.c used powernv_ for some reason, which isn't consistent with the rest. A recent commit added a few pnv_ functions to rng.c, making the file a bit of a mishmash. This commit just replaces the rest of them. Cc: Michael Ellerman Fixes:

[PATCH v4 0/2] powerpc rng cleanups

2022-07-01 Thread Jason A. Donenfeld
These are two small cleanups for -next. This is meant to be atop https://lore.kernel.org/all/20220630121654.1939181-1-ja...@zx2c4.com/ which is expected to land first. v4 fixes up an inversion of thr DR flag. Jason A. Donenfeld (2): powerpc/powernv: rename remaining rng powernv_ functions to

Re: [PATCH v3 0/2] powerpc rng cleanups

2022-07-01 Thread Jason A. Donenfeld
On Fri, Jul 01, 2022 at 07:24:42AM +, Christophe Leroy wrote: > When DR is set you are in virtual mode > When DR is unset you are in real mode > > Extract from documentation: > > DR Data address translation > 0 Data address translation is disabled. > 1 Data address translation is enabled.

Re: [PATCH] cxl: drop unexpected word "the" in the comments

2022-07-01 Thread Greg KH
On Thu, Jun 30, 2022 at 11:10:13AM +1000, Andrew Donnellan wrote: > On Wed, 2022-06-29 at 22:15 +1000, Michael Ellerman wrote: > > On Tue, 21 Jun 2022 20:53:21 +0800, Jiang Jian wrote: > > > there is an unexpected word "the" in the comments that need to be > > > dropped > > > > > > file:

Re: [PATCH v3 0/2] powerpc rng cleanups

2022-07-01 Thread Christophe Leroy
Le 30/06/2022 à 18:46, Jason A. Donenfeld a écrit : > Hi Sachin, Michael, > > On Thu, Jun 30, 2022 at 6:12 PM Sachin Sant wrote: >>> On 30-Jun-2022, at 7:31 PM, Jason A. Donenfeld wrote: >>> >>> These are two small cleanups for -next. >>> >>> I'm sending this v3 because very likely >>>

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-01 Thread Sathvika Vasireddy
Hi Chen, Thanks for pitching in and providing your inputs :-) On 01/07/22 07:43, Chen Zhongjin wrote: Hi everyone, Hope I'm not too late for this discussion. I'm not familiar with ppc so it spent me some time to reproduce this. But at last I didn't make it. What I did: 1 checkout to

[PATCH] powerpc/32s: Cleanup the mess in __set_pte_at()

2022-07-01 Thread Christophe Leroy
__set_pte_at() handles 3 main cases with #ifdefs plus the 'percpu' subcase which leads to code duplication. Rewrite the function using IS_ENABLED() to minimise the total number of cases and remove duplicated code. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH] powerpc/32s: Fix boot failure with KASAN + SMP + JUMP_LABEL_FEATURE_CHECK_DEBUG

2022-07-01 Thread Christophe Leroy
Since commit 4291d085b0b0 ("powerpc/32s: Make pte_update() non atomic on 603 core"), pte_update() has been using mmu_has_feature(MMU_FTR_HPTE_TABLE) to avoid a useless atomic operation on 603 cores. When kasan_early_init() sets up the early zero shadow, it uses __set_pte_at(). On book3s/32,