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:	Wed, 19 Jun 2013 19:04:51 +0200
From:	Hannes Weisbach <hannes_weisbach@....net>
To:	Greg Kroah-Hartman <greg@...ah.com>
Cc:	Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lp: implement proper detach function for parport_driver lp

>> Signed-off-by: Hannes Weisbach <hannes_weisbach@....net>
>> ---
>> Granted, for normal parport drivers this is usually not an issue,
>> because the device does not go away. However, I am currently writing a
>> Linux device driver for a USB to parallel port converter [0] and
>> therefore need proper detaching. Additionally, the wrong ref count
>> keeps me from simply rmmod my driver and insmod a new version while
>> developing and testing.
> 
> Really?  We already have a usb to parallel port driver in the kernel
> tree that seems to work just fine.

>  It's been there since the 2.3 kernel
> days, so either it has the same problem, or your driver is doing
> something odd.

Do you mean the USB Printer class driver for pseudo parallel port
adapters?  They don't use the char/lp.c printer driver.  (Or I didn't
see it).  I'm writing a driver for USB2LPT [0], which gives you a real
/dev/parportN-device in user space, with which you can do all the
bit-twiddling like with a real parallel port.

Or do you mean USS720 (misc/uss720.c) and MOS7715 (serial/mos7720.c)
drivers.  They are doing what I am doing: translating whatever the
user does on a /dev/parportN-node and sending device-specific commands
over USB.  When they do parport_announce_port(), lp.c should also be
initialized and they should have the same problem.

On second thought, my patch might not be optimal.  lp.c stores
instance-structs in an array of size 8.  So after 8 re-plugs, lp.c
will not instantiate any more printer devices.  I think I better go
all the way and replace that array with a list, to have a proper
solution.

[0] http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/USB2LPT/index.html.en--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ