Re: [PATCH v2 0/3] ASoC: Support SAI and MICFIL on i.MX95 platform

2024-01-15 Thread Daniel Baluta
On Fri, Jan 12, 2024 at 7:44 AM Chancel Liu wrote: > > Support SAI and MICFIL on i.MX95 platform > > changes in v2 > - Remove unnecessary "item" in fsl,micfil.yaml > - Don't change alphabetical order in fsl,sai.yaml > > Chancel Liu (3): > ASoC: dt-bindings: fsl,sai: Add compatible string for i.M

[PATCH] powerpc/83xx: Add a null pointer check to mcu_gpiochip_add

2024-01-15 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Cc: Kunwu Chan Signed-off-by: Kunwu Chan --- arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 2 ++ 1 file changed, 2 insertions(+

Re: [PATCH v2] cxl: Fix null pointer dereference in cxl_get_fd

2024-01-15 Thread Frederic Barrat
On 12/01/2024 06:49, Kunwu Chan wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Uniformly handle resource release in error paths. And when an error occurs, an error pointer should be returned. Fixes: bdecf76e319a ("cxl: Fix coredump genera

Re: [kvm-unit-tests PATCH v1 01/18] Makefile: Define __ASSEMBLY__ for assembly files

2024-01-15 Thread Andrew Jones
On Thu, Nov 30, 2023 at 04:07:03AM -0500, Shaoqin Huang wrote: > From: Alexandru Elisei > > There are 25 header files today (found with grep -r "#ifndef __ASSEMBLY__) > with functionality relies on the __ASSEMBLY__ prepocessor constant being > correctly defined to work correctly. So far, kvm-unit

Re: [RFC PATCH] mm: z3fold: rename CONFIG_Z3FOLD to CONFIG_Z3FOLD_DEPRECATED

2024-01-15 Thread Yosry Ahmed
On Mon, Jan 15, 2024 at 4:27 AM Vitaly Wool wrote: > > On Fri, Jan 12, 2024 at 8:31 PM Yosry Ahmed wrote: > > > > The z3fold compressed pages allocator is not widely used, most users use > > zsmalloc. The only disadvantage of zsmalloc in comparison is the > > dependency on MMU, and zbud is a more

Re: [PATCH v2 01/13] mm/Kconfig: CONFIG_PGTABLE_HAS_HUGE_LEAVES

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:11PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Introduce a config option that will be selected as long as huge leaves are > involved in pgtable (thp or hugetlbfs). It would be useful to mark any > code with this new config that can process either hugetlb

Re: [PATCH v2 03/13] mm: Provide generic pmd_thp_or_huge()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:13PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > ARM defines pmd_thp_or_huge(), detecting either a THP or a huge PMD. It > can be a helpful helper if we want to merge more THP and hugetlb code > paths. Make it a generic default implementation, only exist w

Re: [PATCH v2 04/13] mm: Make HPAGE_PXD_* macros even if !THP

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:14PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > These macros can be helpful when we plan to merge hugetlb code into generic > code. Move them out and define them even if !THP. > > We actually already defined HPAGE_PMD_NR for other reasons even if !THP. >

Re: [PATCH v2 06/13] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:16PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Hugepd format for GUP is only used in PowerPC with hugetlbfs. There are > some kernel usage of hugepd (can refer to hugepd_populate_kernel() for > PPC_8XX), however those pages are not candidates for GUP. >

Re: [PATCH v2 07/13] mm/gup: Refactor record_subpages() to find 1st small page

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:17PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > All the fast-gup functions take a tail page to operate, always need to do > page mask calculations before feeding that into record_subpages(). > > Merge that logic into record_subpages(), so that it will do t

Re: [PATCH v2 08/13] mm/gup: Handle hugetlb for no_page_table()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:18PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > no_page_table() is not yet used for hugetlb code paths. Make it prepared. > > The major difference here is hugetlb will return -EFAULT as long as page > cache does not exist, even if VM_SHARED. See hugetlb_f

Re: [PATCH v2 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:19PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Introduce "pud_t pud" in the function, so the code won't dereference *pudp > multiple time. Not only because that looks less straightforward, but also > because if the dereference really happened, it's not cl

Re: [PATCH v2 10/13] mm/gup: Handle huge pud for follow_pud_mask()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:20PM +0800, pet...@redhat.com wrote: > diff --git a/mm/gup.c b/mm/gup.c > index 63845b3ec44f..760406180222 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -525,6 +525,70 @@ static struct page *no_page_table(struct vm_area_struct > *vma, > return NULL; > } > > +

Re: [PATCH v2 11/13] mm/gup: Handle huge pmd for follow_pmd_mask()

2024-01-15 Thread Jason Gunthorpe
On Wed, Jan 03, 2024 at 05:14:21PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Replace pmd_trans_huge() with pmd_thp_or_huge() to also cover pmd_huge() as > long as enabled. > > FOLL_TOUCH and FOLL_SPLIT_PMD only apply to THP, not yet huge. > > Since now follow_trans_huge_pmd() can pro

Re: [RFC PATCH] mm: z3fold: rename CONFIG_Z3FOLD to CONFIG_Z3FOLD_DEPRECATED

2024-01-15 Thread Nhat Pham
On Mon, Jan 15, 2024 at 4:27 AM Vitaly Wool wrote: > > On Fri, Jan 12, 2024 at 8:31 PM Yosry Ahmed wrote: > > > > The z3fold compressed pages allocator is not widely used, most users use > > zsmalloc. The only disadvantage of zsmalloc in comparison is the > > dependency on MMU, and zbud is a more

[PATCH AUTOSEL 6.7 03/14] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 6.7 07/14] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 6.7 06/14] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 6.7 08/14] powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit ede66cd22441820cbd399936bf84fdc4294bc7fa ] With CONFIG_NUMA=n the build fails with: arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes] 275 | int __meminit create_section_

[PATCH AUTOSEL 6.7 10/14] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 6.7 11/14] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 6.6 03/14] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 6.6 06/14] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 6.6 07/14] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 6.6 08/14] powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit ede66cd22441820cbd399936bf84fdc4294bc7fa ] With CONFIG_NUMA=n the build fails with: arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes] 275 | int __meminit create_section_

[PATCH AUTOSEL 6.6 10/14] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 6.6 11/14] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 6.1 03/14] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 6.1 06/14] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 6.1 07/14] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 6.1 08/14] powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit ede66cd22441820cbd399936bf84fdc4294bc7fa ] With CONFIG_NUMA=n the build fails with: arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes] 275 | int __meminit create_section_

[PATCH AUTOSEL 6.1 10/14] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 6.1 11/14] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 5.15 02/12] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 5.15 05/12] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 5.15 06/12] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 5.15 07/12] powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit ede66cd22441820cbd399936bf84fdc4294bc7fa ] With CONFIG_NUMA=n the build fails with: arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes] 275 | int __meminit create_section_

[PATCH AUTOSEL 5.15 09/12] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 5.15 10/12] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 5.10 02/10] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 5.10 04/10] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 5.10 05/10] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 5.10 07/10] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 5.10 08/10] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 5.4 1/7] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 5.4 2/7] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 5.4 3/7] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 5.4 4/7] powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE

2024-01-15 Thread Sasha Levin
From: Stephen Rothwell [ Upstream commit 0d555b57ee660d8a871781c0eebf006e855e918d ] The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlo

[PATCH AUTOSEL 5.4 5/7] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 4.19 1/4] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2024-01-15 Thread Sasha Levin
From: Kunwu Chan [ Upstream commit f46c8a75263f97bda13c739ba1c90aced0d3b071 ] kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michae

[PATCH AUTOSEL 4.19 2/4] powerpc: Fix build error due to is_valid_bugaddr()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit f8d3555355653848082c351fa90775214fb8a4fa ] With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long

[PATCH AUTOSEL 4.19 3/4] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2024-01-15 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ] With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 |

[PATCH AUTOSEL 4.19 4/4] powerpc/lib: Validate size for vector operations

2024-01-15 Thread Sasha Levin
From: Naveen N Rao [ Upstream commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 ] Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the ass

[PATCH AUTOSEL 6.7 08/19] crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings

2024-01-15 Thread Sasha Levin
From: "Gustavo A. R. Silva" [ Upstream commit aaa03fdb56c781db4a4831dd5d6ec8817918c726 ] The compiler doesn't know that `32` is an offset into the Hash table: 56 struct Hash_ctx { 57 u8 H[16]; /* subkey */ 58 u8 Htable[256]; /* Xi, Hash table(offset 32) */ 59 }; So, i

[PATCH AUTOSEL 6.6 08/19] crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings

2024-01-15 Thread Sasha Levin
From: "Gustavo A. R. Silva" [ Upstream commit aaa03fdb56c781db4a4831dd5d6ec8817918c726 ] The compiler doesn't know that `32` is an offset into the Hash table: 56 struct Hash_ctx { 57 u8 H[16]; /* subkey */ 58 u8 Htable[256]; /* Xi, Hash table(offset 32) */ 59 }; So, i

[PATCH AUTOSEL 6.7 02/21] arch: consolidate arch_irq_work_raise prototypes

2024-01-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 64bac5ea17d527872121adddfee869c7a0618f8f ] The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working

[PATCH AUTOSEL 6.6 02/19] arch: consolidate arch_irq_work_raise prototypes

2024-01-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 64bac5ea17d527872121adddfee869c7a0618f8f ] The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working

[PATCH AUTOSEL 6.1 01/14] arch: consolidate arch_irq_work_raise prototypes

2024-01-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 64bac5ea17d527872121adddfee869c7a0618f8f ] The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working

[PATCH AUTOSEL 5.15 01/11] arch: consolidate arch_irq_work_raise prototypes

2024-01-15 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 64bac5ea17d527872121adddfee869c7a0618f8f ] The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working

Re: [PATCH v5] powerpc/pseries/vas: Use usleep_range() to support HCALL delay

2024-01-15 Thread Haren Myneni
On 1/11/24 9:27 AM, Nathan Lynch wrote: Haren Myneni writes: VAS allocate, modify and deallocate HCALLs returns H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy delay and expects OS to reissue HCALL after that delay. But using msleep() will often sleep at least 20 msecs even th

Re: [RFC PATCH] mm: z3fold: rename CONFIG_Z3FOLD to CONFIG_Z3FOLD_DEPRECATED

2024-01-15 Thread Sergey Senozhatsky
On (24/01/15 08:47), Yosry Ahmed wrote: > > At this point I NACK this patch. We're about to submit an allocator > > which is clearly better that z3fold and is faster that zsmalloc in > > most cases and that submission will mark z3fold as deprecated. But for > > now this move is premature. > > I thi

Re: [RFC PATCH] mm: z3fold: rename CONFIG_Z3FOLD to CONFIG_Z3FOLD_DEPRECATED

2024-01-15 Thread Vitaly Wool
On Fri, Jan 12, 2024 at 8:31 PM Yosry Ahmed wrote: > > The z3fold compressed pages allocator is not widely used, most users use > zsmalloc. The only disadvantage of zsmalloc in comparison is the > dependency on MMU, and zbud is a more common option for !MMU as it was > the default zswap allocator

[PATCH 00/42] Fix coccicheck warnings

2024-01-15 Thread Li Zhijian
make coccicheck COCCI=$PWD/scripts/coccinelle/api/device_attr_show.cocci` complians some warnnings as following[1]: Not sure if someone had tried these fixes, feel free to ignore this patch set if we have come to a *NOT-FIX* conclusion before :) This patch set also fix a few snprintf() beside coc

[PATCH 25/42] drivers/scsi/ibmvscsi: Convert snprintf to sysfs_emit

2024-01-15 Thread Li Zhijian
Per filesystems/sysfs.rst, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. coccinelle complains that there are still a couple of functions that use snprintf(). Convert them to sysfs_emit(). > ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:8-16

[PATCH v6] powerpc/pseries/vas: Use usleep_range() to support HCALL delay

2024-01-15 Thread Haren Myneni
VAS allocate, modify and deallocate HCALLs returns H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy delay and expects OS to reissue HCALL after that delay. But using msleep() will often sleep at least 20 msecs even though the hypervisor suggests OS reissue these HCALLs after 1 or 10ms

Re: [PATCH v2 06/13] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing

2024-01-15 Thread Christophe Leroy
Le 15/01/2024 à 19:37, Jason Gunthorpe a écrit : > On Wed, Jan 03, 2024 at 05:14:16PM +0800, pet...@redhat.com wrote: >> From: Peter Xu >> >> Hugepd format for GUP is only used in PowerPC with hugetlbfs. There are >> some kernel usage of hugepd (can refer to hugepd_populate_kernel() for >> PPC_