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: <20090326144716.GA5696@nostromo.devel.redhat.com>
Date:	Thu, 26 Mar 2009 10:47:16 -0400
From:	Bill Nottingham <notting@...hat.com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	Christoph Hellwig <hch@...radead.org>,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
	pjones@...hat.com
Subject: Re: [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi.

Matthew Wilcox (matthew@....cx) said: 
> > Sure, but asking all people who might eventually have to use it
> > to always watch any possible interface addition isn't practical.
> 
> Right.  I asked several people at Red Hat about the interface and I got a
> "yeah, OK, whatever" kind of response.  Clearly you need to educate your
> colleagues to pass these kinds of interface questions along to you.

Heh. Of course, I suspect many of them and I wouldn't see eye-to-eye
in any case.

> > Well, in the case I'm looking at, udev is what's loading the host
> > controllers, and there needs to be some sort of synchronization point
> > between that and LVM invocations, fsck, mount, etc. Since scans
> > aren't sent over as events for udev to catch, 'udevadm settle'
> > isn't enough.
> 
> So ... if we sent a udev event when the scan list was empty, you'd be OK?

I'm CC'ing Peter, who has some more ideas - it would definitely be a good
start, but we'd probably at least need to know when the scan list started
being filled as well.

This also doesn't help with USB, where the scan isn't scheduled until some
indeterminate time after the host is registered, but given that USB is
always hotpluggable, you can never fully be sure there.

Ideally, once we get to the point where:

- MD
- DM/LVM/etc
- fsck
- mount

can all be event-driven on startup, we won't need this. But we're not
there yet.

> > Removing, loading, and removing scsi_wait_scan works
> > here, but it just seems like a kludge.
> 
> I don't quite understand why it was loaded, and not unloaded immediately.

In the initramfs (as we use it) it is, but any time later in userspace it
seems prudent to make sure it's removed first. I toyed with the idea of
having module_init() return an error so that the module unregisters itself
after doing the wait-for-scans, but the error of course propagates back
to userspace, giving lots of ugly messages in the default config.
(You could do a modprobe rule that automatically removes it after
insertion.)

Bill
--
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