Re: [PATCH 9/9] xfs: repair obviously broken inode modes

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

 



On Mon, Dec 11, 2023 at 09:35:37PM -0800, Christoph Hellwig wrote:
> On Mon, Dec 11, 2023 at 02:19:26PM -0800, Darrick J. Wong wrote:
> > block/char/special files... I guess those can just turn into zero length
> > regular files.
> 
> Ys, and I don't think that is much of a problem.
> 
> > Would this NAK remain even if there were external corroborating
> > evidence?
> > 
> > For example, what if we read the dirents out of the first directory
> > block, seek out parent pointers in the alleged children, and confirm a
> > 1:1 match between the alleged dirents and pptrs?  Unprivileged userspace
> > can certain create a regular file N that looks like a dirent block, but
> > it cannot create dangling pptrs back to N to trick the verification
> > algorithm.
> 
> That does look like I a good enough evinde as you said userspace can't
> fake up the parent pointer.

Yeah, and for non-dirs, we /could/ just scan all the directory entries
to see if we come up with any hits for the inode whose mode we do not
know; the ftype will help us set that back.

--D




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux