Re: [PATCH v5 2/5] perf: Hoist perf_instruction_pointer() and perf_misc_flags()

2024-09-23 Thread Thomas Richter
On 9/20/24 19:47, Colton Lewis wrote: > For clarity, rename the arch-specific definitions of these functions > to perf_arch_* to denote they are arch-specifc. Define the > generic-named functions in one place where they can call the > arch-specific ones as needed. > > Signed-off-by: Colton Lewis

[PATCH 1/3] crypto: Re-write AES/GCM stitched implementation for ppcle64.

2024-09-23 Thread Danny Tsen
Re-write AES/GCM assembly codes with smaller footprints and small performance gain. Handling the partial blocks differently that computes partial block to AES states and re-assembles to a complete block and then computes a full-block hash. Added gcm_update() to update the last partial block hash

[PATCH 2/3] crypto: Register modules as SIMD modules for ppcle64 AES/GCM algs.

2024-09-23 Thread Danny Tsen
This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed. A new module rfc4106(gcm(aes)) is also a

[PATCH 3/3] crypto: added CRYPTO_SIMD in Kconfig for CRYPTO_AES_GCM_P10.

2024-09-23 Thread Danny Tsen
Added CRYPTO_SIMD for CRYPTO_AES_GCM_P10. Fixes: 45a4672b9a6e ("crypto: p10-aes-gcm - Update Kconfig and Makefile") Signed-off-by: Danny Tsen --- arch/powerpc/crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kco

[PATCH 0/3] crypto: Fix data mismatch over ipsec tunnel encrypted/decrypted with ppc64le AES/GCM module.

2024-09-23 Thread Danny Tsen
Fix data mismatch over ipsec tunnel encrypted/decrypted with ppc64le AES/GCM module. This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. A new module r

Re: [Bug][Git-Bisect][6.11.0-next-20240917]BUG: Unable to handle kernel data access on read at 0xc00c020000013d88

2024-09-23 Thread Sergey Senozhatsky
Hi, On (24/09/23 11:06), Venkat Rao Bagalkote wrote: > Hello, > > Below is the TC, I was running. > > https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/generic/ltp.py Out of curiosity, does this [1] patch fix the issue for you? [1] https://lore.kernel.org/all/202409230

Re: [PATCH v2 00/15] timers: Cleanup delay/sleep related mess

2024-09-23 Thread Anna-Maria Behnsen
Christophe JAILLET writes: > Le 16/09/2024 à 22:20, Christophe JAILLET a écrit : >> Le 11/09/2024 à 07:13, Anna-Maria Behnsen a écrit : >>> Hi, >>> >>> a question about which sleeping function should be used in >>> acpi_os_sleep() >>> started a discussion and examination about the existing docum

Re: [PATCH v3] powerpc/pseries/eeh: Fix pseries_eeh_err_inject

2024-09-23 Thread Guenter Roeck
Hi, On Mon, Sep 09, 2024 at 09:02:20AM -0500, Narayana Murty N wrote: > VFIO_EEH_PE_INJECT_ERR ioctl is currently failing on pseries > due to missing implementation of err_inject eeh_ops for pseries. > This patch implements pseries_eeh_err_inject in eeh_ops/pseries > eeh_ops. Implements support fo

Re: [PATCH v5 2/5] perf: Hoist perf_instruction_pointer() and perf_misc_flags()

2024-09-23 Thread Colton Lewis
Thomas Richter writes: On 9/20/24 19:47, Colton Lewis wrote: For clarity, rename the arch-specific definitions of these functions to perf_arch_* to denote they are arch-specifc. Define the generic-named functions in one place where they can call the arch-specific ones as needed. Signed-off-

[PATCH] pci/hotplug/pnv_php: Reduce of_node_put(dn) calls in pnv_php_register_slot()

2024-09-23 Thread Markus Elfring
From: Markus Elfring Date: Mon, 23 Sep 2024 18:32:21 +0200 An of_node_put(dn) call was immediately used after a pointer check for a pnv_php_find_slot() call in this function implementation. Thus call such a function instead directly before the check. This issue was transformed by using the Cocci

Re: [PATCH v3] powerpc/pseries/eeh: Fix pseries_eeh_err_inject

2024-09-23 Thread IBM
Guenter Roeck writes: > Hi, > > On Mon, Sep 09, 2024 at 09:02:20AM -0500, Narayana Murty N wrote: >> VFIO_EEH_PE_INJECT_ERR ioctl is currently failing on pseries >> due to missing implementation of err_inject eeh_ops for pseries. >> This patch implements pseries_eeh_err_inject in eeh_ops/pseries

Re: [PATCH v4 01/13] mm: pgtable: introduce pte_offset_map_{ro|rw}_nolock()

2024-09-23 Thread Muchun Song
> On Sep 24, 2024, at 14:09, Qi Zheng wrote: > > Currently, the usage of pte_offset_map_nolock() can be divided into the > following two cases: > > 1) After acquiring PTL, only read-only operations are performed on the PTE > page. In this case, the RCU lock in pte_offset_map_nolock() will e

[PATCH v4 00/13] introduce pte_offset_map_{ro|rw}_nolock()

2024-09-23 Thread Qi Zheng
patch) - reorder patches - collect the Reviewed-bys - rebase onto the next-20240923 Changes in v3: - change to use VM_WARN_ON_ONCE() instead of BUG_ON() in pte_offset_map_rw_nolock() (David Hildenbrand) - modify the comment above the pte_offset_map_lock() in [PATCH v2 01/14] (David Hildenbra

[PATCH v4 02/13] powerpc: assert_pte_locked() use pte_offset_map_ro_nolock()

2024-09-23 Thread Qi Zheng
In assert_pte_locked(), we just get the ptl and assert if it was already held, so convert it to using pte_offset_map_ro_nolock(). Signed-off-by: Qi Zheng Acked-by: David Hildenbrand Reviewed-by: Muchun Song --- arch/powerpc/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH v4 01/13] mm: pgtable: introduce pte_offset_map_{ro|rw}_nolock()

2024-09-23 Thread Qi Zheng
Currently, the usage of pte_offset_map_nolock() can be divided into the following two cases: 1) After acquiring PTL, only read-only operations are performed on the PTE page. In this case, the RCU lock in pte_offset_map_nolock() will ensure that the PTE page will not be freed, and there is no

[PATCH v4 05/13] arm: adjust_pte() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In do_adjust_pte(), we may modify the pte entry. The corresponding pmd entry may have been modified concurrently. Therefore, in order to ensure the stability if pmd entry, use pte_offset_map_rw_nolock() to replace pte_offset_map_nolock(), and do pmd_same() check after holding the PTL. All callers

[PATCH v4 07/13] mm: khugepaged: collapse_pte_mapped_thp() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In collapse_pte_mapped_thp(), we may modify the pte and pmd entry after acquring the ptl, so convert it to using pte_offset_map_rw_nolock(). At this time, the pte_same() check is not performed after the PTL held. So we should get pgt_pmd and do pmd_same() check after the ptl held. Signed-off-by: Q

[PATCH v4 04/13] mm: khugepaged: __collapse_huge_page_swapin() use pte_offset_map_ro_nolock()

2024-09-23 Thread Qi Zheng
In __collapse_huge_page_swapin(), we just use the ptl for pte_same() check in do_swap_page(). In other places, we directly use pte_offset_map_lock(), so convert it to using pte_offset_map_ro_nolock(). Signed-off-by: Qi Zheng Acked-by: David Hildenbrand Reviewed-by: Muchun Song --- mm/khugepage

[PATCH v4 06/13] mm: handle_pte_fault() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In handle_pte_fault(), we may modify the vmf->pte after acquiring the vmf->ptl, so convert it to using pte_offset_map_rw_nolock(). But since we will do the pte_same() check, so there is no need to get pmdval to do pmd_same() check, just pass a dummy variable to it. Signed-off-by: Qi Zheng Acked-b

[PATCH v4 08/13] mm: copy_pte_range() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In copy_pte_range(), we may modify the src_pte entry after holding the src_ptl, so convert it to using pte_offset_map_rw_nolock(). Since we already hold the exclusive mmap_lock, and the copy_pte_range() and retract_page_tables() are using vma->anon_vma to be exclusive, so the PTE page is stable, th

[PATCH v4 03/13] mm: filemap: filemap_fault_recheck_pte_none() use pte_offset_map_ro_nolock()

2024-09-23 Thread Qi Zheng
In filemap_fault_recheck_pte_none(), we just do pte_none() check, so convert it to using pte_offset_map_ro_nolock(). Signed-off-by: Qi Zheng Acked-by: David Hildenbrand Reviewed-by: Muchun Song --- mm/filemap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/filemap.

[PATCH v4 11/13] mm: userfaultfd: move_pages_pte() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In move_pages_pte(), we may modify the dst_pte and src_pte after acquiring the ptl, so convert it to using pte_offset_map_rw_nolock(). But since we will use pte_same() to detect the change of the pte entry, there is no need to get pmdval, so just pass a dummy variable to it. Signed-off-by: Qi Zhen

[PATCH v4 13/13] mm: pgtable: remove pte_offset_map_nolock()

2024-09-23 Thread Qi Zheng
Now no users are using the pte_offset_map_nolock(), remove it. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song --- Documentation/mm/split_page_table_lock.rst | 3 --- include/linux/mm.h | 2 -- mm/pgtable-generic.c | 21 - 3 f

[PATCH v4 09/13] mm: mremap: move_ptes() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In move_ptes(), we may modify the new_pte after acquiring the new_ptl, so convert it to using pte_offset_map_rw_nolock(). Now new_pte is none, so hpage_collapse_scan_file() path can not find this by traversing file->f_mapping, so there is no concurrency with retract_page_tables(). In addition, we a

[PATCH v4 10/13] mm: page_vma_mapped_walk: map_pte() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In the caller of map_pte(), we may modify the pvmw->pte after acquiring the pvmw->ptl, so convert it to using pte_offset_map_rw_nolock(). At this time, the pte_same() check is not performed after the pvmw->ptl held, so we should get pmdval and do pmd_same() check to ensure the stability of pvmw->pm

[PATCH v4 12/13] mm: multi-gen LRU: walk_pte_range() use pte_offset_map_rw_nolock()

2024-09-23 Thread Qi Zheng
In walk_pte_range(), we may modify the pte entry after holding the ptl, so convert it to using pte_offset_map_rw_nolock(). At this time, the pte_same() check is not performed after the ptl held, so we should get pmdval and do pmd_same() check to ensure the stability of pmd entry. Signed-off-by: Qi