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-next>] [day] [month] [year] [list]
Message-ID: <20251023133001.8439-1-abbotti@mev.co.uk>
Date: Thu, 23 Oct 2025 14:28:17 +0100
From: Ian Abbott <abbotti@....co.uk>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ian Abbott <abbotti@....co.uk>,
	H Hartley Sweeten <hsweeten@...ionengravers.com>,
	Nikita Zhandarovich <n.zhandarovich@...tech.ru>,
	lvc-project@...uxtesting.org
Subject: [PATCH 0/2]: comedi: Reference counting for Comedi command

Comedi allows legacy devices to be configured manually (with sys admin
privileges) with ioctl calls at run time by specifying parameters such
as board name, base port number and IRQ level.  If not done correctly
for the actual hardware being configured, there could be problems caused
by unexpected interrupts (not to mention problems due to reading or
writing incorrect hardware registers!).

These patches protect various functions in the core comedi module from
these problems by adding checks that the structures that the function
uses are in a valid state, and remain in a valid state until no longer
required by the function.

Some low-level Comedi drivers use these structures directly outside of
the core commedi function calls, and may also need fixing.  That has not
been done yet in this patch series, but it provides a mechanism to do
so.

1) comedi: Add reference counting for Comedi command handling
2) comedi: Use reference count for asynchronous command functions

 drivers/comedi/comedi_buf.c      | 274 ++++++++++++++++++++++++++-------------
 drivers/comedi/comedi_fops.c     | 134 ++++++++++++++-----
 drivers/comedi/comedi_internal.h |  12 ++
 drivers/comedi/drivers.c         | 134 ++++++++++++++-----
 include/linux/comedi/comedidev.h |   7 +
 5 files changed, 401 insertions(+), 160 deletions(-)

The alignment of the diff output in the second patch turned out a bit
wonky due to similar changes in different sections of the files.  I can
split the patch if deemed necessary.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ