Re: ide-cd problems

From: Jens Axboe (axboe_at_suse.de)
Date: 07/31/04

  • Next message: Zwane Mwaikambo: "Re: 2.6.8-rc2-mm1"
    Date:	Sat, 31 Jul 2004 22:00:36 +0200
    To: Zinx Verituse <zinx@epicsol.org>
    
    

    On Sat, Jul 31 2004, Zinx Verituse wrote:
    > On Sat, Jul 31, 2004 at 05:36:10PM +0200, Jens Axboe wrote:
    > > On Fri, Jul 30 2004, Zinx Verituse wrote:
    > > > I'm going to bump this topic a bit, since it's been a while..
    > > > There are still some issues with ide-cd's SG_IO, listed from
    > > > most important as percieved by me to least:
    > > >
    > > > * Read-only access grants you the ability to write/blank media in the drive
    > > > * (with above) You can open the device only in read-only mode.
    > >
    > > That's by design. Search linux-scsi or this list for why that is so.
    >
    > The only thing I can find on the linux-scsi list is refering to sg
    > devices, which are on a different device node from the non-generic
    > device. This means you can still allow users read access to the disk
    > without allowing them to send random commands to the disk -- this isn't
    > currently possible with the IDE interface, since the device with
    > generic access is the same as the one with the original read/cdrom
    > commands access.
    >
    > As it is, it's impossible grant users read-only access to an IDE cd-rom
    > without allowing them to do things like replacing the firmware with a
    > malicious/non-working one.
    >
    > Generic access allowing such things is fine; but only if we can grant
    > non-generic access without granting generic access.

    If you want it to work that way, you have the have a pass-through filter
    in the kernel knowing what commands are out there (including vendor
    specific ones). That's just too ugly and not really doable or
    maintainable, sorry.

    If you have access to issue ioctls to the device, you have access to
    send it arbitrary commands - period.

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

  • Next message: Zwane Mwaikambo: "Re: 2.6.8-rc2-mm1"

    Relevant Pages

    • Re: AS performance with reiser4 on 2.6.3
      ... This is consistent with high CPU consumption by ... commands towards the end of the log file here: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: libata error handling
      ... I was looking at using it in an LLDD, but hit two problems, and have ... started to work on an alternate approach of cancelling (aborting or wtf you ... want to call it) a list of commands in the eh thread. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ide-cd problems
      ... > of sane commands for a given media type that are harmless and it fits ... So that's where we vehemently disagree - it fits the kernel role, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Kernel thoughts of a Linux user
      ... > the virtual consoles just isn't enough. ... checking if there's a modem can be as simple as sending some harmless ... AT commands, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix rq->flags use in ide-tape.c
      ... > It is non-trivial cause it seems packet commands are prepared during ... > hard time fixing it after ... Yup that wasn't a very good conversion... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)