Re: [PATCH v11 05/40] virtio_ring: split vring_virtqueue

2022-06-29 Thread Jason Wang
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote: > > Separate the two inline structures(split and packed) from the structure > vring_virtqueue. > > In this way, we can use these two structures later to pass parameters > and retain temporary variables. > > Signed-off-by: Xuan Zhuo Acked-by: Jason

Re: [PATCH v11 02/40] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-06-29 Thread Jason Wang
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote: > > reset can be divided into the following four steps (example): > 1. transport: notify the device to reset the queue > 2. vring: recycle the buffer submitted > 3. vring: reset/resize the vring (may re-alloc) > 4. transport: mmap vring

Re: [PATCH v11 01/40] virtio: add helper virtqueue_get_vring_max_size()

2022-06-29 Thread Jason Wang
On Wed, Jun 29, 2022 at 2:57 PM Xuan Zhuo wrote: > > Record the maximum queue num supported by the device. > > virtio-net can display the maximum (supported by hardware) ring size in > ethtool -g eth0. > > When the subsequent patch implements vring reset, it can judge whether > the ring size passe

[PATCH V6 26/26] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Now all the platforms enable ARCH_HAS_GET_PAGE_PROT. They define and export own vm_get_page_prot() whether custom or standard DECLARE_VM_GET_PAGE_PROT. Hence there is no need for default generic fallback for vm_get_page_prot(). Just drop this fallback and also ARCH_HAS_GET_PAGE_PROT mechanism. Cc:

[PATCH V6 25/26] sh/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Yoshinori

[PATCH V6 24/26] um/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jeff Dike

[PATCH V6 23/26] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Russell K

[PATCH V6 22/26] arc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Vineet Gu

[PATCH V6 21/26] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas Bo

[PATCH V6 20/26] mips/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Thomas Bo

[PATCH V6 19/26] ia64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: linux-i..

[PATCH V6 18/26] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Heiko Car

[PATCH V6 17/26] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Geert Uyt

[PATCH V6 16/26] riscv/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Paul Walm

[PATCH V6 15/26] nios2/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Dinh Nguy

[PATCH V6 14/26] alpha/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Richard H

[PATCH V6 13/26] parisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: "James E.

[PATCH V6 12/26] hexagon/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Brian Cai

[PATCH V6 11/26] xtensa/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Chris Zan

[PATCH V6 10/26] openrisc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Jonas Bon

[PATCH V6 09/26] loongarch/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Huacai Ch

[PATCH V6 08/26] microblaze/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This enables ARCH_HAS_VM_GET_PAGE_PROT on the platform and exports standard vm_get_page_prot() implementation via DECLARE_VM_GET_PAGE_PROT, which looks up a private and static protection_map[] array. Subsequently all __SXXX and __PXXX macros can be dropped which are no longer needed. Cc: Michal Si

[PATCH V6 07/26] mm/mmap: Build protect protection_map[] with ARCH_HAS_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
Now that protection_map[] has been moved inside those platforms that enable ARCH_HAS_VM_GET_PAGE_PROT. Hence generic protection_map[] array now can be protected with CONFIG_ARCH_HAS_VM_GET_PAGE_PROT intead of __P000. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux-ker...@vger.kernel.org Review

[PATCH V6 06/26] x86/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. This also defines a helper function add_encrypt_protection_map() that can update the protection_map[] array with pgprot_encrypted(). Cc: Thomas Gleixner Cc: Ingo Molnar Cc: x...@kernel.org Cc: linux-ker...@vger.kernel.org Rev

[PATCH V6 05/26] arm64/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and makes it a static. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Catalin Marinas Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-prot.h | 18 ---

[PATCH V6 04/26] sparc/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit platforms via DECLARE_VM_GET_PAGE_PROT. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by: Anshuman Khandual

[PATCH V6 03/26] powerpc/mm: Move protection_map[] inside the platform

2022-06-29 Thread Anshuman Khandual
This moves protection_map[] inside the platform and while here, also enable ARCH_HAS_VM_GET_PAGE_PROT on 32 bit and nohash 64 (aka book3e/64) platforms via DECLARE_VM_GET_PAGE_PROT. Cc: Michael Ellerman Cc: Paul Mackerras Cc: Nicholas Piggin Cc: linuxppc-...@lists.ozlabs.org Cc: linux-ker...@vg

[PATCH V6 02/26] mm/mmap: Define DECLARE_VM_GET_PAGE_PROT

2022-06-29 Thread Anshuman Khandual
This just converts the generic vm_get_page_prot() implementation into a new macro i.e DECLARE_VM_GET_PAGE_PROT which later can be used across platforms when enabling them with ARCH_HAS_VM_GET_PAGE_PROT. This does not create any functional change. Cc: Andrew Morton Cc: linux...@kvack.org Cc: linux

[PATCH V6 01/26] mm/mmap: Build protect protection_map[] with __P000

2022-06-29 Thread Anshuman Khandual
Build protect generic protection_map[] array with __P000, so that it can be moved inside all the platforms one after the other. Otherwise there will be build failures during this process. CONFIG_ARCH_HAS_VM_GET_PAGE_PROT cannot be used for this purpose as only certain platforms enable this config n

[PATCH V6 00/26] mm/mmap: Drop __SXXX/__PXXX macros from across platforms

2022-06-29 Thread Anshuman Khandual
__SXXX/__PXXX macros is an unnecessary abstraction layer in creating the generic protection_map[] array which is used for vm_get_page_prot(). This abstraction layer can be avoided, if the platforms just define the array protection_map[] for all possible vm_flags access permission combinations and a

Re: [PATCH v4 12/12] sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state

2022-06-29 Thread Alexander Gordeev
On Tue, Jun 28, 2022 at 10:39:59PM -0500, Eric W. Biederman wrote: > Steven Rostedt writes: > > > On Tue, 28 Jun 2022 17:42:22 -0500 > > "Eric W. Biederman" wrote: > > > >> diff --git a/kernel/ptrace.c b/kernel/ptrace.c > >> index 156a99283b11..cb85bcf84640 100644 > >> --- a/kernel/ptrace.c > >>