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: <20231023144322.GY3952@nvidia.com>
Date:   Mon, 23 Oct 2023 11:43:22 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Joao Martins <joao.m.martins@...cle.com>,
        Arnd Bergmann <arnd@...nel.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Yishai Hadas <yishaih@...dia.com>,
        Shameerali Kolothum Thodi 
        <shameerali.kolothum.thodi@...wei.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Brett Creeley <brett.creeley@....com>,
        oushixiong <oushixiong@...inos.cn>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency

On Mon, Oct 23, 2023 at 04:35:15PM +0200, Arnd Bergmann wrote:
> >> diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
> >> index 4a79704b164f7..2902b89a48f17 100644
> >> --- a/drivers/gpu/drm/nouveau/Kconfig
> >> +++ b/drivers/gpu/drm/nouveau/Kconfig
> >> @@ -4,7 +4,7 @@ config DRM_NOUVEAU
> >>  	depends on DRM && PCI && MMU
> >>  	depends on (ACPI_VIDEO && ACPI_WMI && MXM_WMI) || !(ACPI && X86)
> >>  	depends on BACKLIGHT_CLASS_DEVICE
> >> -	select IOMMU_API
> >> +	depends on IOMMU_API
> >>  	select FW_LOADER
> >>  	select DRM_DISPLAY_DP_HELPER
> >>  	select DRM_DISPLAY_HDMI_HELPER
> >
> > Like here, nouveau should still be compilable even if no iommu driver
> > was selected, and it should compile on arches without iommu drivers at
> > all.
> 
> Right, so with my draft patch, we can't build nouveau without
> having an IOMMU driver, which matches the original intention
> behind the Kconfig logic, while your suggestion would add the
> same dependency here but still allow it to be compile tested
> on target systems with no IOMMU. A minor downside of your
> approach is that you end up building drivers (without
> CONFIG_COMPILE_TEST) that currently exclude because we know
> they will never work.

I wonder how true that is, even nouveau only seems to have this for
some tegra specific situation. The driver broadly does work without an
iommu. (even weirder that already seems to have IS_ENABLED so I don't
know what this is for)

I'd prefer clarity over these kinds of optimizations..

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ