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: <fa727a2c-f458-cf04-64d0-6327c34459da@amd.com>
Date:	Tue, 14 Jun 2016 16:44:39 -0500
From:	Suravee Suthikulanit <suravee.suthikulpanit@....com>
To:	Paolo Bonzini <pbonzini@...hat.com>
CC:	<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
	<rkrcmar@...hat.com>
Subject: Re: [PATCH] KVM: SVM: compile out AVIC if !CONFIG_X86_LOCAL_APIC

On 6/14/2016 4:22 PM, Paolo Bonzini wrote:
> ----- Original Message -----
>> From: "Suravee Suthikulanit" <suravee.suthikulpanit@....com>
>> To: "Paolo Bonzini" <pbonzini@...hat.com>, linux-kernel@...r.kernel.org, kvm@...r.kernel.org
>> Cc: rkrcmar@...hat.com
>> Sent: Tuesday, June 14, 2016 8:20:30 PM
>> Subject: Re: [PATCH] KVM: SVM: compile out AVIC if !CONFIG_X86_LOCAL_APIC
>>
>> Hi Paolo,
>>
>> On 6/14/2016 11:40 AM, Paolo Bonzini wrote:
>>> AVIC needs __default_cpu_present_to_apicid.  Stub out all functions
>>> that use it, and disable the module parameter, if Linux is
>>> compiled without local APIC support.
>>
>> I think you are right that we should disable AVIC #ifndef
>> CONFIG_X86_LOCAL_APIC. However, do you think we should just use
>> default_cpu_present_to_apicid() instead of the
>> __default_cpu_present_to_apicid()?
>
> I'm not sure why that would help?  default_cpu_present_to_apicid
> is also declared only if CONFIG_X86_LOCAL_APIC is defined.

Actually, I also meant to include the change that I sent out 
(https://lkml.org/lkml/2016/6/13/898), which declares a dummy for the 
case #ifndef CONFIG_X86_LOCAL_APIC.  That should help with the issue here.

>> As for disabling AVIC, I think we can also do:
>>
>>      if (!IS_ENABLED(CONFIG_X86_LOCAL_APIC))
>>          avic = false;
>
> Yes, we'll need to do that once AVIC is enabled by default; or
>
> static bool avic = IS_ENABLED(CONFIG_X86_LOCAL_APIC);
>
> In any case the module parameter must be hidden if there's no
> support in the kernel for the local APIC.
>
> Paolo
>

Agree.

If you okay with using default_cpu_present_to_apicid(), I can send out 
the v2 of the "[PATCH] x86/SVM: Fix implicit declaration issue for 
__default_cpu_present_to_apicid()" with changes that you suggested here.

Thanks,
Suravee

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ