Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269834

Re: [PATCH 06/10] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks for reverse-mapped sptes

From Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Newsgroups linux.kernel
Subject Re: [PATCH 06/10] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks for reverse-mapped sptes
Date 2015-11-16 04:40 +0100
Message-ID <qviO5-20s-7@gated-at.bofh.it> (permalink)
References <qtYoq-8hK-11@gated-at.bofh.it> <qtYy6-8le-13@gated-at.bofh.it> <quuHH-3K0-71@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2015/11/14 7:08, Marcelo Tosatti wrote:
> On Thu, Nov 12, 2015 at 08:53:43PM +0900, Takuya Yoshikawa wrote:
>> At some call sites of rmap_get_first() and rmap_get_next(), BUG_ON is
>> placed right after the call to detect unrelated sptes which must not be
>> found in the reverse-mapping list.
>>
>> Move this check in rmap_get_first/next() so that all call sites, not
>> just the users of the for_each_rmap_spte() macro, will be checked the
>> same way.  In addition, change the BUG_ON to WARN_ON since killing the
>> whole host is the last thing that KVM should try.
>
> It should be a BUG_ON, if KVM continues it will corrupt (more) memory.

In the sense that we cannot predict what kind of corruption it will
cause, I agree with you.

But if it can only corrupt that guest's memory, it is a bit sad to
kill unrelated guests, and host, too.  Anyway, since we cannot say
for sure what a possible bug can cause, I agree with you now.

Thanks,
   Takuya

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10 V2] KVM: x86: MMU: Clean up x86's mmu code for future  work Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:40 +0100
  [PATCH 04/10] KVM: x86: MMU: Remove is_rmap_spte() and use  is_shadow_present_pte() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:40 +0100
  [PATCH 01/10] KVM: x86: MMU: Remove unused parameter of  __direct_map() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:40 +0100
  [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in  unsync child bitmap Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:40 +0100
    Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit  in unsync child bitmap Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-11-18 04:00 +0100
      Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit  in unsync child bitmap Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-19 02:00 +0100
        Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit  in unsync child bitmap Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-11-19 04:00 +0100
          Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit  in unsync child bitmap Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-19 05:10 +0100
  [PATCH 08/10] KVM: x86: MMU: Move initialization of parent_ptes out  from kvm_mmu_alloc_page() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:50 +0100
  [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:50 +0100
    Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 15:30 +0100
      Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 18:10 +0100
      Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-13 03:20 +0100
        Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Paolo Bonzini <pbonzini@redhat.com> - 2015-11-13 12:00 +0100
    Re: [PATCH 09/10 RFC] KVM: x86: MMU: Move parent_pte handling from  kvm_mmu_get_page() to link_shadow_page() Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-11-18 04:40 +0100
  [PATCH 06/10] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks for  reverse-mapped sptes Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:50 +0100
    Re: [PATCH 06/10] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks  for reverse-mapped sptes Marcelo Tosatti <mtosatti@redhat.com> - 2015-11-13 23:10 +0100
      Re: [PATCH 06/10] KVM: x86: MMU: Consolidate WARN_ON/BUG_ON checks  for reverse-mapped sptes Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-16 04:40 +0100
  [PATCH 10/10] KVM: x86: MMU: Remove unused parameter parent_pte  from kvm_mmu_get_page() Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:50 +0100
  [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain  head in a new struct Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-12 12:50 +0100
    Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain  head in a new struct Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2015-11-18 04:30 +0100
      Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain  head in a new struct Paolo Bonzini <pbonzini@redhat.com> - 2015-11-18 10:10 +0100
        Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain  head in a new struct Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2015-11-19 03:30 +0100
  Re: [PATCH 00/10 V2] KVM: x86: MMU: Clean up x86's mmu code for  future work Paolo Bonzini <pbonzini@redhat.com> - 2015-11-12 13:10 +0100

csiph-web