lkml.org 
[lkml]   [2000]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: TO HELL WITH IT THEN......(re: disk-destroyer.c)
On Fri, Jul 21, 2000 at 06:51:17AM -0400, Mike A. Harris wrote:

> >> 1) You can do inb/outb access from userland. If you're root, you don't
> >> need any ioctl to issue a command that'd violate the ATA
> >> specification to the drive.
> >Notice I said if it provides access to a resource at A PROTOCOL
> >LEVEL. inb/outb should not be protected, because this is direct access,
> >below the protocol level
>
> This is a very good point as well. Following the ethernet
> comparison a bit further... An FTP program should not be able to
> generate raw TCP packets or ethernet frames at that low
> level. FTP sends data to the TCP layer, and should not be able
> to send random bits to the raw interface using standard TCP level
> services. I think this is a good comparison of what something is
> designed for and what it can be used for. If an interface can be
> misused, it should be fixed.

Yes, it's a good comparison. By writing data to the /dev/hda device you
will never generate an invalid IDE command. By mounting it and using it
in any way neither. You need to invoke an ioctl to do it.

If there was a more low-level access to the device, it should be done
there, but /dev/hda is the lowest level accessible from userland.

> The fact that lower level interfaces could be used to acheive the
> same result is completely irrelevant IMHO.

In this case the /dev/hda way IS the lower level interface.

--
Vojtech Pavlik
SuSE Labs

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.484 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site