[PATCH] um: vector: refactor deprecated strncpy

2023-08-07 Thread Justin Stitt
eof(ifr.ifr_name)); if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) { err = -errno; goto raw_fd_cleanup; --- base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2 change-id: 20230807-arch-um-drivers-ad44050885d0 Best regards, -- Justin Stitt _

[PATCH] um: refactor deprecated strncpy to strtomem

2023-08-07 Thread Justin Stitt
size_t) len, ARRAY_SIZE(console_buf)); - strncpy(console_buf, string, n); + n = min_t(size_t, len, MCONSOLE_MAX_DATA); + strtomem(console_buf, string); string += n; len -= n; --- base-commit: c1a515d3c0270628df8ae5f5118ba859b8546

Re: [PATCH] um: refactor deprecated strncpy to strtomem

2023-08-07 Thread Bill Wendling
; + n = min_t(size_t, len, MCONSOLE_MAX_DATA); > + strtomem(console_buf, string); > string += n; > len -= n; > > > --- > base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2 > change-id: 20230807-arch-um-3ef24413427e > > Best regards, > -- > Justin Stitt > ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

[PATCH mm-unstable v9 00/31] Split ptdesc from struct page

2023-08-07 Thread Vishal Moola (Oracle)
The MM subsystem is trying to shrink struct page. This patchset introduces a memory descriptor for page table tracking - struct ptdesc. This patchset introduces ptdesc, splits ptdesc from struct page, and converts many callers of page table constructor/destructors to use ptdescs. Ptdesc is a foun

[PATCH mm-unstable v9 02/31] pgtable: create struct ptdesc

2023-08-07 Thread Vishal Moola (Oracle)
Currently, page table information is stored within struct page. As part of simplifying struct page, create struct ptdesc for page table information. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm_types.h | 70 1

[PATCH mm-unstable v9 01/31] mm: Add PAGE_TYPE_OP folio functions

2023-08-07 Thread Vishal Moola (Oracle)
No folio equivalents for page type operations have been defined, so define them for later folio conversions. Also changes the Page##uname macros to take in const struct page* since we only read the memory here. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linu

[PATCH mm-unstable v9 03/31] mm: add utility functions for ptdesc

2023-08-07 Thread Vishal Moola (Oracle)
Introduce utility functions setting the foundation for ptdescs. These will also assist in the splitting out of ptdesc from struct page. Functions that focus on the descriptor are prefixed with ptdesc_* while functions that focus on the pagetable are prefixed with pagetable_*. pagetable_alloc() i

[PATCH mm-unstable v9 04/31] mm: Convert pmd_pgtable_page() callers to use pmd_ptdesc()

2023-08-07 Thread Vishal Moola (Oracle)
Converts internal pmd_pgtable_page() callers to use pmd_ptdesc(). This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 4 ++-- 1 file changed, 2

[PATCH mm-unstable v9 05/31] mm: Convert ptlock_alloc() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 6 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) di

[PATCH mm-unstable v9 06/31] mm: Convert ptlock_ptr() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/x86/xen/mmu_pv.c | 2 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 de

[PATCH mm-unstable v9 07/31] mm: Convert pmd_ptlock_init() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH mm-unstable v9 09/31] mm: Convert pmd_ptlock_free() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH mm-unstable v9 08/31] mm: Convert ptlock_init() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/li

[PATCH mm-unstable v9 11/31] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-08-07 Thread Vishal Moola (Oracle)
Create pagetable_pte_ctor(), pagetable_pmd_ctor(), pagetable_pte_dtor(), and pagetable_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 56 ++

[PATCH mm-unstable v9 10/31] mm: Convert ptlock_free() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- mm/memory.c| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(

[PATCH mm-unstable v9 13/31] x86: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

[PATCH mm-unstable v9 12/31] powerpc: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/powerpc/mm/book3s64/mmu_context.c | 10 ++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +++--- arch/powerpc/mm/pgtab

[PATCH mm-unstable v9 14/31] s390: Convert various pgalloc functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 15/31] mm: remove page table members from struct page

2023-08-07 Thread Vishal Moola (Oracle)
The page table members are now split out into their own ptdesc struct. Remove them from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm_types.h | 21 - 1 file changed, 21 deletions(-) diff --git a/include/linux/mm_types.h

[PATCH mm-unstable v9 16/31] pgalloc: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 17/31] arm: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. late_alloc() also uses the __get_free_pages() helper function. Convert this to use pagetable_alloc() and ptdesc_address() instead to help standardize

[PATCH mm-unstable v9 18/31] arm64: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Acked-by: Mike Rapoport (IBM) Acked-by: Catalin Marinas Signed-off-by: Vishal Moola (Oracle) --- arch/arm64/include/asm/tlb.h | 14 --

[PATCH mm-unstable v9 21/31] loongarch: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 19/31] csky: Convert __pte_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Acked-by: Guo Ren Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/csky/include/asm/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky

[PATCH mm-unstable v9 20/31] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/hexagon/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/hexagon/include/

[PATCH mm-unstable v9 22/31] m68k: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 23/31] mips: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 25/31] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/openrisc/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/includ

[PATCH mm-unstable v9 24/31] nios2: Convert __pte_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Acked-by: Mike Rapoport (IBM) Acked-by: Dinh Nguyen Signed-off-by: Vishal Moola (Oracle) --- arch/nios2/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/

[PATCH mm-unstable v9 26/31] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v9 27/31] sh: Convert pte_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Reviewed-by: Geert Uytterhoeven Acked-by: John Paul Adrian Glaubitz Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/sh/include/asm/pgallo

[PATCH mm-unstable v9 29/31] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/spar

[PATCH mm-unstable v9 30/31] um: Convert {pmd, pte}_free_tlb() to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/um/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deleti

[PATCH mm-unstable v9 28/31] sparc64: Convert various functions to use ptdescs

2023-08-07 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- arch/sparc/mm/init_64.c | 17 + 1 file changed, 9 insertions

[PATCH mm-unstable v9 31/31] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers

2023-08-07 Thread Vishal Moola (Oracle)
These functions are no longer necessary. Remove them and cleanup Documentation referencing them. Acked-by: Mike Rapoport (IBM) Signed-off-by: Vishal Moola (Oracle) --- Documentation/mm/split_page_table_lock.rst| 12 +-- .../zh_CN/mm/split_page_table_lock.rst| 14 ++--

Re: [PATCH] um: vector: refactor deprecated strncpy

2023-08-07 Thread Anton Ivanov
1); + strscpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) { err = -errno; goto raw_fd_cleanup; --- base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2 change-id: 20230807-arch-um-driv