Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-06-17 Thread Sathvika Vasireddy
Hi Christophe, On 15/06/22 21:33, Christophe Leroy wrote: Do you have any idea when you plan to send next revision ? I'm really looking forward to submitting the inline static calls on top of your series. I'm planning to send RFC v3 next week. - Sathvika

[PATCH v2] powerpc: embedded6xx: Fix refcount leak bugs

2022-06-17 Thread Liang He
In xx_init_xx(), of_find_node_by_type() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- v2: we merge all embedded6xx related bugs into one commit v1: we only report the bug in holly_init_pci() of holly.c

[PATCH] powerpc: embedded6xx: Fix refcount leak bug in holly.c

2022-06-17 Thread Liang He
In holly_init_pci(), of_find_node_by_type() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/embedded6xx/holly.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Baolin Wang
On 6/18/2022 1:17 AM, Mike Kravetz wrote: On 06/17/22 10:15, Peter Xu wrote: Hi, Mike, On Thu, Jun 16, 2022 at 02:05:15PM -0700, Mike Kravetz wrote: @@ -6877,6 +6896,39 @@ pte_t *huge_pte_offset(struct mm_struct *mm, return (pte_t *)pmd; } +/* + * Return a mask that can be

[PATCH] powerpc: sysdev: Fix refcount leak bug in fsl_pci.c

2022-06-17 Thread Liang He
In is_kdump(), we need a of_node_put() to dec the refcount which is incremented by of_find_node_by_type(). Signed-off-by: Liang He --- arch/powerpc/sysdev/fsl_pci.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c

[PATCH] powerpc: 8xx: Fix refcount leak bug in tqm8xx_setup

2022-06-17 Thread Liang He
In init_ioports(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/8xx/tqm8xx_setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH] cpufreq: pmac32-cpufreq: Fix refcount leak bug

2022-06-17 Thread Liang He
In pmac_cpufreq_init_MacRISC3(), we need to add corresponding of_node_put() for the three node pointers whose refcount have been incremented by of_find_node_by_name(). Signed-off-by: Liang He --- drivers/cpufreq/pmac32-cpufreq.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH] powerpc: powernv: opal-core: Fix refcount leak bug

2022-06-17 Thread Liang He
In create_opalcore(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/powernv/opal-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS

2022-06-17 Thread Michael Schmitz
Arnd, Am 18.06.2022 um 00:57 schrieb Arnd Bergmann: From: Arnd Bergmann All architecture-independent users of virt_to_bus() and bus_to_virt() have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and the

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Mike Kravetz
On 06/17/22 19:26, kernel test robot wrote: > Hi Mike, > > I love your patch! Yet something to improve: > > [auto build test ERROR on soc/for-next] > [also build test ERROR on linus/master v5.19-rc2 next-20220617] > [cannot apply to arm64/for-next/core arm/for-next kvmar

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread kernel test robot
Hi Mike, I love your patch! Yet something to improve: [auto build test ERROR on soc/for-next] [also build test ERROR on linus/master v5.19-rc2 next-20220617] [cannot apply to arm64/for-next/core arm/for-next kvmarm/next xilinx-xlnx/master] [If your patch is applied to the wrong git tree, kindly

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Mike Kravetz
On 06/17/22 10:15, Peter Xu wrote: > Hi, Mike, > > On Thu, Jun 16, 2022 at 02:05:15PM -0700, Mike Kravetz wrote: > > @@ -6877,6 +6896,39 @@ pte_t *huge_pte_offset(struct mm_struct *mm, > > return (pte_t *)pmd; > > } > > > > +/* > > + * Return a mask that can be used to update an address to

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread kernel test robot
Hi Mike, I love your patch! Yet something to improve: [auto build test ERROR on soc/for-next] [also build test ERROR on linus/master v5.19-rc2 next-20220617] [cannot apply to arm64/for-next/core arm/for-next kvmarm/next xilinx-xlnx/master] [If your patch is applied to the wrong git tree, kindly

[PATCH] KVM: PPC: use __func__ to get funcion's name in an output message

2022-06-17 Thread XueBing Chen
Prefer using '"%s...", __func__' to get current function's name in an output message. Signed-off-by: XueBing Chen --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Geert Uytterhoeven
Hi Peter, On Fri, Jun 17, 2022 at 4:22 PM Peter Xu wrote: > On Thu, Jun 16, 2022 at 02:05:15PM -0700, Mike Kravetz wrote: > > @@ -6877,6 +6896,39 @@ pte_t *huge_pte_offset(struct mm_struct *mm, > > return (pte_t *)pmd; > > } > > > > +/* > > + * Return a mask that can be used to update an

Re: [PATCH] KVM: PPC: Align pt_regs in kvm_vcpu_arch structure

2022-06-17 Thread Murilo Opsfelder Araújo
Hi, Fabiano. On 5/25/22 09:49, Fabiano Rosas wrote: The H_ENTER_NESTED hypercall receives as second parameter the address of a region of memory containing the values for the nested guest privileged registers. We currently use the pt_regs structure contained within kvm_vcpu_arch for that end.

[PATCH] powerpc: sysdev: Fix refcount leak bug in mpic_msgr

2022-06-17 Thread Liang He
In mpic_msgr_number_of_blocks() and mpic_msgr_block_number(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/sysdev/mpic_msgr.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH powerpc] powerpc/bpf: Fix use of user_pt_regs in uapi

2022-06-17 Thread Naveen N. Rao
This is a partial revert of commit a6460b03f945ee ("powerpc/bpf: Fix broken uapi for BPF_PROG_TYPE_PERF_EVENT"). Unlike x86, powerpc has both pt_regs and user_pt_regs structures. As such, we still need to override perf_arch_bpf_user_pt_regs() so that the correct user_regs structure is used.

Re:Re: [PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-17 Thread Liang He
At 2022-06-17 13:01:27, "Christophe JAILLET" wrote: >Le 17/06/2022 à 06:20, Liang He a écrit : >> In opal_powercap_init(), of_find_compatible_node() will return >> a node pointer with refcount incremented. We should use of_node_put() >> in fail path or when it is not used anymore. >> >>

[PATCH v2] powerpc: powernv: Fix refcount leak bug

2022-06-17 Thread Liang He
In these driver init functions, there are two kinds of errors: (1) missing of_put_node() for of_find_compatible_node()'s returned pointer (refcount incremented) in fail path or when it is not used anymore. (2) missing of_put_node() for 'for_each_xxx' loop's break These bugs are similar

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Peter Xu
Hi, Mike, On Thu, Jun 16, 2022 at 02:05:15PM -0700, Mike Kravetz wrote: > @@ -6877,6 +6896,39 @@ pte_t *huge_pte_offset(struct mm_struct *mm, > return (pte_t *)pmd; > } > > +/* > + * Return a mask that can be used to update an address to the last huge > + * page in a page table page

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-06-17 Thread Naveen N. Rao
Christophe Leroy wrote: Le 16/06/2022 à 15:57, Peter Zijlstra a écrit : On Thu, Jun 16, 2022 at 01:40:34PM +, Christophe Leroy wrote: sizeof(u64) is always 8 by definition. So if size is 8 we are working on a binary file for a 64 bits target, if not it means we are working for a 32 bits

Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-17 Thread Robin Murphy
On 2022-06-17 13:57, Arnd Bergmann wrote: From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit

Re: [PATCH 04/36] cpuidle,intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE

2022-06-17 Thread Jacob Pan
, Arnd Bergmann , ulli.kr...@googlemail.com, vgu...@kernel.org, linux-...@vger.kernel.org, j...@joshtriplett.org, rost...@goodmis.org, r...@vger.kernel.org, b...@alien8.de, bc...@quicinc.com, tsbog...@alpha.franken.de, linux-par...@vger.kernel.org, sudeep.ho...@arm.com, shawn...@kernel.org,

[PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann All architecture-independent users of virt_to_bus() and bus_to_virt() have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and the CONFIG_VIRT_TO_BUS symbol are now obsolete and can be removed. The

[PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit 391e2f25601e ("[SCSI] BusLogic: Port driver to

[PATCH v2 1/3] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008, but it still has a stale reference in an error handling code path that could never work. Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency. The alternative to this would be to just

[PATCH v2 0/3] phase out CONFIG_VIRT_TO_BUS

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The virt_to_bus/bus_to_virt interface has been deprecated for decades. After Jakub Kicinski put a lot of work into cleaning out the network drivers using them, there are only a couple of other drivers left, which can all be removed or otherwise cleaned up, to remove the old

Re: [PATCH v2 0/4] pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-06-17 Thread Daniel Henrique Barboza
On 6/2/22 14:53, Scott Cheloha wrote: PAPR v2.12 defines a new hypercall, H_WATCHDOG. This patch series adds support for this hypercall to powerpc/pseries kernels and introduces a new watchdog driver, "pseries-wdt", for the virtual timers exposed by the hypercall. This series is preceded by

[PATCH] powerpc: maple: Fix refcount leak bug in time.c

2022-06-17 Thread Liang He
In maple_get_boot_time(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/maple/time.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re:Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
在 2022-06-17 18:57:36,"Christophe Leroy" 写道: > > >Le 17/06/2022 à 12:47, Liang He a écrit : >> >> >> >> At 2022-06-17 16:27:03, conor.doo...@microchip.com wrote: >>> On 17/06/2022 09:17, Liang He wrote: At 2022-06-17 14:53:13, "Christophe Leroy" wrote: > >

[PATCH] powerpc: kernel: Change the order of of_node_put()

2022-06-17 Thread Liang He
In add_pcspkr(), it is better to call of_node_put() after the 'if(!np)' check. Signed-off-by: Liang He --- arch/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index

Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Christophe Leroy
Le 17/06/2022 à 12:47, Liang He a écrit : > > > > At 2022-06-17 16:27:03, conor.doo...@microchip.com wrote: >> On 17/06/2022 09:17, Liang He wrote: >>> >>> >>> >>> At 2022-06-17 14:53:13, "Christophe Leroy" >>> wrote: Le 17/06/2022 à 08:45, Liang He a écrit : > >

[PATCH v5] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- changelog: v5: fix 'gotot' error introduced by v4 and use cross-compiler to test v4: reuse

Re:Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
At 2022-06-17 16:27:03, conor.doo...@microchip.com wrote: >On 17/06/2022 09:17, Liang He wrote: >> >> >> >> At 2022-06-17 14:53:13, "Christophe Leroy" >> wrote: >>> >>> >>> Le 17/06/2022 à 08:45, Liang He a écrit : At 2022-06-17 14:28:56, "Christophe Leroy"

Re: [PATCH] arch/*: Disable softirq stacks on PREEMPT_RT.

2022-06-17 Thread Sebastian Andrzej Siewior
On 2022-06-15 17:41:45 [+0200], Arnd Bergmann wrote: > Applied to the asm-generic tree with the above fixup, thanks! Thank you Arnd. > Arnd Sebastian

Re: [PATCH -next v5 7/8] arm64: add uaccess to machine check safe

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:55AM +, Tong Tiangen wrote: > If user access fail due to hardware memory error, only the relevant > processes are affected, so killing the user process and isolate the > error page with hardware memory errors is a more reasonable choice > than kernel panic. > >

Re: [PATCH -next v5 6/8] arm64: add support for machine check error safe

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:54AM +, Tong Tiangen wrote: > During the processing of arm64 kernel hardware memory errors(do_sea()), if > the errors is consumed in the kernel, the current processing is panic. > However, it is not optimal. > > Take uaccess for example, if the uaccess operation

Re: [PATCH -next v5 4/8] arm64: extable: cleanup redundant extable type EX_TYPE_FIXUP

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:52AM +, Tong Tiangen wrote: > Currently, extable type EX_TYPE_FIXUP is no place to use, We can safely > remove it. > > Suggested-by: Mark Rutland > Signed-off-by: Tong Tiangen Acked-by: Mark Rutland Mark. > --- > arch/arm64/include/asm/asm-extable.h | 20

Re:Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
At 2022-06-17 16:27:03, conor.doo...@microchip.com wrote: >On 17/06/2022 09:17, Liang He wrote: >> >> >> >> At 2022-06-17 14:53:13, "Christophe Leroy" >> wrote: >>> >>> >>> Le 17/06/2022 à 08:45, Liang He a écrit : At 2022-06-17 14:28:56, "Christophe Leroy" wrote:

Re: [PATCH -next v5 3/8] arm64: extable: move _cond_extable to _cond_uaccess_extable

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:51AM +, Tong Tiangen wrote: > Currently, We use _cond_extable for cache maintenance uaccess helper > caches_clean_inval_user_pou(), so this should be moved over to > EX_TYPE_UACCESS_ERR_ZERO and rename _cond_extable to _cond_uaccess_extable > for clarity. > >

Re: [PATCH 2/4] arm64/hugetlb: Implement arm64 specific hugetlb_mask_last_page

2022-06-17 Thread Muchun Song
On Thu, Jun 16, 2022 at 02:05:16PM -0700, Mike Kravetz wrote: > From: Baolin Wang > > The HugeTLB address ranges are linearly scanned during fork, unmap and > remap operations, and the linear scan can skip to the end of range mapped > by the page table page if hitting a non-present entry, which

Re: [PATCH -next v5 2/8] arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:50AM +, Tong Tiangen wrote: > Currnetly, the extable type used by __arch_copy_from/to_user() is > EX_TYPE_FIXUP. In fact, It is more clearly to use meaningful > EX_TYPE_UACCESS_*. > > Suggested-by: Mark Rutland > Signed-off-by: Tong Tiangen > --- >

Re: [PATCH -next v5 1/8] arm64: extable: add new extable type EX_TYPE_KACCESS_ERR_ZERO support

2022-06-17 Thread Mark Rutland
On Sat, May 28, 2022 at 06:50:49AM +, Tong Tiangen wrote: > Currently, The extable type EX_TYPE_UACCESS_ERR_ZERO is used by > __get/put_kernel_nofault(), but those helpers are not uaccess type, so we > add a new extable type EX_TYPE_KACCESS_ERR_ZERO which can be used by >

Re:Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
At 2022-06-17 14:53:13, "Christophe Leroy" wrote: > > >Le 17/06/2022 à 08:45, Liang He a écrit : >> >> >> >> At 2022-06-17 14:28:56, "Christophe Leroy" >> wrote: >>> >>> >>> Le 17/06/2022 à 08:08, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node

Re: [PATCH 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-17 Thread Muchun Song
On Thu, Jun 16, 2022 at 02:05:15PM -0700, Mike Kravetz wrote: > HugeTLB address ranges are linearly scanned during fork, unmap and > remap operations. If a non-present entry is encountered, the code > currently continues to the next huge page aligned address. However, > a non-present entry

[PATCH] powerpc: powernv: Fix refcount leak in opal

2022-06-17 Thread Liang He
In opal_imc_init_dev(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/powernv/opal.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] powerc: Update asm-prototypes.h comment

2022-06-17 Thread Michael Ellerman
This header was recently cleaned up in commit 76222808fc25 ("powerpc: Move C prototypes out of asm-prototypes.h"), update the comment to reflect it's proper purpose. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/asm-prototypes.h | 5 +++-- 1 file changed, 3 insertions(+), 2

Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Christophe Leroy
Le 17/06/2022 à 08:45, Liang He a écrit : > > > > At 2022-06-17 14:28:56, "Christophe Leroy" > wrote: >> >> >> Le 17/06/2022 à 08:08, Liang He a écrit : >>> In gpio_halt_probe(), of_find_matching_node() will return a node >>> pointer with refcount incremented. We should use of_node_put() in

Re:Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
At 2022-06-17 14:28:56, "Christophe Leroy" wrote: > > >Le 17/06/2022 à 08:08, Liang He a écrit : >> In gpio_halt_probe(), of_find_matching_node() will return a node >> pointer with refcount incremented. We should use of_node_put() in >> fail path or when it is not used anymore. >> >>

Re: [PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Christophe Leroy
Le 17/06/2022 à 08:08, Liang He a écrit : > In gpio_halt_probe(), of_find_matching_node() will return a node > pointer with refcount incremented. We should use of_node_put() in > fail path or when it is not used anymore. > > Signed-off-by: Liang He > --- > changelog: > v4: reuse exist

[PATCH v4] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-17 Thread Liang He
In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- changelog: v4: reuse exist 'err' and use a simple code style, advised by CJ v3: use local