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: <ZkPfB2VpGkRmMLsi@google.com>
Date: Tue, 14 May 2024 15:00:39 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: cheng.lin130@....com.cn
Cc: pbonzini@...hat.com, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	jiang.yong5@....com.cn, wang.liang82@....com.cn, jiang.xuexin@....com.cn
Subject: Re: [PATCH] KVM: introduce vm's max_halt_poll_ns to debugfs

On Sat, May 11, 2024, cheng.lin130@....com.cn wrote:
> > > > > > From: seanjc <seanjc@...gle.com>
> > > > > > > From: Cheng Lin <cheng.lin130@....com.cn>
> > > > > > >
> > > > > > > Introduce vm's max_halt_poll_ns and override_halt_poll_ns to
> > > > > > > debugfs. Provide a way to check and modify them.
> > > > > > Why?
> > > > > If a vm's max_halt_poll_ns has been set using KVM_CAP_HALT_POLL,
> > > > > the module parameter kvm.halt_poll.ns will no longer indicate the maximum
> > > > > halt pooling interval for that vm. After introducing these two attributes into
> > > > > debugfs, it can be used to check whether the individual configuration of the
> > > > > vm is enabled and the working value.
> > > > But why is max_halt_poll_ns special enough to warrant debugfs entries?  There is
> > > > a _lot_ of state in KVM that is configurable per-VM, it simply isn't feasible to
> > > > dump everything into debugfs.
> > > If we want to provide a directly modification interface under /sys for per-vm
> > > max_halt_poll_ns, like module parameter /sys/module/kvm/parameters/halt_poll_ns,
> > > using debugfs may be worth.
> > Yes, but _why_?  I know _what_ a debugs knob allows, but you have yet to explain
> > why this
> I think that if such an interface is provided, it can be used to check the source of
> vm's max_halt_poll_ns, general module parameter or per-vm configuration.
> When configured through per-vm, such an interface can be used to monitor this
> configuration. If there is an error in the setting through KVMCAP_HALL_POLL, such
> an interface can be used to fix or reset it dynamicly.

But again, that argument can be made for myriad settings in KVM.  And unlike many
settings, a "bad" max_halt_poll_ns can be fixed simply by redoing KVM_CAP_HALL_POLL.

It's not KVM's responsibility to police userspace for bugs/errors, and IMO a
backdoor into max_halt_poll_ns isn't justified.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ