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: <20070411101245.GA32592@rotes76.wohnheim.uni-kl.de>
Date:	Wed, 11 Apr 2007 12:12:45 +0200
From:	Eduard Bloch <edi@....de>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	linux-kernel@...r.kernel.org,
	debburn-devel@...ts.alioth.debian.org, Jens Axboe <axboe@...e.de>
Subject: Re: broken device locking, sg vs. sg_io on block devices

#include <hallo.h>
* Eduard Bloch [Sat, Apr 07 2007, 01:21:31PM]:

> Can we do following without having side effects:
> 
> open("/dev/sr0",O_EXCL|O_RDWR); /* no matter what it returns */
> fcntl(..., F_SETLK); /* no matter what it returns */
> ioctl(f, SCSI_IOCTL_GET_IDLUN, &x);
> ioctl(f, SCSI_IOCTL_GET_BUS_NUMBER, &jo);
> 
> Can you guarantee us that bit? 
> 
> Or shall we really implement ugly workarounds to avoid every open call?
> Note that "just do like UUCP guys" is not as easy or reliable as people
> may pretend.

Excuse me, but is there ANYBODY willing to give a binding statement on
that? First you tell "us CD writing guys" to manage that in user space
[1] and when we get real critical questions then everything we get is
radio silence? Very kindly. NOT.

Background: there are two good ways we can go:

a) carefully collecting device properties, mapping and opening
   additional devices
b) additional lockfiles delegating the locking operations

Unfortunately b leads to major problems in practice, while a looks
more promising but need a guarantee that it will be kept be working and
harmless in the future kernel releases. We need to know that before
moving on to missionary work.

Regards,
Eduard.

[1] which IMO still sucks because it's allowed to have device driver
access from any file, thus dealing locking problems at file level is
like fighting a hydra. And with multiple semi-autonomous drivers for the
same hardware even the previous silver bullet (O_EXCL) does not help.

-- 
Ich bin bereit überall hinzugehen, wenn es nur vorwärts ist.
		-- David Livingstone
-
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