lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <901c7d58-9ca2-491b-8884-c78c8fb75b37@redhat.com>
Date: Thu, 21 Nov 2024 15:07:03 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Nathan Chancellor <nathan@...nel.org>, Sasha Levin <sashal@...nel.org>
Cc: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
 kvm@...r.kernel.org
Subject: Re: [GIT PULL] First batch of KVM changes for Linux 6.13 merge window

On 11/21/24 14:26, Nathan Chancellor wrote:
> On Thu, Nov 21, 2024 at 07:56:23AM -0500, Sasha Levin wrote:
>> Hi Paolo,
>>
>> On Wed, Nov 20, 2024 at 08:58:42AM -0500, Paolo Bonzini wrote:
>>>       riscv: perf: add guest vs host distinction
>>
>> When merging this PR into linus-next, I've started seeing build errors:
>>
>> Looks like this is due to 2c47e7a74f44 ("perf/core: Correct perf
>> sampling with guest VMs") which went in couple of days ago through
>> Ingo's perf tree and changed the number of parameters for
>> perf_misc_flags().

Thanks Sasha. :(  Looks like Stephen does not build for risc-v.

> There is a patch out to fix this but it seems like it needs to be
> applied during this merge?
> 
> https://lore.kernel.org/20241116160506.5324-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Yes, this works.  To test it after the merge I did it.

   curl https://lore.kernel.org/linux-riscv/20241116160506.5324-1-prabhakar.mahadev-lad.rj@bp.renesas.com/raw | patch -p1
   git add -p
   git commit --amend


This should have been handled with a topic branch, and there is another
nontrivial conflict with Catalin's tree that should have been handled
with a topic branch.  (I knew about that one, but his topic branch also
had a conflict with something else; so I un-pulled it and then forgot
about it).


Linus,

if you prefer to get a reviewed pull request with the topic branches
included, then the changes since commit 2c47e7a74f445426d156278e339b7abb259e50de:

   perf/core: Correct perf sampling with guest VMs (2024-11-14 10:40:01 +0100)

are available in the Git repository at:

   https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus-with-topic-branches-6.13

for you to fetch changes up to bde387a8d81735a93c115ee4f1bd99718e5d30b0:

   Merge branch 'for-next/mte' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux into HEAD (2024-11-21 08:53:23 -0500)


Alternatively,

the best way to get the RISC-V fix is the curl invocation above, and after
my signature is the conflict resolution for Catalin's tree.


Thanks,

Paolo


diff --cc arch/arm64/kvm/guest.c
index 4cd7ffa76794,e738a353b20e..12dad841f2a5
--- a/arch/arm64/kvm/guest.c
+++ b/arch/arm64/kvm/guest.c
@@@ -1051,11 -1051,13 +1051,12 @@@ int kvm_vm_ioctl_mte_copy_tags(struct k
   	}
   
   	while (length > 0) {
  -		kvm_pfn_t pfn = gfn_to_pfn_prot(kvm, gfn, write, NULL);
  +		struct page *page = __gfn_to_page(kvm, gfn, write);
   		void *maddr;
   		unsigned long num_tags;
  -		struct page *page;
+ 		struct folio *folio;
   
  -		if (is_error_noslot_pfn(pfn)) {
  +		if (!page) {
   			ret = -EFAULT;
   			goto out;
   		}
@@@ -1090,8 -1099,12 +1097,12 @@@
   			/* uaccess failed, don't leave stale tags */
   			if (num_tags != MTE_GRANULES_PER_PAGE)
   				mte_clear_page_tags(maddr);
- 			set_page_mte_tagged(page);
+ 			if (folio_test_hugetlb(folio))
+ 				folio_set_hugetlb_mte_tagged(folio);
+ 			else
+ 				set_page_mte_tagged(page);
+
  -			kvm_release_pfn_dirty(pfn);
  +			kvm_release_page_dirty(page);
   		}
   
   		if (num_tags != MTE_GRANULES_PER_PAGE) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ