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: <87pn2igi2h.fsf@vitty.brq.redhat.com>
Date:   Wed, 06 Jan 2021 17:12:54 +0100
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Wei Liu <wei.liu@...nel.org>
Cc:     Sunil Muthuswamy <sunilmut@...rosoft.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Matheus Castello <matheus@...tello.eng.br>,
        KY Srinivasan <kys@...rosoft.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Wei Liu <liuwe@...rosoft.com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>
Subject: Re: [PATCH v2] x86/Hyper-V: Support for free page reporting

Wei Liu <wei.liu@...nel.org> writes:

> On Wed, Jan 06, 2021 at 02:28:20PM +0100, Vitaly Kuznetsov wrote:
> [...]
>> 
>> > +bool hv_query_ext_cap(u64 cap_query)
>> > +{
>> > +	u64 *cap;
>> > +	unsigned long flags;
>> > +	u64 ext_cap = 0;
>> > +
>> > +	/*
>> > +	 * Querying extended capabilities is an extended hypercall. Check if the
>> > +	 * partition supports extended hypercall, first.
>> > +	 */
>> > +	if (!(ms_hyperv.priv_high & HV_ENABLE_EXTENDED_HYPERCALLS))
>> > +		return 0;
>> > +
>> > +	/*
>> > +	 * Repurpose the input page arg to accept output from Hyper-V for
>> > +	 * now because this is the only call that needs output from the
>> > +	 * hypervisor. It should be fixed properly by introducing an
>> > +	 * output arg once we have more places that require output.
>> > +	 */
>> 
>> I remember there was a patch from Wei (realter to running Linux as root
>> partition) doing the job, we can probably merge it early to avoid this
>> re-purposing.
>> 
>
> We want to be frugal regarding memory usage, so in my patch the output
> page is only allocated when Linux is running as the root partition.
>
> This patch is mostly only useful when Linux is running as a child
> partition. This is a different use case.

Well, yea, while one 4k page per CPU is probably not much, why
allocating something we don't really need? The whole 're-purposing' idea
comes from the misleading 'hyperv_pcpu_input_arg' name, which can be
just 'hyperv_pcpu_arg' (and we can allocate two pages for root
partition).

All this is not a big deal, we can take a look again after root
partition support lands and do some cleanup if needed.

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ