[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200622212245.GC21350@casper.infradead.org>
Date: Mon, 22 Jun 2020 22:22:45 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Egor Chelak <egor.chelak@...il.com>
Cc: Al Viro <viro@...iv.linux.org.uk>, Arnd Bergmann <arnd@...db.de>,
Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] isofs: fix High Sierra dirent flag accesses
On Sun, Jun 21, 2020 at 07:08:17AM +0300, Egor Chelak wrote:
> The flags byte of the dirent was accessed as de->flags[0] in a couple of
> places, and not as de->flags[-sbi->s_high_sierra], which is how it's
> accessed elsewhere. This caused a bug, where some files on an HSF disc
> could be inaccessible.
> +++ b/fs/isofs/dir.c
> @@ -50,6 +50,7 @@ int isofs_name_translate(struct iso_directory_record *de, char *new, struct inod
> int get_acorn_filename(struct iso_directory_record *de,
> char *retname, struct inode *inode)
> {
> + struct isofs_sb_info *sbi = ISOFS_SB(inode->i_sb);
> int std;
> unsigned char *chr;
> int retnamlen = isofs_name_translate(de, retname, inode);
> @@ -66,7 +67,7 @@ int get_acorn_filename(struct iso_directory_record *de,
> return retnamlen;
> if ((*retname == '_') && ((chr[19] & 1) == 1))
> *retname = '!';
> - if (((de->flags[0] & 2) == 0) && (chr[13] == 0xff)
> + if (((de->flags[-sbi->s_high_sierra] & 2) == 0) && (chr[13] == 0xff)
> && ((chr[12] & 0xf0) == 0xf0)) {
> retname[retnamlen] = ',';
> sprintf(retname+retnamlen+1, "%3.3x",
It's been about 22 years since I contributed the patch which added
support for the Acorn extensions ;-) But I'm pretty sure that it's not
possible to have an Acorn CD-ROM that is also an HSF CD-ROM. That is,
all Acorn formatted CD-ROMs are ISO-9660 compatible. So I think this
chunk of the patch is not required.
Powered by blists - more mailing lists