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: <Zskil6dbwJmL93cO@google.com>
Date: Fri, 23 Aug 2024 17:00:23 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Kai Huang <kai.huang@...el.com>
Cc: Yongqiang Liu <liuyongqiang13@...wei.com>, kvm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, zhangxiaoxu5@...wei.com, hpa@...or.com, 
	x86@...nel.org, dave.hansen@...ux.intel.com, bp@...en8.de, mingo@...hat.com, 
	tglx@...utronix.de, pbonzini@...hat.com
Subject: Re: [PATCH -next] KVM: SVM: Remove unnecessary GFP_KERNEL_ACCOUNT in svm_set_nested_state()

On Fri, Aug 23, 2024, Kai Huang wrote:
> 
> 
> On 21/08/2024 11:27 pm, Yongqiang Liu wrote:
> > The fixed size temporary variables vmcb_control_area and vmcb_save_area
> > allocated in svm_set_nested_state() are released when the function exits.
> > Meanwhile, svm_set_nested_state() also have vcpu mutex held to avoid
> > massive concurrency allocation, so we don't need to set GFP_KERNEL_ACCOUNT.
> 
> Hi Sean/Paolo,
> 
> Seems more patches are popping up regarding to whether to use _ACCOUNT for
> temporary memory allocation.  Could we have a definitive guide on this?

If the allocations are temporary, e.g. scoped to exactly one function, not massive
(use best judgment), and can't be used in any kind of novel DDoS attack, e.g. are
limited to one per vCPU or so, then they don't need to be accounted.

At least, that's my take on things.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ