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] [day] [month] [year] [list]
Date:   Fri, 27 Jan 2023 11:02:53 +1100
From:   Gavin Shan <gshan@...hat.com>
To:     Oliver Upton <oliver.upton@...ux.dev>
Cc:     kvmarm@...ts.linux.dev, kvmarm@...ts.cs.columbia.edu,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, pbonzini@...hat.com, corbet@....net,
        maz@...nel.org, will@...nel.org, ricarkol@...gle.com,
        eric.auger@...hat.com, yuzhe@...china.com, renzhengeek@...il.com,
        reijiw@...gle.com, ardb@...nel.org, Julia.Lawall@...ia.fr,
        yuzenghui@...wei.com, seanjc@...gle.com, shan.gavin@...il.com
Subject: Re: [PATCH v2 1/3] KVM: arm64: Add helper vgic_write_guest_lock()

Hi Oliver,

On 1/27/23 7:20 AM, Oliver Upton wrote:
> On Fri, Jan 20, 2023 at 07:44:03AM +0800, Gavin Shan wrote:
>> Currently, the unknown no-running-vcpu sites are reported when a
>> dirty page is tracked by mark_page_dirty_in_slot(). Until now, the
>> only known no-running-vcpu site is saving vgic/its tables through
>> KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_SAVE_TABLES} command on KVM device
>> "kvm-arm-vgic-its". Unfortunately, there are more unknown sites to
>> be handled and no-running-vcpu context will be allowed in these
>> sites: (1) KVM_DEV_ARM_{VGIC_GRP_CTRL, ITS_RESTORE_TABLES} command
>> on KVM device "kvm-arm-vgic-its" to restore vgic/its tables. The
>> vgic3 LPI pending status could be restored. (2) Save vgic3 pending
>> table through KVM_DEV_ARM_{VGIC_GRP_CTRL, VGIC_SAVE_PENDING_TABLES}
>> command on KVM device "kvm-arm-vgic-v3".
>>
>> In order to handle those unknown cases, we need a unified helper
>> vgic_write_guest_lock(). struct vgic_dist::save_its_tables_in_progress
>> is also renamed to struct vgic_dist::save_tables_in_progress. Besides,
>> "asm/kvm_mmu.h" needs to be included for "vgic.h" for the definition
>> of kvm_write_guest_lock().
>>
>> No functional change intended.
>>
>> Suggested-by: Oliver Upton <oliver.upton@...ux.dev>
>> Signed-off-by: Gavin Shan <gshan@...hat.com>
>> ---
>>   arch/arm64/kvm/vgic-sys-reg-v3.c   |  1 +
>>   arch/arm64/kvm/vgic/vgic-irqfd.c   |  1 +
>>   arch/arm64/kvm/vgic/vgic-its.c     | 13 +++++--------
>>   arch/arm64/kvm/vgic/vgic-mmio-v2.c |  1 +
>>   arch/arm64/kvm/vgic/vgic-mmio.c    |  1 +
>>   arch/arm64/kvm/vgic/vgic-v4.c      |  1 +
>>   arch/arm64/kvm/vgic/vgic.c         |  1 +
>>   arch/arm64/kvm/vgic/vgic.h         | 13 +++++++++++++
>>   include/kvm/arm_vgic.h             |  2 +-
>>   9 files changed, 25 insertions(+), 9 deletions(-)
> 
> You wouldn't have to add the include all around the shop if you instead
> just stuck it in vgic.h...
> 
> Having said that, we really ought to get a fix in for this sooner rather
> than later. I just hit it myself testing kvmarm/next.
> 
> Marc, could you take care of the include fix when applying?
> 

I've posted v3 to have a separate PATCH[1/4] where the header file inclusions
are handled, to save Marc's valuable time. After 'kvm_mmu.h' is included to
'vgic.h', the duplicate inclusions of 'kvm_mmu.h' needs to be removed. A separate
patch would make the follow-up patches clean.

https://lore.kernel.org/kvmarm/20230126235451.469087-1-gshan@redhat.com/T/#t

Thanks,
Gavin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ