From: James Lamanna <jlamanna@gmail.com>
To: linux-kernel@vger.kernel.org, schilling@fokus.fraunhofer.de
Subject: Re: Linux ISO-9660 Rock Ridge bug needs fix
Date: Tue, 17 Oct 2006 11:37:33 -0700 (PDT) [thread overview]
Message-ID: <453522ed.1a57ae7d.6b06.5d31@mx.google.com> (raw)
In-Reply-To: <200610171445.k9HEji8R018455@burner.fokus.fraunhofer.de>
Joerg Schilling wrote:
> Hi,
>
> while working on better ISO-9660 support for the Solaris Kernel,
> I recently enhanced mkisofs to support the Rock Ridge Standard version 1.12
> from 1994.
>
> The difference bewteen version 1.12 and 1.10 (this is what previous
> mkisofs versions did implement) is that the "PX" field is now 8 Byte
> bigger than before (44 instead of 36 bytes).
>
> As Rock Ridge is a protocol that implements a list of size tagged fields,
> this change in mkisofs should not be a problem and in fact is not for Solaris
> or FreeBSD. As Linux does not implement Rock Rige correctly, Linux will
> reject CDs/DVDs that have been created by a recent mkisofs.
>
> As Linux will completely disable RR because of this bug, it must be called
> a showstopper bug that needs immediate fixing and that also needs to be
> backported.
Hi Joerg,
It looks like Linux would definitely have an issue with field sizes changing
because it does an overflow calculation (see rock_check_overflow())
based on struct sizes.
Have you seen the error that Linux generates? If so please post it. I'm
assuming its probably something along the lines of:
"rock: directory entry would overflow storage...."
I've attached a patch that may fix the problem for now.
This is only compile-tested, not run tested or tested against any
RockRidge 1.12 images yet. Unfortunately I'm not by any machines with any
flavor of linux or cdrecord that actually have a CD burner I can test this on.
As I am not any sort of ISOFS maintainer by any stretch of the imagination all
review is welcome.
Thanks.
-- James Lamanna
Add a PX entry structure that includes the File Serial Number field per
RockRidge version 1.12.
Signed-off-by: James Lamanna <jlamanna@gmail.com>
---
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
index f3a1db3..48be069 100644
--- a/fs/isofs/rock.c
+++ b/fs/isofs/rock.c
@@ -4,6 +4,9 @@
* (C) 1992, 1993 Eric Youngdale
*
* Rock Ridge Extensions to iso9660
+ *
+ * James Lamanna : Support v. 1.12 PX Entry
+ * (jlamanna@gmail.com) : 17th Oct 2006
*/
#include <linux/slab.h>
@@ -148,8 +151,14 @@ static int rock_check_overflow(struct ro
len = sizeof(struct RR_RR_s);
break;
case SIG('P', 'X'):
- len = sizeof(struct RR_PX_s);
+ {
+ struct rock_ridge *rr = (struct rock_ridge *)rs->chr;
+ if (rr->len == PX_112_LEN)
+ len = sizeof(struct RR_PX_112_s);
+ else
+ len = sizeof(struct RR_PX_s);
break;
+ }
case SIG('P', 'N'):
len = sizeof(struct RR_PN_s);
break;
@@ -349,6 +358,9 @@ #endif
inode->i_nlink = isonum_733(rr->u.PX.n_links);
inode->i_uid = isonum_733(rr->u.PX.uid);
inode->i_gid = isonum_733(rr->u.PX.gid);
+
+ if (rr->len == PX_112_LEN)
+ inode->i_ino = isonum_733(rr->u.PX_112.serial);
break;
case SIG('P', 'N'):
{
diff --git a/fs/isofs/rock.h b/fs/isofs/rock.h
index ed09e2b..fc4478f 100644
--- a/fs/isofs/rock.h
+++ b/fs/isofs/rock.h
@@ -35,6 +35,16 @@ struct RR_PX_s {
char gid[8];
};
+/* RR 1.12 extends the PX entry with a POSIX File Serial Number */
+#define PX_112_LEN (sizeof(struct RR_PX_112_s) + offsetof(struct rock_ridge, u))
+struct RR_PX_112_s {
+ char mode[8];
+ char n_links[8];
+ char uid[8];
+ char gid[8];
+ char serial[8];
+};
+
struct RR_PN_s {
char dev_high[8];
char dev_low[8];
@@ -102,6 +112,7 @@ struct rock_ridge {
struct SU_ER_s ER;
struct RR_RR_s RR;
struct RR_PX_s PX;
+ struct RR_PX_112_s PX_112;
struct RR_PN_s PN;
struct RR_SL_s SL;
struct RR_NM_s NM;
next prev parent reply other threads:[~2006-10-17 18:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-17 14:45 Linux ISO-9660 Rock Ridge bug needs fix Joerg Schilling
2006-10-17 17:41 ` Ismail Donmez
2006-10-17 18:02 ` Luca Tettamanti
2006-10-17 18:14 ` Ismail Donmez
2006-10-17 18:16 ` Joerg Schilling
2006-10-17 18:32 ` Ismail Donmez
2006-10-17 19:50 ` Luca Tettamanti
2006-10-17 19:38 ` Pekka Enberg
2006-10-19 21:31 ` H. Peter Anvin
2006-10-17 18:12 ` Joerg Schilling
2006-10-17 18:28 ` Ismail Donmez
2006-10-17 18:32 ` Joerg Schilling
2006-10-17 18:39 ` Ismail Donmez
2006-10-17 21:07 ` James Lamanna
2006-10-17 21:32 ` Joerg Schilling
2006-10-17 21:51 ` James Lamanna
2006-10-17 22:24 ` Joerg Schilling
2006-10-17 23:06 ` Alan Cox
2006-10-18 15:07 ` Joerg Schilling
2006-10-17 19:53 ` Jan Engelhardt
2006-10-17 18:37 ` James Lamanna [this message]
[not found] <771eN-VK-9@gated-at.bofh.it>
[not found] ` <771yn-1XU-65@gated-at.bofh.it>
2006-10-17 23:09 ` Bodo Eggert
2006-10-18 15:14 ` Joerg Schilling
2006-10-18 22:45 ` Bodo Eggert
2006-10-18 23:29 ` Joerg Schilling
2006-10-19 21:16 ` Bodo Eggert
2006-10-19 21:39 ` Joerg Schilling
2006-10-19 21:49 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=453522ed.1a57ae7d.6b06.5d31@mx.google.com \
--to=jlamanna@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schilling@fokus.fraunhofer.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.