public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* cd burning, capabilities and available modes
@ 2004-12-01 13:40 J.A. Magallon
  2004-12-01 16:36 ` Daniel Drake
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: J.A. Magallon @ 2004-12-01 13:40 UTC (permalink / raw)
  To: Lista Linux-Kernel

Hi...

Following my little oddisey to let cd-burning easy for my users,
I think I have found another problem.

It looks like the formats available to cdrecord depend on being root
(cdrecord is not suid, if it is it complains it cant reserve some
buffers).

As root:

werewolf:/store/tmp# cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R

As user:
werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: 'ATAPI:1,0,0'
devname: 'ATAPI'
scsibus: 1 target: 0 lun: 0
Warning: Using ATA Packet interface.
Warning: The related Linux kernel interface code seems to be unmaintained.
Warning: There is absolutely NO DMA, operations thus are slow.
WARNING ! Cannot gain SYS_RAWIO capability ! 
: Operation not permitted
Using libscg version 'schily-0.8'.
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identifikation : 'DVDRAM GSA-4120B'
Revision       : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: 
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.

Uh ?

Some suggestions ?

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 16:36 ` Daniel Drake
@ 2004-12-01 15:00   ` J.A. Magallon
  0 siblings, 0 replies; 7+ messages in thread
From: J.A. Magallon @ 2004-12-01 15:00 UTC (permalink / raw)
  To: Daniel Drake; +Cc: Lista Linux-Kernel


On 2004.12.01, Daniel Drake wrote:
> Hi,
> 
> J.A. Magallon wrote:
> > As user:
> > werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
> > ...
> 
> Try with the real device name, e.g. dev=/dev/hdc
> 

The recommended mode is ATAPI, but anyways:

werewolf:/store/tmp> cdrecord -dummy dev=/dev/hdc *.iso
...
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
WARNING ! Cannot gain SYS_RAWIO capability ! 
: Operation not permitted
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (warly-Mandrakelinux-scsi-linux-sg '@(#)scsi-linux-sg.c   1.83 04/05/20 Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   : 
Vendor_info    : 'HL-DT-ST'
Identifikation : 'DVDRAM GSA-4120B'
Revision       : 'A102'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
Driver flags   : MMC-3 SWABAUDIO BURNFREE 
Supported modes: 
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.



--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 13:40 cd burning, capabilities and available modes J.A. Magallon
@ 2004-12-01 16:36 ` Daniel Drake
  2004-12-01 15:00   ` J.A. Magallon
  2004-12-01 17:05 ` Lee Revell
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Daniel Drake @ 2004-12-01 16:36 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

Hi,

J.A. Magallon wrote:
> As user:
> werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
> ...

Try with the real device name, e.g. dev=/dev/hdc

Daniel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 13:40 cd burning, capabilities and available modes J.A. Magallon
  2004-12-01 16:36 ` Daniel Drake
@ 2004-12-01 17:05 ` Lee Revell
  2004-12-01 22:38 ` Bill Davidsen
  2004-12-02  7:57 ` Frank Steiner
  3 siblings, 0 replies; 7+ messages in thread
From: Lee Revell @ 2004-12-01 17:05 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

On Wed, 2004-12-01 at 13:40 +0000, J.A. Magallon wrote:
> As user:
> werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
> ...
> cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
> cdrecord: WARNING: This causes a high risk for buffer underruns.
> cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
> cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
> cdrecord: WARNING: This causes a high risk for buffer underruns.

You can use the realtime LSM (see list archives) to let specific groups
of users use mlockall and run RT tasks.  Just load it like:

modprobe realtime gid=29

and make gid 29 your "cdrecord" group.

This should make CD burning as joeuser reliable as root.  Most people
use this for low latency audio but I think cd burning is a wider and
completely unexplored application.

Lee


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 13:40 cd burning, capabilities and available modes J.A. Magallon
  2004-12-01 16:36 ` Daniel Drake
  2004-12-01 17:05 ` Lee Revell
@ 2004-12-01 22:38 ` Bill Davidsen
  2004-12-01 22:58   ` J.A. Magallon
  2004-12-02  7:57 ` Frank Steiner
  3 siblings, 1 reply; 7+ messages in thread
From: Bill Davidsen @ 2004-12-01 22:38 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

J.A. Magallon wrote:
> Hi...
> 
> Following my little oddisey to let cd-burning easy for my users,
> I think I have found another problem.
> 
> It looks like the formats available to cdrecord depend on being root
> (cdrecord is not suid, if it is it complains it cant reserve some
> buffers).
> 
> As root:
> 
> werewolf:/store/tmp# cdrecord -dummy dev=ATAPI:1,0,0 *.iso
> ...
> Device seems to be: Generic mmc2 DVD-R/DVD-RW.
> Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
> Driver flags   : MMC-3 SWABAUDIO BURNFREE 
> Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
> 
> As user:
> werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso
> ...
> cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
> cdrecord: WARNING: This causes a high risk for buffer underruns.
> cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
> cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
> cdrecord: WARNING: This causes a high risk for buffer underruns.
> scsidev: 'ATAPI:1,0,0'
> devname: 'ATAPI'
> scsibus: 1 target: 0 lun: 0
> Warning: Using ATA Packet interface.
> Warning: The related Linux kernel interface code seems to be unmaintained.
> Warning: There is absolutely NO DMA, operations thus are slow.
> WARNING ! Cannot gain SYS_RAWIO capability ! 
> : Operation not permitted
> Using libscg version 'schily-0.8'.
> Device type    : Removable CD-ROM
> Version        : 0
> Response Format: 2
> Capabilities   : 
> Vendor_info    : 'HL-DT-ST'
> Identifikation : 'DVDRAM GSA-4120B'
> Revision       : 'A102'
> Device seems to be: Generic mmc2 DVD-R/DVD-RW.
> Using generic SCSI-3/mmc   CD-R/CD-RW driver (mmc_cdr).
> Driver flags   : MMC-3 SWABAUDIO BURNFREE 
> Supported modes: 
> cdrecord: Drive does not support TAO recording.
> cdrecord: Illegal write mode for this drive.
> 
> Uh ?
> 
> Some suggestions ?

I get that all the time, because one of my drives doesn't support TAO 
burning. I suspect your firmware sucks, and you will have to use session 
at a time rather than track at a time, option "-sao" works for me. Are 
you running standard cdrecord or one of the hacks?

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 22:38 ` Bill Davidsen
@ 2004-12-01 22:58   ` J.A. Magallon
  0 siblings, 0 replies; 7+ messages in thread
From: J.A. Magallon @ 2004-12-01 22:58 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: J.A. Magallon, Lista Linux-Kernel


On 2004.12.01, Bill Davidsen wrote:
> J.A. Magallon wrote:
> > Hi...
> > 
> > Following my little oddisey to let cd-burning easy for my users,
> > I think I have found another problem.
> > 
> > It looks like the formats available to cdrecord depend on being root
> > (cdrecord is not suid, if it is it complains it cant reserve some
> > buffers).
> > 
> > As root:
...
> > Driver flags   : MMC-3 SWABAUDIO BURNFREE 
> > Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
> > 
> > As user:
> > Driver flags   : MMC-3 SWABAUDIO BURNFREE 
> > Supported modes: 
...
> 
> I get that all the time, because one of my drives doesn't support TAO 
> burning. I suspect your firmware sucks, and you will have to use session 
> at a time rather than track at a time, option "-sao" works for me. Are 
> you running standard cdrecord or one of the hacks?
> 

Look at what I quoted above. It is the same box, just running cdrecord
as root or as user. The 'Supported modes:' line is empty.
What has the firmware to do with that ?

A guess: perhaps the problem is:

WARNING ! Cannot gain SYS_RAWIO capability ! 
: Operation not permitted

as user, so system does not allow the user to query the drive at low
level via some ioctl() or the liketo get the supported modes.

BTW, using the LSM realtime module for group cdwriter (80 in my box)
killed this messages:

cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.

so at least this is good (TM).

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandrakelinux release 10.2 (Cooker) for i586
Linux 2.6.10-rc2-jam4 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #2



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: cd burning, capabilities and available modes
  2004-12-01 13:40 cd burning, capabilities and available modes J.A. Magallon
                   ` (2 preceding siblings ...)
  2004-12-01 22:38 ` Bill Davidsen
@ 2004-12-02  7:57 ` Frank Steiner
  3 siblings, 0 replies; 7+ messages in thread
From: Frank Steiner @ 2004-12-02  7:57 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel

J.A. Magallon wrote

> werewolf:/store/tmp> cdrecord -dummy dev=ATAPI:1,0,0 *.iso

Why not use "dev=ATAPI:/dev/hdd" or whatever device in /dev/ is
your burner...?

> ...
> cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
> cdrecord: WARNING: This causes a high risk for buffer underruns.
> cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
> cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
> cdrecord: WARNING: This causes a high risk for buffer underruns.
> scsidev: 'ATAPI:1,0,0'
> devname: 'ATAPI'
> scsibus: 1 target: 0 lun: 0
> Warning: Using ATA Packet interface.
> Warning: The related Linux kernel interface code seems to be unmaintained..
> Warning: There is absolutely NO DMA, operations thus are slow.
> WARNING ! Cannot gain SYS_RAWIO capability ! 
> : Operation not permitted

Sth. seems to be wrong here. When I do this as user I get
...
Use of ATA is preferred over ATAPI.
Warning: Using ATA Packet interface.
Warning: The related libscg interface code is in pre alpha.
Warning: There may be fatal problems.
Using libscg version 'schily-0.8'.
...

so it seems that your kernel is still blocking some command in the userland.
This might cause your problems, because I get the same write modes as user
that I get as root. I use 2.6.9 but have allowed some more commands for
users. You can add this in linux/drivers/block/scsi_ioctl.c to see if
some commands are blocked as user:

--- linux/drivers/block/scsi_ioctl.c.orig       2004-08-18 16:11:01.000000000 +0200
+++ linux/drivers/block/scsi_ioctl.c    2004-08-18 16:11:55.000000000 +0200
@@ -172,6 +228,12 @@
         /* And root can do any command.. */
         if (capable(CAP_SYS_RAWIO))
                 return 0;
+        /* Added for debugging*/
+
+       if(file->f_mode & FMODE_WRITE)
+         printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with write-mode\n",cmd[0]);
+       else
+         printk(KERN_WARNING "SCSI-CMD Filter: 0x%x not allowed with read-mode\n",cmd[0]);

         /* Otherwise fail it with an "Operation not permitted" */
         return -EPERM;

cu,
Frank


-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-02  7:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-01 13:40 cd burning, capabilities and available modes J.A. Magallon
2004-12-01 16:36 ` Daniel Drake
2004-12-01 15:00   ` J.A. Magallon
2004-12-01 17:05 ` Lee Revell
2004-12-01 22:38 ` Bill Davidsen
2004-12-01 22:58   ` J.A. Magallon
2004-12-02  7:57 ` Frank Steiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox