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: <Y/O32v/KZt+RjoHQ@kroah.com>
Date:   Mon, 20 Feb 2023 19:11:38 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Su Weifeng <suweifeng1@...wei.com>
Cc:     mst@...hat.com, linux-kernel@...r.kernel.org, shikemeng@...wei.com,
        liuzhiqiang26@...wei.com, linfeilong@...wei.com,
        zhanghongtao22@...wei.com
Subject: Re: [PATCH v2] uio:uio_pci_generic:Don't clear master bit when the
 process does not exit

On Tue, Feb 21, 2023 at 01:10:44AM +0800, Su Weifeng wrote:
> From: Weifeng Su <suweifeng1@...wei.com>
> 
> The /dev/uioX device has concurrent operations in a few scenarios.
> 
> For example, when a process using the device exits abnormally,
> the management program starts the same process to operate the device.
> When the process exits and closes the /dev/uioX device,
> the master bit of the device is cleared. In this case, if the
> new process is issuing commands, I/Os are suspended and cannot be
> automatically recovered.
> 
> Therefore, reference counting is added to clear the master bit
> only when the last process exits.
> 
> Signed-off-by: Weifeng Su <suweifeng1@...wei.com>
> ---
> The difference between the first patch and the first patch is that 
> the reference counting operation is performed using the atomic semantics, 
> just like other drivers under UIO:
> cdfa835c6e5e87d145f("uio_hv_generic: defer opening vmbus until first use").

And I would claim that that change too is incorrect.

Did you test this with dup()?  Lots of open/close cycles on the same
device node?  Passing around the file descriptor?

Logically, this is identical to your previous change, so why should it
be accepted?

Again, why not just use a real PCI driver for your device?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ