From: Jan Kara <jack@suse.cz>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jan Kara <jack@suse.cz>, Stephen Rothwell <sfr@canb.auug.org.au>,
linux-fsdevel@vger.kernel.org,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: Tree for Nov 9
Date: Tue, 9 Nov 2021 12:00:25 +0100 [thread overview]
Message-ID: <20211109110025.GB5955@quack2.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2111091051380.2669071@ramsan.of.borg>
On Tue 09-11-21 10:58:01, Geert Uytterhoeven wrote:
> Hi Jan,
>
> As lore doesn't seem to have the original patch, I'm replying here.
>
> On Tue, 9 Nov 2021, Stephen Rothwell wrote:
> > Merging ext3/for_next (39a464de961f udf: Fix crash after seekdir)
>
> noreply@ellerman.id.au reported for m68k/allmodconfig:
> fs/udf/dir.c:78:18: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> fs/udf/dir.c:211:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>
> The actual code does:
>
> * Did our position change since last readdir (likely lseek was
> * called)? We need to verify the position correctly points at the
> * beginning of some dir entry so that the directory parsing code does
> * not get confused. Since UDF does not have any reliable way of
> * identifying beginning of dir entry (names are under user control),
> * we need to scan the directory from the beginning.
> */
> if (ctx->pos != (loff_t)file->private_data) {
> emit_pos = nf_pos;
> nf_pos = 0;
> }
>
> and:
>
> /* Store position where we've ended */
> file->private_data = (void *)ctx->pos;
>
> Obviously this is not going to fly on 32-bit systems, as
> file->private_data is 32-bit or 64-bit unsigned long, but ctx->pos is
> always 64-bit loff_t.
>
> I do not know if UDF supports files larger than 4 GiB (DVDs can be
> larger).
> If it doesn't, you need intermediate casts to uintptr_t.
> If it does, you need a different solution.
Yeah, thanks for the heads up. I've noticed the warning from 0-day as well
and realized this is a real problem on 32-bit systems. UDF does support
dirs larger than 4G in principle (although practically anything larger than
say 1MB is probably unusable due to linear directory structure :). Anyway,
I'm working on a fix.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-11-09 11:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 2:54 linux-next: Tree for Nov 9 Stephen Rothwell
2021-11-09 2:55 ` Stephen Rothwell
2021-11-09 9:58 ` Geert Uytterhoeven
2021-11-09 11:00 ` Jan Kara [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-11-09 2:08 Stephen Rothwell
2022-11-09 5:37 Stephen Rothwell
2020-11-09 7:17 Stephen Rothwell
2018-11-09 3:04 Stephen Rothwell
2017-11-09 6:42 Stephen Rothwell
2016-11-09 4:40 Stephen Rothwell
2015-11-09 3:06 Stephen Rothwell
2012-11-09 4:31 Stephen Rothwell
2011-11-09 2:58 Stephen Rothwell
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=20211109110025.GB5955@quack2.suse.cz \
--to=jack@suse.cz \
--cc=geert@linux-m68k.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox