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:	Mon, 29 Oct 2007 11:34:10 -0500
From:	James Bottomley <James.Bottomley@...elEye.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Linux-SCSI <linux-scsi@...r.kernel.org>,
	akpm@...ux-foundation.org
Subject: Re: [PATCH v4 0/2] [SCSI] Asynchronous
	event	notification	infrastructure

On Mon, 2007-10-29 at 12:24 -0400, Jeff Garzik wrote:
> James Bottomley wrote:
> > Ah, OK; I haven't communicated what we need very clearly.  We need a way
> > to see if the event is supported by the device, as well as a way to turn
> > it off.  For some of the events (possibly not the SATA AN one, since I
> > know all SATA devices will be well behaved) there's going to be a need
> > to deal with berserk or broken devices that become trigger happy, so
> > turning off the event will be a useful (and possibly essential) way of
> > coping.
> 
> 
> That's possible with the presented interface[1]:
> 
> 	# see if event is supported
> 	cat $path/evt_media_change
> 
> 	# turn off event to deal with broken/beserk devices
> 	echo 0 > $path/evt_media_change
> 
> Some sillyhead can always do
> 
> 	echo 1 > $path/evt_some_event_my_device_does_not_support
> 
> but that will be obviously be a no-op because their device simply will 
> not send such events.
> 
> Granted ls(1) is no longer a method for viewing supported-at-boot-time 
> list of events -- ls(1) in the presented interface lists what events the 
> _kernel_ supports, and cat(1) is used to discover which events are 
> actually enabled.
> 
> I think that is the only difference between our two positions:  [if I 
> understand you correctly] you want ls(1) to be able to list the device's 
> supported events.  However, I feel that is inconsistent:  for your 
> proposal, userspace must perform two checks in order to determine a 
> feature's availability: 1) does the file exist? 2) is the file context 
> non-zero?

Yes, I agree ... however, open file is one op for the user -ENXIO means
device doesn't support the event; value indicates whether the event is
currently triggering.

I just would rather we use the file exists if device supports event,
because it's consistent with all the rest of our SCSI interfaces.

> Regards,
> 
> 	Jeff
> 
> 
> [1] modulo my comment from the original email in this thread:
> > * I was slack and did not bother to implement the 'set' operation
> >   for the attributes.  This can easily be done at a later time in a
> >   separate patch.

James


-
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