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]
Date:   Fri, 28 Apr 2023 06:36:03 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     "Chatre, Reinette" <reinette.chatre@...el.com>,
        "jgg@...dia.com" <jgg@...dia.com>,
        "yishaih@...dia.com" <yishaih@...dia.com>,
        "shameerali.kolothum.thodi@...wei.com" 
        <shameerali.kolothum.thodi@...wei.com>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "darwi@...utronix.de" <darwi@...utronix.de>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "Jiang, Dave" <dave.jiang@...el.com>,
        "Liu, Jing2" <jing2.liu@...el.com>,
        "Raj, Ashok" <ashok.raj@...el.com>,
        "Yu, Fenghua" <fenghua.yu@...el.com>,
        "tom.zanussi@...ux.intel.com" <tom.zanussi@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V4 06/11] vfio/pci: Remove interrupt context counter

> From: Chatre, Reinette <reinette.chatre@...el.com>
> Sent: Friday, April 28, 2023 1:36 AM
> 
> struct vfio_pci_core_device::num_ctx counts how many interrupt
> contexts have been allocated. When all interrupt contexts are
> allocated simultaneously num_ctx provides the upper bound of all
> vectors that can be used as indices into the interrupt context
> array.
> 
> With the upcoming support for dynamic MSI-X the number of
> interrupt contexts does not necessarily span the range of allocated
> interrupts. Consequently, num_ctx is no longer a trusted upper bound
> for valid indices.
> 
> Stop using num_ctx to determine if a provided vector is valid. Use
> the existence of allocated interrupt.
> 
> This changes behavior on the error path when user space provides
> an invalid vector range. Behavior changes from early exit without
> any modifications to possible modifications to valid vectors within
> the invalid range. This is acceptable considering that an invalid
> range is not a valid scenario, see link to discussion.
> 
> The checks that ensure that user space provides a range of vectors
> that is valid for the device are untouched.
> 
> Signed-off-by: Reinette Chatre <reinette.chatre@...el.com>

Reviewed-by: Kevin Tian <kevin.tian@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ