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: <466EB937.6050807@garzik.org>
Date:	Tue, 12 Jun 2007 11:18:15 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	IDE/ATA development list <linux-ide@...r.kernel.org>,
	Albert Lee <albertcc@...ibm.com>
Subject: Re: libata passthru: support PIO multi commands

Alan Cox wrote:
>>>> +		if (multi_count != dev->multi_count)
>>>> +			ata_dev_printk(dev, KERN_WARNING,
>>>> +				       "invalid multi_count %u ignored\n",
>>>> +				       multi_count);
>>>> +	}
>>> What limits log spamming here ?
>> Intelligence of the user with privs?
> 
> Not ever SG_IO call requires priviledges.

All calls relevant to this thread require CAP_SYS_RAWIO.


> Issue a multi count sized write. Acidentally collide with another program
> which mucks up the multiwrite count (for once it probably won't be HAL
> making a mess ;)) and send data. The state of the disk at the point a
> short multiwrite terminates is undefined, it may have written some of the
> sectors, it may have blanked them all (Optical media) etc. Far better
> just to error the invalid command - especially as in some cases without
> Mark's fixes for DRQ cleanup on error it may even hang in one direction.

ata_scsi_pass_thru() is not executed at ioctl submission time (block 
queue submission time), but rather immediately before it is issued to 
the drive.  At that point you know the bus is idle, all other commands 
have finished executing, and dev->multi_count is fresh not stale.  The 
code path goes from ata_scsi_pass_thru() to ata_qc_issue() without 
releasing the spinlock, even.

But the last point is true -- we should error rather than just warn 
there, AFAICS.

	Jeff


-
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