RE: disk-destroyer.c

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Sun Jul 23 2000 - 05:49:20 EST


In <Pine.LNX.4.21.0007230306220.24364-100000@asdf.capslock.lan> Mike A. Harris (mharris@meteng.on.ca) wrote:
> On Sat, 22 Jul 2000, David Schwartz wrote:

>>> The motherboard does not issue commands to your hard disk.
>>> Software running on your computer does. In this case, the Linux
>>> kernel.
>>
>> Yes, the motherboard passes whatever commands it is told to pass to the
>>hard disk, without checking whether they comply with the standard or not.
>>Similarly, Linux passes whatever commands it is told to pass to the hard
>>disk, without checking whether they comply with the standard or not.
>>
>> You are defining standards compliance in a very peculiar way just to win
>>this argument.

> No, sorry. I don't really care about arguing one way or the
> other. It is more opinion than anything. I see an I/O out to
> the hard disk as something that should go to the hard disk, I see
> a request to a kernel API as something the kernel should look
> at. If the kernel merely passes everything to the raw device,
> why have the API in the kernel at all?

Since it's not THE ONLY function in kernel API. There are exist high-level
functions to do a lot of stuff in kernel. THIS functions (called HDIO_DRIVE_CMD)
does EXACTLY what it promises: it delivers command from program to IDE bus.
It was DESIGNED to do so. When you do not need this low-level function you
are using other, more high-level functions.

> I don't need to 'win' anything here. We can both have our
> viewpoint without having to convince each other. Nobody 'wins'
> or loses really.

Sorry. Either Linux comply to standards or not. Either MB comply to standards
or not. There are no place for differen opinions. MB interaface was designed
to deliver raw commond to IDE bus and the same is true for HDIO_DRIVE_CMD as
well. Other, more high-level linux functions WILL NOT issue non-ATAPI-compilant
commands to bus but HDIO_DRIVE_CMD is just pipe from userland programs to IDE
bus. Yes, it's dangerous function, yes, it must be restricted only to processes
with CAP_SYS_RAW but if you think that such function in API render Linux to be
non-compiant then your MB is also non-compiant. It's as simple as it is.

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



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:20 EST