Re: [PATCH 5/7] ovl: avoid possible inode number collisions with xino=on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 19, 2020 at 5:36 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Wed, Feb 19, 2020 at 4:28 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > On Wed, Feb 19, 2020 at 4:25 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> > > While this makes sense on 64bit arch, it's going to overflow on 32bit
> > > (due to i_ino being "unsigned long").
> >
> > It's not clear here, but on 32bit, xinobits is 0:
> >
> >                 ofs->xino_mode = BITS_PER_LONG - 32;
> >
> > To the expression doesn't change i_ino.
> > Correct?
> > Want me to clarify that by comment or by code?
>
> Ah, missed that.  I think no need to clarify further.
>

Mmm.. only it doesn't seem to be true.
Seems like with xino=on xino_mode won't be 0 on 32bit.
I think we do want to force disable xino on 32bit and send fix to stable -
if only to keep the code in ovl_map_ino() simpler.

What's more, I think there is a bug with xino_mode -
it is not initialized to -1 on the default xino=off mode,
so ovl_same_fs() could be wrong.

I will try to look at this tomorrow.

Thanks,
Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux