Hi all,
There is a pretty bad bug in the "/fs/isofs/inode.c" file under linux kernel
version 2.2.17. Search the file for the word "dipshit" (not a joke) and
look at the cruft mounting code. It assumes that the maximum size of a
dvd-rom file is 1 gigabyte. This is certainly not a correct assumption when
talking about dvd-rom's with nothing but data on them as the maximum size of
an iso-9660 file is something like 2^32. It is also incorrect if he is
referring to dvd movies as the maximum file size of any non title set file
is also only bounded by the iso-9660 file system limitations. The dvd video
specification only limits title set files in the form of vts_0x_x.vob to
under 1 gig in size. You can exhibit the problem by mounting the dvd movie
"The World is Not Enough" as it contains a video_ts.vob which is larger than
1 gigabyte. You will see that most of the file lengths are incorrect due to
the "cruft mounting option" hacking off the high order byte. There are
certainly many more movies out there that exhibit this problem so it would
be a good thing for someone to fix.
Here is the code in question.....
/* There are defective discs out there - we do this to protect
ourselves. A cdrom will never contain more than 800Mb
.. but a DVD may be up to 1Gig (Ulrich Habel) */
if((inode->i_size < 0 || inode->i_size > 1073741824) &&
inode->i_sb->u.isofs_sb.s_cruft == 'n') {
printk("Warning: defective cdrom. Enabling \"cruft\" mount
option.\n");
inode->i_sb->u.isofs_sb.s_cruft = 'y';
}
/* Some dipshit decided to store some other bit of information in the high
byte of the file length. Catch this and holler. WARNING: this will make
it impossible for a file to be > 16Mb on the CDROM!!!*/
if(inode->i_sb->u.isofs_sb.s_cruft == 'y' &&
inode->i_size & 0xff000000){
/* printk("Illegal format on cdrom. Pester manufacturer.\n"); */
inode->i_size &= 0x00ffffff;
}
--> I am not subscribed to the mailing list so any reply will have to be
made to my e-mail address <--
Jeff Peel
<mailto:[email protected]>
Senior Software Engineer
Intel IAL - Consumer Media Technology
> under 1 gig in size. You can exhibit the problem by mounting the dvd movie
> "The World is Not Enough" as it contains a video_ts.vob which is larger than
> 1 gigabyte. You will see that most of the file lengths are incorrect due to
> the "cruft mounting option" hacking off the high order byte. There are
> certainly many more movies out there that exhibit this problem so it would
> be a good thing for someone to fix.
The cruft thing is correct in itself. The size being 4Gb is trivial to change
providing someone can provide a reference to the standards that say its ok.
So is the limit 4Gig, who documents it ?
Alan
Alan Cox wrote:
> > under 1 gig in size. You can exhibit the problem by mounting the dvd movie
> > "The World is Not Enough" as it contains a video_ts.vob which is larger than
> > 1 gigabyte. You will see that most of the file lengths are incorrect due to
> > the "cruft mounting option" hacking off the high order byte. There are
> > certainly many more movies out there that exhibit this problem so it would
> > be a good thing for someone to fix.
> The cruft thing is correct in itself. The size being 4Gb is trivial
> to change providing someone can provide a reference to the standards
> that say its ok. So is the limit 4Gig, who documents it ?
Page 137 of DVD Demystified by Jim Taylor says:
- Individual files must be less than or equal to 1 gigabyte in length.
(i.e. I think the DVD is out of spec....)
Roger.
--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
Rogier Wolff wrote:
>
> Alan Cox wrote:
> > > under 1 gig in size. You can exhibit the problem by mounting the dvd movie
> > > "The World is Not Enough" as it contains a video_ts.vob which is larger than
> > > 1 gigabyte. You will see that most of the file lengths are incorrect due to
> > > the "cruft mounting option" hacking off the high order byte. There are
> > > certainly many more movies out there that exhibit this problem so it would
> > > be a good thing for someone to fix.
>
> > The cruft thing is correct in itself. The size being 4Gb is trivial
> > to change providing someone can provide a reference to the standards
> > that say its ok. So is the limit 4Gig, who documents it ?
>
> Page 137 of DVD Demystified by Jim Taylor says:
>
> - Individual files must be less than or equal to 1 gigabyte in length.
The maximum size of a single UDF extent is 2^30-1
For DVD Video, the data of each file shall be recorded in a single extent.
So thats where the limit comes from :)
Ben
--
Linux UDF - http://linux-udf.sourceforge.net
Latest Is - udf-0.9.2.1 (http://www.csc.calpoly.edu/~bfennema/udf.html)
Ben Fennema wrote:
> Rogier Wolff wrote:
> >
> > Alan Cox wrote:
> > > > under 1 gig in size. You can exhibit the problem by mounting the dvd movie
> > > > "The World is Not Enough" as it contains a video_ts.vob which is larger than
> > > > 1 gigabyte. You will see that most of the file lengths are incorrect due to
> > > > the "cruft mounting option" hacking off the high order byte. There are
> > > > certainly many more movies out there that exhibit this problem so it would
> > > > be a good thing for someone to fix.
> >
> > > The cruft thing is correct in itself. The size being 4Gb is trivial
> > > to change providing someone can provide a reference to the standards
> > > that say its ok. So is the limit 4Gig, who documents it ?
> >
> > Page 137 of DVD Demystified by Jim Taylor says:
> >
> > - Individual files must be less than or equal to 1 gigabyte in length.
>
> The maximum size of a single UDF extent is 2^30-1
> For DVD Video, the data of each file shall be recorded in a single extent.
Hmm. Then the "or equal to" part is "wrong"...
Yes, My dvd demystified book also says that it needs to be one extent.
Roger.
--
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.