Re: [BUG][powerpc] OOPs: Kernel access of bad area during zram swap write - kswapd0 crash

2025-05-05 Thread Misbah Anjum N
Hi, I am facing this issue even with the latest kernel: 6.15.0-rc4-g5721cf0b9352 The suspecting commit is: 44f76413496ec343da0d8292ceecdcabe3e6ec16. The commit introduces zs_obj_write() function. Link: https://github.com/torvalds/linux/commit/44f76413496ec343da0d8292ceecdcabe3e6ec16 I was no

[PATCH AUTOSEL 5.4 27/79] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 5.10 038/114] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 5.15 128/153] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-05-05 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 2ffb26afa64261139e608bf087a0c1fe24d76d4d ] perf mem report aborts as below sometimes (during some corner case) in powerpc: # ./perf mem report 1>out *** stack smashing detected ***: terminated Aborted (core dumped) The backtrace is as below: __

[PATCH AUTOSEL 5.15 057/153] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 6.1 179/212] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-05-05 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 2ffb26afa64261139e608bf087a0c1fe24d76d4d ] perf mem report aborts as below sometimes (during some corner case) in powerpc: # ./perf mem report 1>out *** stack smashing detected ***: terminated Aborted (core dumped) The backtrace is as below: __

[PATCH AUTOSEL 6.1 081/212] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 6.6 241/294] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-05-05 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 2ffb26afa64261139e608bf087a0c1fe24d76d4d ] perf mem report aborts as below sometimes (during some corner case) in powerpc: # ./perf mem report 1>out *** stack smashing detected ***: terminated Aborted (core dumped) The backtrace is as below: __

[PATCH AUTOSEL 6.6 240/294] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-05 Thread Sasha Levin
From: Gaurav Batra [ Upstream commit 6aa989ab2bd0d37540c812b4270006ff794662e7 ] iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM

[PATCH AUTOSEL 6.6 106/294] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 6.12 395/486] powerpc/pseries/iommu: create DDW for devices with DMA mask less than 64-bits

2025-05-05 Thread Sasha Levin
From: Gaurav Batra [ Upstream commit 67dfc11982f7e3c37f0977e74671da2391b29181 ] Starting with PAPR level 2.13, platform supports placing PHB in limited address mode. Devices that support DMA masks less that 64-bit but greater than 32-bits are placed in limited address mode. In this mode, the sta

[PATCH AUTOSEL 6.12 396/486] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-05-05 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 2ffb26afa64261139e608bf087a0c1fe24d76d4d ] perf mem report aborts as below sometimes (during some corner case) in powerpc: # ./perf mem report 1>out *** stack smashing detected ***: terminated Aborted (core dumped) The backtrace is as below: __

[PATCH AUTOSEL 6.12 394/486] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-05 Thread Sasha Levin
From: Gaurav Batra [ Upstream commit 6aa989ab2bd0d37540c812b4270006ff794662e7 ] iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM

[PATCH AUTOSEL 6.12 178/486] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

[PATCH AUTOSEL 6.14 510/642] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-05-05 Thread Sasha Levin
From: Athira Rajeev [ Upstream commit 2ffb26afa64261139e608bf087a0c1fe24d76d4d ] perf mem report aborts as below sometimes (during some corner case) in powerpc: # ./perf mem report 1>out *** stack smashing detected ***: terminated Aborted (core dumped) The backtrace is as below: __

[PATCH AUTOSEL 6.14 509/642] powerpc/pseries/iommu: create DDW for devices with DMA mask less than 64-bits

2025-05-05 Thread Sasha Levin
From: Gaurav Batra [ Upstream commit 67dfc11982f7e3c37f0977e74671da2391b29181 ] Starting with PAPR level 2.13, platform supports placing PHB in limited address mode. Devices that support DMA masks less that 64-bit but greater than 32-bits are placed in limited address mode. In this mode, the sta

[PATCH AUTOSEL 6.14 508/642] powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory

2025-05-05 Thread Sasha Levin
From: Gaurav Batra [ Upstream commit 6aa989ab2bd0d37540c812b4270006ff794662e7 ] iommu_mem_notifier() is invoked when RAM is dynamically added/removed. This notifier call is responsible to add/remove TCEs from the Dynamic DMA Window (DDW) when TCEs are pre-mapped. TCEs are pre-mapped only for RAM

[PATCH AUTOSEL 6.14 225/642] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-05-05 Thread Sasha Levin
From: Andreas Schwab [ Upstream commit 7e67ef889c9ab7246547db73d524459f47403a77 ] Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells property on the i2s node. Depends-on: commit 045b14ca5c36 ("of: WARN on deprecated #address-cells/#size-cells handling") Signed-off-by: Andr

Re: [PATCH bpf-next v3 02/11] bpf: Move insn if/else into do_check_insn()

2025-05-05 Thread Luis Gerhorst
Eduard Zingerman writes: > On Thu, 2025-05-01 at 09:35 +0200, Luis Gerhorst wrote: > >> +dst_reg_type = cur_regs(env)[insn->dst_reg].type; > > Implicitly relying on `insn == &env->prog->insnsi[env->cur_idx]` > is weird. Still think that `insn` parameter should be dropped and > comput

[PATCH 1/4] crypto: lib/chacha - strongly type the ChaCha state

2025-05-05 Thread Eric Biggers
From: Eric Biggers The ChaCha state matrix is 16 32-bit words. Currently it is represented in the code as a raw u32 array, or even just a pointer to u32. This weak typing is error-prone. Instead, introduce struct chacha_state: struct chacha_state { u32 x[16]; }; Convert a

[PATCH 4/4] crypto: lib/chacha - add array bounds to function prototypes

2025-05-05 Thread Eric Biggers
From: Eric Biggers Add explicit array bounds to the function prototypes for the parameters that didn't already get handled by the conversion to use chacha_state: - chacha_block_*(): Change 'u8 *out' or 'u8 *stream' to u8 out[CHACHA_BLOCK_SIZE]. - hchacha_block_*(): Change 'u32 *out' or 'u32

[PATCH 3/4] crypto: lib/chacha - add strongly-typed state zeroization

2025-05-05 Thread Eric Biggers
From: Eric Biggers Now that the ChaCha state matrix is strongly-typed, add a helper function chacha_zeroize_state() which zeroizes it. Then convert all applicable callers to use it instead of direct memzero_explicit. No functional changes. Signed-off-by: Eric Biggers --- drivers/char/random.

[PATCH 0/4] crypto: lib/chacha - improve type safety

2025-05-05 Thread Eric Biggers
This series can also be retrieved from: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git chacha-prototypes-v1 This series improves type safety and clarity in the ChaCha functions by strongly typing the state array and adding explicit array bounds for other fixed-

[PATCH 2/4] crypto: lib/chacha - use struct assignment to copy state

2025-05-05 Thread Eric Biggers
From: Eric Biggers Use struct assignment instead of memcpy() in lib/crypto/chacha.c where appropriate. No functional change. Signed-off-by: Eric Biggers --- lib/crypto/chacha.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/crypto/chacha.c b/lib/crypto/chacha.

Re: [RFC V1 0/6] Generic Entry/Exit support for ppc64

2025-05-05 Thread Ankur Arora
Mukesh Kumar Chaurasiya writes: > This is a syscall only implementation of generic entry/exit framework > for framework for ppc. IRQ handling is not done in this RFC. > > This will break the ppc32 build as of now which will be fixed along with > IRQ handling. > > Below are the performance bench

[PATCH v2] fsldma: Set correct dma_mask based on hw capability

2025-05-05 Thread Ben Collins
The driver currently hardcodes DMA_BIT_MASK to 36-bits, which is only correct on eloplus: elo3supports 40-bits eloplus supports 36-bits elo supports 32-bits This is based on 0x08 cdar register documention in the respective reference manuals. Set the dma mask accord

Re: [RFC V1 0/6] Generic Entry/Exit support for ppc64

2025-05-05 Thread Ankur Arora
Ankur Arora writes: > Mukesh Kumar Chaurasiya writes: > >> This is a syscall only implementation of generic entry/exit framework >> for framework for ppc. IRQ handling is not done in this RFC. >> >> This will break the ppc32 build as of now which will be fixed along with >> IRQ handling. >> >>

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-05 Thread Manivannan Sadhasivam
On Mon, May 05, 2025 at 05:05:10PM +0200, Niklas Cassel wrote: > Hello Mani, > > On Thu, Apr 17, 2025 at 10:46:31PM +0530, Manivannan Sadhasivam via B4 Relay > wrote: > > @@ -1571,6 +1652,9 @@ static irqreturn_t qcom_pcie_global_irq_thread(int > > irq, void *data) > > pci_unlock_resc

Re: [PATCH v3 0/6] powerpc: use lock guards for mutex Set 1

2025-05-05 Thread Venkat Rao Bagalkote
On 05/05/25 1:23 pm, Shrikanth Hegde wrote: This is an effort to make the code simpler by making use of lock guards which were introduced in [1], which works by using __cleanup attributes. More details in v1 cover letter v2->v3: - Collects tags (Andrew Donnellan & Srikar Dronamraju) - Address

Re: [PATCH v3 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-05 Thread Niklas Cassel
Hello Mani, On Thu, Apr 17, 2025 at 10:46:31PM +0530, Manivannan Sadhasivam via B4 Relay wrote: > @@ -1571,6 +1652,9 @@ static irqreturn_t qcom_pcie_global_irq_thread(int irq, > void *data) > pci_unlock_rescan_remove(); > > qcom_pcie_icc_opp_update(pcie); > + }

Bug: Issue in ioctls.h affecting userspace

2025-05-05 Thread Tulio Magno Quites Machado Filho
Heads up: a recent glibc change exposed an issue in the powerpc-specifi ioctls.h [1]. Userspace projects like Python, LLVM and GCC [2] can't build on ppc64le now. Suggestions with temporary workarounds are welcome! [1] https://github.com/linuxppc/issues/issues/488 [2] https://bugzilla.redhat.com

Re: [PATCH v4 00/13] Architecture-optimized SHA-256 library API

2025-05-05 Thread Herbert Xu
Eric Biggers wrote: > This is based on cryptodev commit 2dfc7cd74a5e062a. It can also be > retrieved from: > >git fetch > https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git > sha256-lib-v4 > > Following the example of several other algorithms (e.g. CRC32, ChaCha, > Poly130

Re: [PATCH v3] powerpc/boot: Fix build with gcc 15

2025-05-05 Thread Amit Machhiwal
On 2025/03/31 12:57 PM, Michal Suchanek wrote: > Similar to x86 the ppc boot code does not build with GCC 15. > > Copy the fix from > commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") > > Signed-off-by: Michal Suchanek > --- > v2: Move the fix outside of ifdef to apply

Re: [PATCH] powerpc/pseries/dlpar: Search DRC index from ibm,drc-indexes for IO add

2025-05-05 Thread Kowshik Jois B S
Haren, could you please add the below tag: Reported-by:Kowshik Jois IO hotplug add event is handled in the user space with drmgr tool. After the device is enabled, the user space uses /sys/kerne/dlpar interface with “dt add index ” to update the device tree. The kernel interface (dlpar_hp_dt_add

Re: [PATCH v3 0/6] powerpc: use lock guards for mutex Set 1

2025-05-05 Thread Shrikanth Hegde
On 5/5/25 13:23, Shrikanth Hegde wrote: This is an effort to make the code simpler by making use of lock guards which were introduced in [1], which works by using __cleanup attributes. More details in v1 cover letter compile/boot tested on PowerNV(P9). Also ran eeh selftests. No regressions

Re: [PATCH] powerpc/pseries/dlpar: Search DRC index from ibm,drc-indexes for IO add

2025-05-05 Thread Kowshik Jois B S
On 01/05/25 09:40, Haren Myneni wrote: IO hotplug add event is handled in the user space with drmgr tool. After the device is enabled, the user space uses /sys/kerne/dlpar interface with “dt add index ” to update the device tree. The kernel interface (dlpar_hp_dt_add()) finds the parent node for

Re: [PATCH] KVM: PPC: Book3S HV: Fix IRQ map warnings with XICS on pSeries KVM Guest

2025-05-05 Thread Vaibhav Jain
Thanks Amit for the patch. Amit Machhiwal writes: > The commit 9576730d0e6e ("KVM: PPC: select IRQ_BYPASS_MANAGER") enabled > IRQ_BYPASS_MANAGER when CONFIG_KVM was set. Subsequently, commit > c57875f5f9be ("KVM: PPC: Book3S HV: Enable IRQ bypass") enabled IRQ > bypass and added the necessary c

Re: [PATCH 2/3] powerpc/secvar: Expose secvars relevant to the key management mode

2025-05-05 Thread Andrew Donnellan
On Wed, 2025-04-30 at 14:33 +0530, Srish Srinivasan wrote: > The PLPKS enabled PowerVM LPAR sysfs exposes all of the secure boot > secvars irrespective of the key management mode. > > The PowerVM LPAR supports static and dynamic key management for > secure > boot. The key management option can be

Re: [PATCH 1/3] powerpc/pseries: Correct secvar format representation for static key management

2025-05-05 Thread Andrew Donnellan
On Wed, 2025-04-30 at 14:33 +0530, Srish Srinivasan wrote: > On a PLPKS enabled PowerVM LPAR, the secvar format property for > static > key management is misrepresented as "ibm,plpks-sb-unknown", creating > reason for confusion. > > Static key management mode uses fixed, built-in keys. Dynamic key

Re: [PATCH 3/3] integrity/platform_certs: Allow loading of keys in static key management mode

2025-05-05 Thread Andrew Donnellan
On Wed, 2025-04-30 at 14:33 +0530, Srish Srinivasan wrote: > On PLPKS enabled PowerVM LPAR, there is no provision to load signed > third-party kernel modules when the key management mode is static. > This > is because keys from secure boot secvars are only loaded when the key > management mode is d

Re: [PATCH] powerpc/pseries/dlpar: Search DRC index from ibm,drc-indexes for IO add

2025-05-05 Thread Amit Machhiwal
Hi Haren, Thanks for the patch. On 2025/04/30 09:10 PM, Haren Myneni wrote: > IO hotplug add event is handled in the user space with drmgr tool. > After the device is enabled, the user space uses /sys/kerne/dlpar > interface with “dt add index ” to update the device tree. > The kernel interface (

[PATCH v3 6/6] powerpc: sysdev: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Reviewed-by: Srikar Dronamraju Signed-off-by: Shrikanth Hegde

[PATCH v3 4/6] powerpc: book3s: vas: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use lock guards for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u This shows the use of both guard and scoped_guard Reviewed-by

[PATCH v3 5/6] powerpc: powernv: ocxl: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Reviewed-by: Srikar Dronamraju Acked-by: Andrew Donnellan S

[PATCH v3 3/6] powerpc: fadump: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use scoped_guard for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Reviewed-by: Srikar Dronamraju Signed-off-by: Shrikanth Hegd

[PATCH v3 2/6] powerpc: rtas: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Reviewed-by: Srikar Dronamraju Signed-off-by: Shrikanth Hegd

[PATCH v3 1/6] powerpc: eeh: use lock guard for mutex

2025-05-05 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Reviewed-by: Srikar Dronamraju Signed-off-by: Shrikanth Hegd

[PATCH v3 0/6] powerpc: use lock guards for mutex Set 1

2025-05-05 Thread Shrikanth Hegde
This is an effort to make the code simpler by making use of lock guards which were introduced in [1], which works by using __cleanup attributes. More details in v1 cover letter v2->v3: - Collects tags (Andrew Donnellan & Srikar Dronamraju) - Address comments from Srikar Dronamraju v1->v2: - Fix

Re: [PATCH for-next 1/2] book3s64/radix : Handle error conditions properly in radix_vmemmap_populate

2025-05-05 Thread IBM
Donet Tom writes: > Error conditions are not handled properly if altmap is not present > and PMD_SIZE vmemmap_alloc_block_buf fails. > > In this patch, if vmemmap_alloc_block_buf fails in the non-altmap > case, we will fall back to the base mapping. > We are trying to create mappings for vmemmap