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]
Date:   Sun, 24 Jun 2018 10:11:21 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Michal Hocko <mhocko@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Michal Hocko <mhocko@...e.com>, kvm@...r.kernel.org,
        Radim Krčmář <rkrcmar@...hat.com>,
        linux-mm@...ck.org, Andrea Arcangeli <aarcange@...hat.com>,
        Jérôme Glisse <jglisse@...hat.com>
Subject: Re: [RFC PATCH] mm, oom: distinguish blockable mode for mmu notifiers

On 22/06/2018 17:02, Michal Hocko wrote:
> @@ -7215,6 +7216,8 @@ void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
>  	apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
>  	if (start <= apic_address && apic_address < end)
>  		kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
> +
> +	return 0;

This is wrong, gfn_to_hva can sleep.

You could do the the kvm_make_all_cpus_request unconditionally, but only
if !blockable is a really rare thing.  OOM would be fine, since the
request actually would never be processed, but I'm afraid of more uses
of !blockable being introduced later.

Thanks,

Paolo

Powered by blists - more mailing lists