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>] [day] [month] [year] [list]
Message-ID: <69f9079f-b1b0-3296-4536-8f0a051a96c2@web.de>
Date:   Mon, 6 Jul 2020 16:04:13 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Hillf Danton <hdanton@...a.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        iommu@...ts.linux-foundation.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@....de>,
        Jörg Rödel <joro@...tes.org>,
        Kevin Tian <kevin.tian@...el.com>,
        Yan Zhao <yan.y.zhao@...el.com>
Subject: Re: [RFC PATCH] vfio: type1: fix kthread use case

…
> +++ b/drivers/vfio/vfio_iommu_type1.c
…
> @@ -2812,11 +2815,10 @@ static int vfio_iommu_type1_dma_rw_chunk
…
>  	if (!mm)
>  		return -EPERM;
>
> -	if (kthread)
> +	if (kthread && use_mm)

Can another design approach make sense here?

+	bool thread_use_mm = ((current->flags & PF_KTHREAD) && !current->mm);
+	if (thread_use_mm)


>  		kthread_use_mm(mm);
…

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ