Re: [PATCH v6 03/10] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing

2021-04-19 Thread wangyanan (Y)
On 2021/4/19 16:22, David Laight wrote: From: wangyanan (Y) Sent: 19 April 2021 07:40 Hi Paolo, On 2021/4/17 21:23, Paolo Bonzini wrote: On 30/03/21 10:08, Yanan Wang wrote: In addition to function of CLOCK_MONOTONIC, flag CLOCK_MONOTONIC_RAW can also shield possiable impact of NTP, which

Re: [PATCH v6 03/10] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing

2021-04-19 Thread wangyanan (Y)
Hi Paolo, On 2021/4/17 21:23, Paolo Bonzini wrote: On 30/03/21 10:08, Yanan Wang wrote: In addition to function of CLOCK_MONOTONIC, flag CLOCK_MONOTONIC_RAW can also shield possiable impact of NTP, which can provide more robustness. Suggested-by: Vitaly Kuznetsov Signed-off-by: Yanan Wang

Re: [PATCH v4 1/2] KVM: arm64: Move CMOs from user_mem_abort to the fault handlers

2021-04-09 Thread wangyanan (Y)
Hi Quentin, On 2021/4/9 16:08, Quentin Perret wrote: Hi Yanan, On Friday 09 Apr 2021 at 11:36:51 (+0800), Yanan Wang wrote: diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c +static void stage2_invalidate_icache(void *addr, u64 size) +{ + if (icache_is_aliasing())

Re: [RFC PATCH v3 2/2] KVM: arm64: Distinguish cases of memcache allocations completely

2021-04-08 Thread wangyanan (Y)
On 2021/4/7 23:35, Alexandru Elisei wrote: Hi Yanan, On 3/26/21 3:16 AM, Yanan Wang wrote: With a guest translation fault, the memcache pages are not needed if KVM is only about to install a new leaf entry into the existing page table. And with a guest permission fault, the memcache pages

Re: [RFC PATCH v3 1/2] KVM: arm64: Move CMOs from user_mem_abort to the fault handlers

2021-04-08 Thread wangyanan (Y)
Hi Alex, On 2021/4/7 23:31, Alexandru Elisei wrote: Hi Yanan, On 3/26/21 3:16 AM, Yanan Wang wrote: We currently uniformly permorm CMOs of D-cache and I-cache in function user_mem_abort before calling the fault handlers. If we get concurrent guest faults(e.g. translation faults, permission

Re: [PATCH v6 00/10] KVM: selftests: some improvement and a new test for kvm page table

2021-04-05 Thread wangyanan (Y)
Kindly ping... Hi Paolo, Will this series be picked up soon, or is there any other work for me to do? Regards, Yanan On 2021/3/30 16:08, Yanan Wang wrote: Hi, This v6 series can mainly include two parts. Rebased on kvm queue branch:

Re: [RFC PATCH v5 10/10] KVM: selftests: Add a test for kvm page table code

2021-03-29 Thread wangyanan (Y)
Hi Drew, Thanks for having a look. On 2021/3/29 19:38, Andrew Jones wrote: On Tue, Mar 23, 2021 at 09:52:31PM +0800, Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some

Re: [RFC PATCH 4/4] KVM: arm64: Distinguish cases of memcache allocations completely

2021-03-25 Thread wangyanan (Y)
Hi Alex, On 2021/3/26 1:26, Alexandru Elisei wrote: Hi Yanan, On 2/8/21 11:22 AM, Yanan Wang wrote: With a guest translation fault, the memcache pages are not needed if KVM is only about to install a new leaf entry into the existing page table. And with a guest permission fault, the memcache

Re: [RFC PATCH v5 10/10] KVM: selftests: Add a test for kvm page table code

2021-03-23 Thread wangyanan (Y)
Hi Drew, BTW, any thoughts about the change in this patch? :) Thanks, Yanan On 2021/3/23 21:52, Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm.

Re: [RFC PATCH v5 00/10] KVM: selftests: some improvement and a new test for kvm page table

2021-03-23 Thread wangyanan (Y)
On 2021/3/23 23:58, Sean Christopherson wrote: On Tue, Mar 23, 2021, Yanan Wang wrote: Hi, This v5 series can mainly include two parts. Based on kvm queue branch: https://git.kernel.org/pub/scm/virt/kvm/kvm.git/log/?h=queue Given the number of Reviewed-by tags, I'm pretty sure you can drop

Re: [RFC PATCH v5 02/10] tools headers: Add a macro to get HUGETLB page sizes for mmap

2021-03-23 Thread wangyanan (Y)
On 2021/3/23 22:03, Andrew Jones wrote: $SUBJECT says "tools headers", but this is actually changing a UAPI header and then copying the change to tools. Indeed. I think head of the subject should be "mm/hugetlb". I will fix it. Thanks, Yanan Thanks, drew On Tue, Mar 23, 2021 at 09:52:23PM

Re: [RFC PATCH 3/4] KVM: arm64: Install the block entry before unmapping the page mappings

2021-03-22 Thread wangyanan (Y)
on this patch, since it's easier to get the full context. On 3/4/21 7:07 AM, wangyanan (Y) wrote: Hi Alex, On 2021/3/4 1:27, Alexandru Elisei wrote: Hi Yanan, On 3/3/21 11:04 AM, wangyanan (Y) wrote: Hi Alex, On 2021/3/3 1:13, Alexandru Elisei wrote: Hello, On 2/8/21 11:22 AM, Yanan Wang wrote

Re: [RFC PATCH v4 9/9] KVM: selftests: Add a test for kvm page table code

2021-03-22 Thread wangyanan (Y)
On 2021/3/12 22:20, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:51PM +0800, Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function

Re: [RFC PATCH v4 7/9] KVM: selftests: List all hugetlb src types specified with page sizes

2021-03-22 Thread wangyanan (Y)
On 2021/3/12 20:02, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:49PM +0800, Yanan Wang wrote: With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system default hugetlb pages to back the testing guest memory. In order to add flexibility, now list all the known hugetlb backing

Re: [RFC PATCH v4 7/9] KVM: selftests: List all hugetlb src types specified with page sizes

2021-03-22 Thread wangyanan (Y)
On 2021/3/12 19:49, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:49PM +0800, Yanan Wang wrote: With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system default hugetlb pages to back the testing guest memory. In order to add flexibility, now list all the known hugetlb backing

Re: [RFC PATCH v4 6/9] KVM: selftests: Add a helper to get system default hugetlb page size

2021-03-22 Thread wangyanan (Y)
On 2021/3/12 19:40, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:48PM +0800, Yanan Wang wrote: If HUGETLB is configured in the host kernel, then we can know the system default hugetlb page size through *cat /proc/meminfo*. Otherwise, we will not see the information of hugetlb pages in

Re: [RFC PATCH v4 5/9] KVM: selftests: Add a helper to get system configured THP page size

2021-03-22 Thread wangyanan (Y)
Hi Drew, Thanks for your attention to this series! On 2021/3/12 19:31, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:47PM +0800, Yanan Wang wrote: If we want to have some tests about transparent hugepages, the system configured THP hugepage size should better be known by the tests, which

Re: [RFC PATCH v4 2/9] tools headers: Add a macro to get HUGETLB page sizes for mmap

2021-03-14 Thread wangyanan (Y)
On 2021/3/12 19:14, Andrew Jones wrote: On Tue, Mar 02, 2021 at 08:57:44PM +0800, Yanan Wang wrote: We know that if a system supports multiple hugetlb page sizes, the desired hugetlb page size can be specified in bits [26:31] of the flag arguments. The value in these 6 bits will be the shift

Re: [RFC PATCH v4 0/9] KVM: selftests: some improvement and a new test for kvm page table

2021-03-11 Thread wangyanan (Y)
Hi all, Kindly ping :)! Are there any further comments for this v4 series? Please let me know if there is still something that needs fixing. Or is this v4 series fine enough to be queued? Most of the patches have been added with Reviewed-by. If there are merge conflicts with the newest

Re: [PATCH 2/2] KVM: arm64: Skip the cache flush when coalescing tables into a block

2021-03-09 Thread wangyanan (Y)
On 2021/3/9 16:43, Marc Zyngier wrote: On Tue, 09 Mar 2021 08:34:43 +, "wangyanan (Y)" wrote: On 2021/3/9 0:34, Will Deacon wrote: On Mon, Jan 25, 2021 at 10:10:44PM +0800, Yanan Wang wrote: After dirty-logging is stopped for a VM configured with huge mappings, KVM wi

Re: [PATCH 2/2] KVM: arm64: Skip the cache flush when coalescing tables into a block

2021-03-09 Thread wangyanan (Y)
On 2021/3/9 0:34, Will Deacon wrote: On Mon, Jan 25, 2021 at 10:10:44PM +0800, Yanan Wang wrote: After dirty-logging is stopped for a VM configured with huge mappings, KVM will recover the table mappings back to block mappings. As we only replace the existing page tables with a block entry

Re: [RFC PATCH 3/4] KVM: arm64: Install the block entry before unmapping the page mappings

2021-03-03 Thread wangyanan (Y)
On 2021/3/4 15:07, wangyanan (Y) wrote: Hi Alex, On 2021/3/4 1:27, Alexandru Elisei wrote: Hi Yanan, On 3/3/21 11:04 AM, wangyanan (Y) wrote: Hi Alex, On 2021/3/3 1:13, Alexandru Elisei wrote: Hello, On 2/8/21 11:22 AM, Yanan Wang wrote: When KVM needs to coalesce the normal page

Re: [RFC PATCH 3/4] KVM: arm64: Install the block entry before unmapping the page mappings

2021-03-03 Thread wangyanan (Y)
Hi Alex, On 2021/3/4 1:27, Alexandru Elisei wrote: Hi Yanan, On 3/3/21 11:04 AM, wangyanan (Y) wrote: Hi Alex, On 2021/3/3 1:13, Alexandru Elisei wrote: Hello, On 2/8/21 11:22 AM, Yanan Wang wrote: When KVM needs to coalesce the normal page mappings into a block mapping, we currently

Re: [RFC PATCH 3/4] KVM: arm64: Install the block entry before unmapping the page mappings

2021-03-03 Thread wangyanan (Y)
Hi Alex, On 2021/3/3 1:13, Alexandru Elisei wrote: Hello, On 2/8/21 11:22 AM, Yanan Wang wrote: When KVM needs to coalesce the normal page mappings into a block mapping, we currently invalidate the old table entry first followed by invalidation of TLB, then unmap the page mappings, and

Re: [RFC PATCH v3 6/8] KVM: selftests: List all hugetlb src types specified with page sizes

2021-03-02 Thread wangyanan (Y)
Hi Ben, On 2021/3/2 1:09, Ben Gardon wrote: On Sun, Feb 28, 2021 at 11:00 PM Yanan Wang wrote: With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system default hugetlb pages to back the testing guest memory. In order to add flexibility, now list all the known hugetlb backing src

Re: [RFC PATCH 3/4] KVM: arm64: Install the block entry before unmapping the page mappings

2021-02-28 Thread wangyanan (Y)
On 2021/2/8 19:22, Yanan Wang wrote: When KVM needs to coalesce the normal page mappings into a block mapping, we currently invalidate the old table entry first followed by invalidation of TLB, then unmap the page mappings, and install the block entry at last. It will cost a long time to

Re: [RFC PATCH 1/4] KVM: arm64: Move the clean of dcache to the map handler

2021-02-26 Thread wangyanan (Y)
On 2021/2/25 17:55, Marc Zyngier wrote: Hi Yanan, On Mon, 08 Feb 2021 11:22:47 +, Yanan Wang wrote: We currently uniformly clean dcache in user_mem_abort() before calling the fault handlers, if we take a translation fault and the pfn is cacheable. But if there are concurrent translation

Re: [RFC PATCH 1/4] KVM: arm64: Move the clean of dcache to the map handler

2021-02-26 Thread wangyanan (Y)
Hi Marc, Alex, On 2021/2/26 2:30, Marc Zyngier wrote: On Thu, 25 Feb 2021 17:39:00 +, Alexandru Elisei wrote: Hi Marc, On 2/25/21 9:55 AM, Marc Zyngier wrote: Hi Yanan, On Mon, 08 Feb 2021 11:22:47 +, Yanan Wang wrote: We currently uniformly clean dcache in user_mem_abort()

Re: [RFC PATCH v2 3/7] KVM: selftests: Make a generic helper to get vm guest mode strings

2021-02-25 Thread wangyanan (Y)
On 2021/2/25 13:59, Yanan Wang wrote: For generality and conciseness, make an API which can be used in all kvm libs and selftests to get vm guest mode strings. And the index i is checked in the API in case of possiable faults. Signed-off-by: Yanan Wang And here too, will include

Re: [RFC PATCH v2 6/7] KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers

2021-02-25 Thread wangyanan (Y)
On 2021/2/26 7:44, Ben Gardon wrote: On Wed, Feb 24, 2021 at 10:03 PM Yanan Wang wrote: With VM_MEM_SRC_ANONYMOUS_THP specified in vm_userspace_mem_region_add(), we have to get the transparent hugepage size for HVA alignment. With the new helpers, we can use get_backing_src_pagesz() to check

Re: [RFC PATCH v2 5/7] KVM: selftests: List all hugetlb src types specified with page sizes

2021-02-25 Thread wangyanan (Y)
On 2021/2/26 7:42, Ben Gardon wrote: On Wed, Feb 24, 2021 at 10:03 PM Yanan Wang wrote: With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system default hugetlb pages to back the testing guest memory. In order to add flexibility, now list all the known hugetlb backing src types

Re: [RFC PATCH v2 2/7] KVM: selftests: Use flag CLOCK_MONOTONIC_RAW for timing

2021-02-25 Thread wangyanan (Y)
On 2021/2/26 2:54, Andrew Jones wrote: On Thu, Feb 25, 2021 at 01:59:35PM +0800, Yanan Wang wrote: In addition to function of CLOCK_MONOTONIC, flag CLOCK_MONOTONIC_RAW can also shield possiable impact of NTP, which can provide more robustness. IIRC, this should include Suggested-by: Vitaly

Re: [PATCH 04/15] KVM: selftests: Force stronger HVA alignment (1gb) for hugepages

2021-02-25 Thread wangyanan (Y)
On 2021/2/11 7:06, Sean Christopherson wrote: Align the HVA for hugepage memslots to 1gb, as opposed to incorrectly assuming all architectures' hugepages are 512*page_size. For x86, multiplying by 512 is correct, but only for 2mb pages, e.g. systems that support 1gb pages will never be able

Re: [PATCH 03/15] KVM: selftests: Align HVA for HugeTLB-backed memslots

2021-02-24 Thread wangyanan (Y)
Hi Sean, On 2021/2/11 7:06, Sean Christopherson wrote: Align the HVA for HugeTLB memslots, not just THP memslots. Add an assert so any future backing types are forced to assess whether or not they need to be aligned. Cc: Ben Gardon Cc: Yanan Wang Cc: Andrew Jones Cc: Peter Xu Cc: Aaron

Re: [RFC PATCH 0/4] KVM: arm64: Improve efficiency of stage2 page table

2021-02-24 Thread wangyanan (Y)
On 2021/2/25 1:20, Alexandru Elisei wrote: Hi, On 2/24/21 2:35 AM, wangyanan (Y) wrote: Hi Alex, On 2021/2/23 23:55, Alexandru Elisei wrote: Hi Yanan, I wanted to review the patches, but unfortunately I get an error when trying to apply the first patch in the series: Applying: KVM

Re: [RFC PATCH 0/4] KVM: arm64: Improve efficiency of stage2 page table

2021-02-23 Thread wangyanan (Y)
Hi Alex, On 2021/2/23 23:55, Alexandru Elisei wrote: Hi Yanan, I wanted to review the patches, but unfortunately I get an error when trying to apply the first patch in the series: Applying: KVM: arm64: Move the clean of dcache to the map handler error: patch failed:

Re: [PATCH][next] net: hns3: Fix uninitialized return from function

2021-02-17 Thread lipeng (Y)
在 2021/2/10 23:26, Colin King 写道: From: Colin Ian King Currently function hns3_reset_notify_uninit_enet is returning the contents of the uninitialized variable ret. Fix this by removing ret (since it is no longer used) and replace it with a return of the literal value 0. you can not

Re: [RFC PATCH 2/2] KVM: selftests: Add a test for kvm page table code

2021-02-10 Thread wangyanan (Y)
On 2021/2/10 1:57, Ben Gardon wrote: On Tue, Feb 9, 2021 at 1:43 AM wangyanan (Y) wrote: On 2021/2/9 4:29, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings),

Re: [RFC PATCH 2/2] KVM: selftests: Add a test for kvm page table code

2021-02-09 Thread wangyanan (Y)
On 2021/2/10 1:38, Ben Gardon wrote: On Mon, Feb 8, 2021 at 11:22 PM wangyanan (Y) wrote: Hi Ben, On 2021/2/9 4:29, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappi

Re: [RFC PATCH 1/2] KVM: selftests: Add a macro to get string of vm_mem_backing_src_type

2021-02-09 Thread wangyanan (Y)
On 2021/2/10 1:35, Sean Christopherson wrote: On Tue, Feb 09, 2021, Ben Gardon wrote: On Tue, Feb 9, 2021 at 3:21 AM wangyanan (Y) wrote: On 2021/2/9 2:13, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: Add a macro to get string of the backing source memory type, so

Re: [RFC PATCH 1/2] KVM: selftests: Add a macro to get string of vm_mem_backing_src_type

2021-02-09 Thread wangyanan (Y)
On 2021/2/9 2:13, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: Add a macro to get string of the backing source memory type, so that application can add choices for source types in the help() function, and users can specify which type to use for testing. Coincidentally,

Re: [RFC PATCH 1/2] KVM: selftests: Add a macro to get string of vm_mem_backing_src_type

2021-02-09 Thread wangyanan (Y)
Hi Sean, On 2021/2/9 1:43, Sean Christopherson wrote: On Mon, Feb 08, 2021, Yanan Wang wrote: Add a macro to get string of the backing source memory type, so that application can add choices for source types in the help() function, and users can specify which type to use for testing.

Re: [RFC PATCH 2/2] KVM: selftests: Add a test for kvm page table code

2021-02-09 Thread wangyanan (Y)
On 2021/2/9 4:29, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code()

Re: [RFC PATCH 2/2] KVM: selftests: Add a test for kvm page table code

2021-02-08 Thread wangyanan (Y)
Hi Ben, On 2021/2/9 4:29, Ben Gardon wrote: On Mon, Feb 8, 2021 at 1:08 AM Yanan Wang wrote: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function

Re: [RFC PATCH 2/2] KVM: selftests: Add a test for kvm page table code

2021-02-08 Thread wangyanan (Y)
Hi Vitaly, On 2021/2/8 18:21, Vitaly Kuznetsov wrote: Yanan Wang writes: This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() is designed

Re: [PATCH v2 3/3] KVM: arm64: Mark the page dirty only if the fault is handled successfully

2021-01-14 Thread wangyanan (Y)
On 2021/1/13 23:51, Will Deacon wrote: On Wed, Dec 16, 2020 at 08:28:44PM +0800, Yanan Wang wrote: We now mark the page dirty and set the bitmap before calling fault handlers in user_mem_abort(), and we might end up having spurious dirty pages if update of permissions or mapping has failed.

Re: [PATCH v2 2/3] KVM: arm64: Add prejudgement for relaxing permissions only case in stage2 translation fault handler

2021-01-14 Thread wangyanan (Y)
On 2021/1/13 23:44, Will Deacon wrote: On Wed, Dec 16, 2020 at 08:28:43PM +0800, Yanan Wang wrote: In dirty-logging, or dirty-logging-stopped time, even normal running time of a guest configed with huge mappings and numbers of vCPUs, translation faults by different vCPUs on the same GPA could

Re: [PATCH v2 0/3] RFC: Solve several problems in stage 2 translation

2020-12-27 Thread wangyanan (Y)
Hi Will, Marc, Gently Ping. Is there any comments about this V2 series? Many thanks, Yanan. On 2020/12/16 20:28, Yanan Wang wrote: Hi, this is the second version, thanks for reading. PATCH1/3: Procedures of hyp stage 1 mapping and guest stage 2 mapping are different, but they are tied

Re: [PATCH -next] ext4: use DEFINE_MUTEX (and mutex_init() had been too late)

2020-12-23 Thread Theodore Y. Ts'o
On Wed, Dec 23, 2020 at 10:12:54PM +0800, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun Why is mutex_init() too late? We only take the mutex after we mounting an ext4 file system, and that can't happen until ext4_init_fs is called. - Ted >

[GIT PULL] ext4 updates for v5.11-rc1

2020-12-22 Thread Theodore Y. Ts'o
The following changes since commit 418baf2c28f3473039f2f7377760bd8f6897ae18: Linux 5.10-rc5 (2020-11-22 15:36:08 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus for you to fetch changes up to

Re: general protection fault in ext4_commit_super

2020-12-22 Thread Theodore Y. Ts'o
On Tue, Dec 22, 2020 at 12:28:53PM +0100, Jan Kara wrote: > > Fix e810c942a325 ("ext4: save error info to sb through journal if > > available") > > by flushing work as part of rollback. > > Thanks for having a look. I don't think the fix is quite correct though. The > flush_work() should be at

Re: [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Theodore Y. Ts'o
On Thu, Dec 17, 2020 at 08:51:14PM +, Satya Tangirala wrote: > On Thu, Dec 17, 2020 at 01:08:49PM -0500, Theodore Y. Ts'o wrote: > > On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > > > This patch series adds support for metadata encryption to F2FS usin

Re: [PATCH] ext4: Don't leak old mountpoint samples

2020-12-17 Thread Theodore Y. Ts'o
On Tue, Dec 01, 2020 at 04:13:01PM +0100, Richard Weinberger wrote: > As soon the first file is opened, ext4 samples the mountpoint > of the filesystem in 64 bytes of the super block. > It does so using strlcpy(), this means that the remaining bytes > in the super block string buffer are

Re: [PATCH v2 0/3] add support for metadata encryption to F2FS

2020-12-17 Thread Theodore Y. Ts'o
On Thu, Dec 17, 2020 at 03:04:32PM +, Satya Tangirala wrote: > This patch series adds support for metadata encryption to F2FS using > blk-crypto. Is there a companion patch series needed so that f2fstools can check/repair a file system with metadata encryption enabled?

Re: [PATCH] fs: ext4: remove unnecessary wbc parameter from ext4_bio_write_page

2020-12-16 Thread Theodore Y. Ts'o
On Fri, Dec 11, 2020 at 02:54:24PM +0800, chenle...@gmail.com wrote: > From: Lei Chen > > ext4_bio_write_page does not need wbc parameter, since its parameter > io contains the io_wbc field. The io::io_wbc is initialized by > ext4_io_submit_init which is called in ext4_writepages and >

Re: [PATCH 031/141] ext4: Fix fall-through warnings for Clang

2020-12-16 Thread Theodore Y. Ts'o
On Fri, Nov 20, 2020 at 12:28:32PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning > by explicitly adding a break statement instead of just letting the code > fall through to the next case. > > Link:

Re: [PATCH] ext4: fix -Wstringop-truncation warnings

2020-12-15 Thread Theodore Y. Ts'o
On Thu, Nov 12, 2020 at 05:33:24PM +0800, Kang Wenlin wrote: > From: Wenlin Kang > > The strncpy() function may create a unterminated string, > use strscpy_pad() instead. > > This fixes the following warning: > > fs/ext4/super.c: In function '__save_error_info': > fs/ext4/super.c:349:2:

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-14 Thread Theodore Y. Ts'o
(Dropping off-topic lists) On Mon, Dec 14, 2020 at 03:37:37PM +0100, Dmitry Vyukov wrote: > > It's going to make everyone else's tags who pull from ext4.git messy, > > though, with gobs of tags that probably won't be of use to them. It > > does avoid the need to use git fetch --tags --force, and

Re: [RFC PATCH] KVM: arm64: Add prejudgement for relaxing permissions only case in stage2 translation fault handler

2020-12-13 Thread wangyanan (Y)
Hi Will, Marc, On 2020/12/11 18:00, Will Deacon wrote: On Fri, Dec 11, 2020 at 09:49:28AM +, Marc Zyngier wrote: On 2020-12-11 08:01, Yanan Wang wrote: @@ -461,25 +462,56 @@ static int stage2_map_set_prot_attr(enum kvm_pgtable_prot prot, return 0; } +static bool

Re: [RFC PATCH] KVM: arm64: Add prejudgement for relaxing permissions only case in stage2 translation fault handler

2020-12-13 Thread wangyanan (Y)
On 2020/12/11 17:49, Marc Zyngier wrote: Hi Yanan, On 2020-12-11 08:01, Yanan Wang wrote: In dirty-logging, or dirty-logging-stopped time, even normal running time of a guest configed with huge mappings and numbers of vCPUs, translation faults by different vCPUs on the same GPA could occur

Re: [RFC PATCH] KVM: arm64: Add prejudgement for relaxing permissions only case in stage2 translation fault handler

2020-12-13 Thread wangyanan (Y)
On 2020/12/11 17:53, Will Deacon wrote: Hi Yanan, On Fri, Dec 11, 2020 at 04:01:15PM +0800, Yanan Wang wrote: In dirty-logging, or dirty-logging-stopped time, even normal running time of a guest configed with huge mappings and numbers of vCPUs, translation faults by different vCPUs on the

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-10 Thread Theodore Y. Ts'o
On Thu, Dec 10, 2020 at 09:09:51AM +0100, Dmitry Vyukov wrote: > > * [new tag] ext4-for-linus-5.8-rc1-2 -> > > ext4-for-linus-5.8-rc1-2 > > ! [rejected] ext4_for_linus -> ext4_for_linus > > (would clobber existing tag) > > Interesting. First time

Re: UBSAN: shift-out-of-bounds in ext4_fill_super

2020-12-09 Thread Theodore Y. Ts'o
On Tue, Dec 08, 2020 at 11:33:11PM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:15ac8fdb Add linux-next specific files for 20201207 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1125c92350 > kernel

Re: Pass modules to Linux kernel without initrd

2020-12-08 Thread Theodore Y. Ts'o
On Tue, Dec 08, 2020 at 10:24:08AM +0100, Paul Menzel wrote: > Dear Linux folks, > > Trying to reduce the boot time of standard distributions, I would like to > get rid of the initrd. The initrd is for mounting the root file system and > on most end user systems with standard distributions that

[PATCH] dmaengine: bam_dma: fix return of bam_dma_irq()

2020-12-06 Thread Parth Y Shah
IRQ_WAKE_THREAD handler requests to wake the handler thread Therefore, to resolve this crash, we have changed the return value to IRQ_NONE. Signed-off-by: Parth Y Shah --- drivers/dma/qcom/bam_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom

[PATCH] Fixes kernel crash generating from bam_dma_irq()

2020-12-06 Thread Parth Y Shah
IRQ_WAKE_THREAD handler requests to wake the handler thread Therefore, to resolve this crash, we have changed the return value to IRQ_NONE. Signed-off-by: Parth Y Shah --- drivers/dma/qcom/bam_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom

Re: Why the auxiliary cipher in gss_krb5_crypto.c?

2020-12-04 Thread Theodore Y. Ts'o
On Fri, Dec 04, 2020 at 02:59:35PM +, David Howells wrote: > Hi Chuck, Bruce, > > Why is gss_krb5_crypto.c using an auxiliary cipher? For reference, the > gss_krb5_aes_encrypt() code looks like the attached. > > From what I can tell, in AES mode, the difference between the main cipher and >

Re: [PATCH V2] uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT

2020-12-04 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 08:18:23AM +0200, Amir Goldstein wrote: > Here is a recent example, where during patch review, I requested NOT to > include > any stable backport triggers [1]: > "...We should consider sending this to stable, but maybe let's merge > first and let it > run in master for a

Re: [Ksummit-discuss] crediting bug reports and fixes folded into original patch

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 12:43:52AM +0100, Vlastimil Babka wrote: > > there was a bit of debate on Twitter about this, so I thought I would bring it > here. Imagine a scenario where patch sits as a commit in -next and there's a > bug > report or fix, possibly by a bot or with some static

Re: [PATCH v3] Updated locking documentation for transaction_t

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Dec 03, 2020 at 03:38:40PM +0100, Alexander Lochmann wrote: > > > On 03.12.20 15:04, Theodore Y. Ts'o wrote: > > On Thu, Oct 15, 2020 at 03:26:28PM +0200, Alexander Lochmann wrote: > > > Hi folks, > > > > > > I've updated the l

Re: [PATCH][next] ext4: remove redundant assignment of variable ex

2020-12-03 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 02:23:26PM +0100, Colin King wrote: > From: Colin Ian King > > Variable ex is assigned a variable that is not being read, the assignment > is redundant and can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Thanks, applied.

Re: [PATCH] ext4: remove the null check of bio_vec page

2020-12-03 Thread Theodore Y. Ts'o
On Wed, Oct 21, 2020 at 12:25:03PM +0200, Jan Kara wrote: > On Tue 20-10-20 16:22:01, Xianting Tian wrote: > > bv_page can't be NULL in a valid bio_vec, so we can remove the NULL check, > > as we did in other places when calling bio_for_each_segment_all() to go > > through all bio_vec of a bio. >

Re: [PATCH v3] Updated locking documentation for transaction_t

2020-12-03 Thread Theodore Y. Ts'o
On Thu, Oct 15, 2020 at 03:26:28PM +0200, Alexander Lochmann wrote: > Hi folks, > > I've updated the lock documentation according to our finding for > transaction_t. > Does this patch look good to you? I updated the annotations to match with the local usage, e.g: * When commit was

Re: [PATCH v7 6/8] ext4: support direct I/O with fscrypt using blk-crypto

2020-12-03 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 02:07:06PM +, Satya Tangirala wrote: > From: Eric Biggers > > Wire up ext4 with fscrypt direct I/O support. Direct I/O with fscrypt is > only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must > have been enabled, the 'inlinecrypt' mount option must

Re: [PATCH v9 2/2] fs: ext4: Modify inode-test.c to use KUnit parameterized testing feature

2020-12-02 Thread Theodore Y. Ts'o
On Mon, Nov 16, 2020 at 11:11:50AM +0530, Arpitha Raghunandan wrote: > Modify fs/ext4/inode-test.c to use the parameterized testing > feature of KUnit. > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > Signed-off-by: Marco Elver Acked-by: Theodore Ts'o

Re: [PATCH v9 1/2] kunit: Support for Parameterized Testing

2020-12-02 Thread Theodore Y. Ts'o
On Mon, Nov 30, 2020 at 02:22:22PM -0800, 'Brendan Higgins' via KUnit Development wrote: > > Looks good to me. I would definitely like to pick this up. But yeah, > in order to pick up 2/2 we will need an ack from either Ted or Iurii. > > Ted seems to be busy right now, so I think I will just

Re: [PATCH v2 0/3] Fix several bugs in KVM stage 2 translation

2020-12-02 Thread wangyanan (Y)
On 2020/12/2 20:23, Marc Zyngier wrote: Hi Yanan, [...] BTW: there are two more things below that I want to talk about. 1.  Recently, I have been focusing on the ARMv8.4-TTRem feature which is aimed at changing block size in stage 2 mapping. I have a plan to implement this feature for

Re: [PATCH v2 0/3] Fix several bugs in KVM stage 2 translation

2020-12-02 Thread wangyanan (Y)
Hi Will, Marc, On 2020/12/2 4:59, Will Deacon wrote: On Wed, Dec 02, 2020 at 04:10:31AM +0800, Yanan Wang wrote: When installing a new pte entry or updating an old valid entry in stage 2 translation, we use get_page()/put_page() to record page_count of the page-table pages. PATCH 1/3 aims to

Re: [RFC PATCH 1/3] KVM: arm64: Fix possible memory leak in kvm stage2

2020-12-01 Thread wangyanan (Y)
On 2020/12/2 2:15, Will Deacon wrote: On Wed, Dec 02, 2020 at 01:19:35AM +0800, wangyanan (Y) wrote: On 2020/12/1 22:16, Will Deacon wrote: On Tue, Dec 01, 2020 at 03:21:23PM +0800, wangyanan (Y) wrote: On 2020/11/30 21:21, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:45PM +0800, Yanan

Re: [RFC PATCH 2/3] KVM: arm64: Fix handling of merging tables into a block entry

2020-12-01 Thread wangyanan (Y)
On 2020/12/1 22:35, Marc Zyngier wrote: Hi Yanan, On 2020-12-01 14:11, wangyanan (Y) wrote: On 2020/12/1 21:46, Will Deacon wrote: On Tue, Dec 01, 2020 at 10:30:41AM +0800, wangyanan (Y) wrote: [...] The point is at b.iii where the TLBI is not enough. There are many page mappings

Re: [RFC PATCH 1/3] KVM: arm64: Fix possible memory leak in kvm stage2

2020-12-01 Thread wangyanan (Y)
On 2020/12/1 22:16, Will Deacon wrote: On Tue, Dec 01, 2020 at 03:21:23PM +0800, wangyanan (Y) wrote: On 2020/11/30 21:21, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:45PM +0800, Yanan Wang wrote: diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c index

Re: [RFC PATCH 2/3] KVM: arm64: Fix handling of merging tables into a block entry

2020-12-01 Thread wangyanan (Y)
On 2020/12/1 21:46, Will Deacon wrote: On Tue, Dec 01, 2020 at 10:30:41AM +0800, wangyanan (Y) wrote: On 2020/12/1 0:01, Will Deacon wrote: On Mon, Nov 30, 2020 at 11:24:19PM +0800, wangyanan (Y) wrote: On 2020/11/30 21:34, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:46PM +0800, Yanan

Re: [RFC PATCH 1/3] KVM: arm64: Fix possible memory leak in kvm stage2

2020-11-30 Thread wangyanan (Y)
Hi Will, On 2020/11/30 21:21, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:45PM +0800, Yanan Wang wrote: When installing a new leaf pte onto an invalid ptep, we need to get_page(ptep). When just updating a valid leaf ptep, we shouldn't get_page(ptep). Incorrect page_count of translation

Re: [RFC PATCH 3/3] KVM: arm64: Add usage of stage 2 fault lookup level in user_mem_abort()

2020-11-30 Thread wangyanan (Y)
Hi Will, On 2020/11/30 21:49, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:47PM +0800, Yanan Wang wrote: If we get a FSC_PERM fault, just using (logging_active && writable) to determine calling kvm_pgtable_stage2_map(). There will be two more cases we should consider. (1) After

Re: [RFC PATCH 2/3] KVM: arm64: Fix handling of merging tables into a block entry

2020-11-30 Thread wangyanan (Y)
Hi Will, On 2020/12/1 0:01, Will Deacon wrote: Hi, Cheers for the quick reply. See below for more questions... On Mon, Nov 30, 2020 at 11:24:19PM +0800, wangyanan (Y) wrote: On 2020/11/30 21:34, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:46PM +0800, Yanan Wang wrote: diff --git

Re: drivers/char/random.c needs a (new) maintainer

2020-11-30 Thread Theodore Y. Ts'o
On Mon, Nov 30, 2020 at 04:15:23PM +0100, Jason A. Donenfeld wrote: > I am willing to maintain random.c and have intentions to have a > formally verified RNG. I've mentioned this to Ted before. > > But I think Ted's reluctance to not accept the recent patches sent to > this list is mostly

Re: [RFC PATCH 2/3] KVM: arm64: Fix handling of merging tables into a block entry

2020-11-30 Thread wangyanan (Y)
On 2020/11/30 21:34, Will Deacon wrote: On Mon, Nov 30, 2020 at 08:18:46PM +0800, Yanan Wang wrote: In dirty logging case(logging_active == True), we need to collapse a block entry into a table if necessary. After dirty logging is canceled, when merging tables back into a block entry, we

[GIT PULL] ext4 bug fixes for 5.10-rc

2020-11-22 Thread Theodore Y. Ts'o
The following changes since commit 09162bc32c880a791c6c0668ce0745cf7958f576: Linux 5.10-rc4 (2020-11-15 16:44:31 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus_fixes2 for you to fetch changes up to

Re: [PATCH v4 12/27] jbd2: fix kernel-doc markups

2020-11-19 Thread Theodore Y. Ts'o
On Mon, Nov 16, 2020 at 11:18:08AM +0100, Mauro Carvalho Chehab wrote: > Kernel-doc markup should use this format: > identifier - description > > They should not have any type before that, as otherwise > the parser won't do the right thing. > > Also, some identifiers have different names

Re: [RESEND][PATCH] ima: Set and clear FMODE_CAN_READ in ima_calc_file_hash()

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 10:23:58AM -0800, Linus Torvalds wrote: > On Mon, Nov 16, 2020 at 10:35 AM Mimi Zohar wrote: > > > > We need to differentiate between signed files, which by definition are > > immutable, and those that are mutable. Appending to a mutable file, > > for example, would

Re: [PATCH v2 1/3] libfs: Add generic function for setting dentry_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 04:03:13AM +, Daniel Rosenberg wrote: > This adds a function to set dentry operations at lookup time that will > work for both encrypted filenames and casefolded filenames. > > A filesystem that supports both features simultaneously can use this > function during

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 09:04:11AM -0800, Jaegeuk Kim wrote: > > I'd like to pick this patch series in f2fs/dev for -next, so please let me > know > if you have any concern. No concern for me as far as ext4 is concerned, thanks! - Ted

Re: [PATCH v7 0/8] add support for direct I/O with fscrypt using blk-crypto

2020-11-17 Thread Theodore Y. Ts'o
What is the expected use case for Direct I/O using fscrypt? This isn't a problem which is unique to fscrypt, but one of the really unfortunate aspects of the DIO interface is the silent fallback to buffered I/O. We've lived with this because DIO goes back decades, and the original use case was

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Theodore Y. Ts'o
On Tue, Nov 17, 2020 at 04:03:14AM +, Daniel Rosenberg wrote: > This shifts the responsibility of setting up dentry operations from > fscrypt to the individual filesystems, allowing them to have their own > operations while still setting fscrypt's d_revalidate as appropriate. > > Most

[GIT PULL] more ext4 fixes for v5.10-rc4

2020-11-12 Thread Theodore Y. Ts'o
The following changes since commit 52d1998d09af92d44ffce7454637dd3fd1afdc7d: Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt (2020-11-10 10:05:37 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git

Re: How to enable auto-suspend by default

2020-11-10 Thread Theodore Y. Ts'o
One note... I'll double check, but on my XPS 13 9380, as I recall, I have to manually disable autosuspend on all of the XHCI controllers and internal hubs after running "powertop --auto-tune", or else any external mouse attached to said USB device will be dead to the world for 2-3 seconds if the

Re: [PATCH 0/2] Tristate moount option comatibility fixup

2020-11-10 Thread Theodore Y. Ts'o
On Mon, Nov 09, 2020 at 08:10:07PM +0100, Michal Suchanek wrote: > Hello, > > after the tristate dax option change some applications fail to detect > pmem devices because the dax option no longer shows in mtab when device > is mounted with -o dax. Which applications? Name them. We *really*

[GIT PULL] ext4 cleanups for 5.10-rc4

2020-11-09 Thread Theodore Y. Ts'o
(Resent with missing cc's, sorry.) The following changes since commit 3cea11cd5e3b00d91caf0b4730194039b45c5891: Linux 5.10-rc2 (2020-11-01 14:43:51 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git tags/ext4_for_linus_cleanups for

Re: [PATCH] MAINTAINERS: add missing file in ext4 entry

2020-11-06 Thread Theodore Y. Ts'o
On Fri, Oct 30, 2020 at 10:24:35AM +0800, Chao Yu wrote: > include/trace/events/ext4.h belongs to ext4 module, add the file path into > ext4 entry in MAINTAINERS. > > Signed-off-by: Chao Yu Thanks, applied. - Ted

Re: [PATCH] ext4: Use generic casefolding support

2020-10-29 Thread Theodore Y. Ts'o
On Wed, Oct 28, 2020 at 05:08:20AM +, Daniel Rosenberg wrote: > This switches ext4 over to the generic support provided in libfs. > > Since casefolded dentries behave the same in ext4 and f2fs, we decrease > the maintenance burden by unifying them, and any optimizations will > immediately

  1   2   3   4   5   6   7   8   9   10   >